1 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
6 2008-12-02 Ulrich Drepper <drepper@redhat.com>
8 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
10 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
11 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
12 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
13 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
15 2008-11-25 Roland McGrath <roland@redhat.com>
17 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
18 Subdirectories moved to ports repository as
19 sysdeps/.../nptl subdirectories.
21 2008-11-12 Jakub Jelinek <jakub@redhat.com>
24 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
26 * pthread_cond_init.c (__pthread_cond_init): Fix
27 cond->__data.__nwaiters initialization.
28 * Makefile (tests): Add tst-cond23.
29 * tst-cond23.c: New test.
31 2008-11-07 Jakub Jelinek <jakub@redhat.com>
33 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
35 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
38 2008-11-01 Ulrich Drepper <drepper@redhat.com>
41 * pthread_mutex_lock.c: Add support for private PI mutexes.
42 * pthread_mutex_timedlock.c: Likewise.
43 * pthread_mutex_trylock.c: Likewise.
44 * pthread_mutex_unlock.c: Likewise.
45 Patch mostly by Ben Jackson <ben@ben.com>.
47 2008-10-31 Ulrich Drepper <drepper@redhat.com>
50 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
51 Increase stack size for helper thread.
53 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
55 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
56 assembly with a clobber list for access registers a0 and a1.
58 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
60 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
61 to force runp->refcntr to be read from memory.
63 2008-09-08 Richard Guenther <rguenther@suse.de>
65 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
66 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
67 lll_timedlock, lll_robust_timedlock, lll_unlock,
68 lll_robust_unlock): Promote private to int.
70 2008-08-15 Ulrich Drepper <drepper@redhat.com>
72 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
73 ARCH_RETRY_MMAP definitions.
74 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
75 Define MAP_STACK when not defined.
76 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
77 handling of ARCH_RETRY_MMAP.
79 2008-07-30 Ulrich Drepper <drepper@redhat.com>
81 * tst-align2.c (f): Print message that f is reached.
83 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
86 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
87 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
89 2008-07-25 Ulrich Drepper <drepper@redhat.com>
91 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
92 SOCK_CLOEXEC if possible.
94 2008-05-29 Ulrich Drepper <drepper@redhat.com>
96 * Makefile (tests): Add tst-rwlock2a.
97 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
98 * tst-rwlock2a.c: New file.
100 2008-06-12 Ulrich Drepper <drepper@redhat.com>
102 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
104 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
106 * sysdeps/pthread/pthread.h: Fix typo in comment.
108 2008-05-28 Ulrich Drepper <drepper@redhat.com>
110 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
111 of CPU set to the kernel.
113 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
115 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
117 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
118 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
119 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
120 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
121 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
122 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
124 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
126 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
128 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
130 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
132 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
135 2008-05-26 Ulrich Drepper <drepper@redhat.com>
137 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
139 2008-05-20 Jakub Jelinek <jakub@redhat.com>
141 David S. Miller <davem@davemloft.net>
143 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
145 2008-05-10 Ulrich Drepper <drepper@redhat.com>
147 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
149 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
151 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
153 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
155 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
157 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
159 2008-04-14 David S. Miller <davem@davemloft.net>
161 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
162 (__old_sem_wait): Fix argument to lll_futex_wait().
164 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
166 * pthread_create.c: Require pthread_mutex_trylock and
167 pthread_key_delete for libgcc.
169 2008-04-08 Jakub Jelinek <jakub@redhat.com>
172 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
173 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
174 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
176 2008-03-27 Ulrich Drepper <drepper@redhat.com>
178 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
179 <linux/limits.h> has defined it.
180 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
181 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
182 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
183 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
185 2008-03-18 Jakub Jelinek <jakub@redhat.com>
187 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
189 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
190 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
192 2008-03-14 Ulrich Drepper <drepper@redhat.com>
194 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
195 HAVE_DL_DISCOVER_OSVERSION.
196 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
197 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
199 2008-03-07 Ulrich Drepper <drepper@redhat.com>
202 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
203 _POSIX_CHOWN_RESTRICTED value to zero.
205 2008-01-31 Roland McGrath <roland@redhat.com>
207 * Makefile (omit-deps): Variable removed.
209 2008-01-30 Ulrich Drepper <drepper@redhat.com>
211 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
212 unnecessary addr32 prefix.
214 2008-01-29 Roland McGrath <roland@redhat.com>
216 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
218 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
220 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
222 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
224 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
226 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
227 (__lll_lock_wait_private): Fix typo.
228 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
229 (pthread_barrier_wait): Likewise. Adjust XADD use.
230 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
232 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
233 (pthread_rwlock_timedrdlock): Return correct return value.
234 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
235 (pthread_rwlock_timedwrlock): Likewise.
237 2008-01-15 Ulrich Drepper <drepper@redhat.com>
239 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
240 thread returns the program exits with an error code.
242 2008-01-10 Ulrich Drepper <drepper@redhat.com>
244 * pthread-errnos.sym: Add EOVERFLOW.
245 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
246 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
247 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
248 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
250 2007-12-14 Ulrich Drepper <drepper@redhat.com>
252 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
253 parameter. Passed it as permission to mmap.
254 * allocatestack.c (allocate_stack): Pass prot as second parameter
257 2007-12-12 Ulrich Drepper <drepper@redhat.com>
259 * tst-basic7.c: Allocate memory for the stack.
262 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
263 (__pthread_cond_timedwait): Don't use VDSO.
264 Patch by Michal Januszewski.
266 2007-12-07 Ulrich Drepper <drepper@redhat.com>
269 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
270 Allow label before pthread_cleanup_pop.
271 (pthread_cleanup_pop_restore_np): Likewise.
273 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
275 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
276 Store 2 before returning ETIMEDOUT.
278 2007-11-23 Ulrich Drepper <drepper@redhat.com>
280 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
281 Store 2 before returning ETIMEDOUT.
282 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
283 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
284 (__lll_lock_wait_private): Optimize.
285 (__lll_lock_wait): Likewise.
287 2007-11-20 Jakub Jelinek <jakub@redhat.com>
289 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
290 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
291 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
293 2007-11-08 Ulrich Drepper <drepper@redhat.com>
296 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
297 If we time out, try one last time to lock the futex to avoid
298 losing a wakeup signal.
299 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
300 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
303 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
306 2007-11-07 Ulrich Drepper <drepper@redhat.com>
309 * allocatestack.c (allocate_stack): Change ENOMEM error in case
310 mmap failed to EAGAIN.
311 * Makefile (tests): Add tst-basic7.
312 * tst-basic7.c: New file.
314 2007-11-05 Ulrich Drepper <drepper@redhat.com>
316 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
319 2007-11-03 Mike Frysinger <vapier@gentoo.org>
321 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
322 missing line continuations.
323 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
324 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
326 2007-10-28 Ulrich Drepper <drepper@redhat.com>
329 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
330 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
331 (struct timer): Add next element.
332 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
333 enqueue timer structure into __active_timer_sigev_thread list.
334 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
335 remove timer struct from __active_timer_sigev_thread.
336 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
337 Before using timer structure make sure it is still on the
338 __active_timer_sigev_thread list. Keep lock until done.
339 Define __active_timer_sigev_thread and
340 __active_timer_sigev_thread_lock.
342 2007-10-27 Ulrich Drepper <drepper@redhat.com>
344 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
345 Redefine thread_atfork for use of ATFORK_MEM.
346 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
347 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
349 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
350 Use atomic operation when removing first element of list.
352 2007-10-17 Jakub Jelinek <jakub@redhat.com>
354 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
355 routine instead of an alias to __new_sem_post.
357 2007-10-15 Jakub Jelinek <jakub@redhat.com>
359 * init.c (__pthread_initialize_minimal): Initialize word to appease
362 2007-10-10 Jakub Jelinek <jakub@redhat.com>
364 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
365 libc.so just clear NAME.
366 (__libc_rwlock_fini): Nop inside of libc.so.
367 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
370 2007-09-02 Ulrich Drepper <drepper@redhat.com>
372 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
373 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
375 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
377 2007-08-21 Ulrich Drepper <drepper@redhat.com>
380 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
381 reclaimed stack if necessary.
382 * Makefile (tests): Add tst-tsd6.
383 * tst-tsd6.c: New file.
385 2007-08-21 Jakub Jelinek <jakub@redhat.com>
387 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
388 Add private argument.
390 2007-08-20 Ulrich Drepper <drepper@redhat.com>
392 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
393 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
395 2007-08-16 Jakub Jelinek <jakub@redhat.com>
397 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
398 (__lll_robust_timedlock): Pass private as last argument to
399 __lll_robust_timedlock_wait.
400 (__lll_unlock): Fix a pasto.
402 2007-08-15 Jakub Jelinek <jakub@redhat.com>
404 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
405 sparc_old_sem): New structs.
406 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
407 (__sem_wait_cleanup): New function.
408 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
409 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
410 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
412 (__old_sem_wait): New function.
413 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
414 nptl/sysdeps/unix/sysv/linux/sparc version.
415 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
417 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
418 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
419 (__new_sem_trywait): Use sparc_old_sem structure.
420 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
421 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
422 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
423 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
424 lll_futex_timed_wait.
425 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
426 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
427 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
429 (__old_sem_post): New function.
430 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
431 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
432 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
433 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
434 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
435 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
437 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
439 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
440 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
441 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
442 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
443 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
444 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
445 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
447 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
448 kernel-features.h and tcb-offsets.h.
449 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
450 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
452 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
454 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
455 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
457 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
458 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
459 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
460 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
461 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
462 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
463 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
465 2007-08-14 Jakub Jelinek <jakub@redhat.com>
467 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
468 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
469 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
470 lll_futex_timed_wait.
472 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
473 __lll_robust_unlock): Rewrite as macros instead of inline functions.
474 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
475 __lll_robust_unlock, __lll_wait_tid): Likewise.
477 2007-08-13 Jakub Jelinek <jakub@redhat.com>
479 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
481 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
482 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
483 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
484 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
485 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
486 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
487 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
488 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
490 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
491 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
492 process private. Switch DW_CFA_advance_loc1 and some
493 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
494 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
495 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
496 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
497 process private. Switch DW_CFA_advance_loc{1,2} and some
498 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
499 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
500 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
501 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
503 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
504 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
505 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
507 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
508 (__pthread_cond_broadcast): Compare %r8 instead of
509 dep_mutex-cond_*(%rdi) with $-1.
510 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
511 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
514 2007-08-13 Ulrich Drepper <drepper@redhat.com>
516 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
518 2007-08-13 Jakub Jelinek <jakub@redhat.com>
520 * allocatestack.c: Include kernel-features.h.
521 * pthread_create.c: Likewise.
522 * pthread_mutex_init.c: Likewise.
524 * pthread_cond_timedwait.c: Likewise.
525 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
526 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
527 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
528 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
529 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
530 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
531 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
533 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
535 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
536 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
537 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
538 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
540 2007-08-12 Jakub Jelinek <jakub@redhat.com>
542 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
543 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
544 byte elements. One of them is the new __shared element.
545 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
546 adjust names of other padding elements.
547 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
548 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
549 byte elements. One of them is the new __shared element.
550 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
551 adjust names of other padding elements.
552 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
553 Renamed __pad1 element to __shared, adjust names of other padding
555 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
556 (pthread_rwlock_t): Likewise.
557 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
560 2007-08-09 Anton Blanchard <anton@samba.org>
562 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
564 2007-08-12 Ulrich Drepper <drepper@redhat.com>
566 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
568 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
570 2007-08-11 Ulrich Drepper <drepper@redhat.com>
572 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
573 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
574 dealing with robust mutexes.
575 * pthread_mutex_timedlock.c: Likewise.
576 * pthread_mutex_trylock.c: Likewise.
577 * pthread_mutex_unlock.c: Likewise.
578 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
580 2007-08-06 Jakub Jelinek <jakub@redhat.com>
582 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
583 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
584 (PTHREAD_MUTEX_PSHARED): Define.
585 * pthread_mutex_init.c (__pthread_mutex_init): Set
586 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
588 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
589 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
590 as second argument to lll_lock.
591 (LLL_MUTEX_TRYLOCK): Take mutex as argument
592 instead of its __data.__lock field.
593 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
594 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
596 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
597 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
598 instead of mutex->__data.__kind directly, pass
599 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
600 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
601 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
602 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
603 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
604 to lll_timedlock, lll_robust_timedlock, lll_unlock and
605 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
606 of mutex->__data.__kind directly.
607 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
608 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
609 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
610 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
611 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
612 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
614 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
615 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
616 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
618 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
619 Take mutex as argument instead of its __data.__lock field, pass
620 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
621 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
623 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
624 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
625 to lll_robust_cond_lock.
626 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
627 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
628 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
629 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
630 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
631 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
633 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
634 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
636 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
637 pshared variable, pass it to lll_lock, lll_unlock,
638 lll_futex_timedwait and lll_futex_wake.
639 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
640 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
642 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
643 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
645 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
646 lll_futex_wake_unlock): Likewise.
647 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
649 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
650 lll_futex_wake_unlock): Likewise.
651 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
653 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
654 lll_futex_wake_unlock): Likewise.
655 (lll_futex_wake): Fix a typo.
656 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
657 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
658 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
659 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
660 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
661 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
662 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
663 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
664 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
665 (__pthread_cond_timedwait): Likewise.
666 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
667 (__condvar_cleanup, __pthread_cond_wait): Likewise.
669 2007-08-05 Jakub Jelinek <jakub@redhat.com>
671 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
672 Don't use CGOTSETUP and CGOTRESTORE macros.
673 (CGOTSETUP, CGOTRESTORE): Remove.
674 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
677 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
679 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
680 definitions for private futexes.
681 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
682 kernel-features.h and lowlevellock.h. Use private futexes if
684 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
685 (__lll_mutex_lock_wait): Rename to
686 (__lll_lock_wait): ... this. Don't compile in for libc.so.
687 (__lll_mutex_timedlock_wait): Rename to ...
688 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
689 Don't compile in for libc.so.
690 (__lll_mutex_unlock_wake): Rename to ...
691 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
692 (__lll_timedwait_tid): Use __NR_gettimeofday.
693 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
694 the header from assembler. Renamed all lll_mutex_* resp.
695 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
696 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
697 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
699 (__lll_lock_wait_private): Add prototype.
700 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
701 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
702 __lll_unlock_wake): Likewise.
703 (lll_lock): Add private argument. Call __lll_lock_wait_private
704 if private is constant LLL_PRIVATE.
705 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
706 lll_timedlock, lll_robust_timedlock): Add private argument.
707 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
708 if private is constant LLL_PRIVATE.
709 (lll_robust_unlock, lll_robust_dead): Add private argument.
710 (lll_lock_t): Remove.
711 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
712 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
713 lll_cond_wake, lll_cond_broadcast): Remove.
714 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
715 kernel-features.h and lowlevellock.h.
716 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
717 (LOAD_FUTEX_WAIT): Define.
718 (__lll_robust_mutex_lock_wait): Rename to ...
719 (__lll_robust_lock_wait): ... this. Add private argument.
720 Use LOAD_FUTEX_WAIT macro.
721 (__lll_robust_mutex_timedlock_wait): Rename to ...
722 (__lll_robust_timedlock_wait): ... this. Add private argument.
723 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
724 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
726 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
727 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
728 __lll_mutex_{lock,unlock}_*.
729 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
730 lowlevellock.h and pthread-errnos.h.
731 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
732 FUTEX_CMP_REQUEUE, EINVAL): Remove.
733 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
734 __lll_mutex_{lock,unlock}_*.
735 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
736 lowlevellock.h and pthread-errnos.h.
737 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
738 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
739 __lll_mutex_{lock,unlock}_*.
740 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
742 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
743 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
744 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
745 (__condvar_tw_cleanup): Likewise.
746 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
748 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
749 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
750 __lll_mutex_{lock,unlock}_*.
751 ( __condvar_w_cleanup): Likewise.
752 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
753 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
754 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
756 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
757 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
758 __lll_mutex_{lock,unlock}_*.
759 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
761 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
762 FUTEX_PRIVATE_FLAG): Remove.
763 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
764 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
765 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
767 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
768 FUTEX_PRIVATE_FLAG): Remove.
769 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
770 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
771 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
773 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
774 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
775 __lll_mutex_{lock,unlock}_*.
776 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
778 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
779 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
780 __lll_mutex_{lock,unlock}_*.
781 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
782 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
783 (__new_sem_post): Use standard initial exec code sequences.
784 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
786 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
787 FUTEX_PRIVATE_FLAG): Remove.
788 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
790 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
791 (__new_sem_trywait): Use standard initial exec code sequences.
792 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
793 (__new_sem_wait): Use standard initial exec code sequences.
795 2007-07-31 Anton Blanchard <anton@samba.org>
797 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
798 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
801 2007-07-31 Jakub Jelinek <jakub@redhat.com>
803 * allocatestack.c (stack_cache_lock): Change type to int.
804 (get_cached_stack, allocate_stack, __deallocate_stack,
805 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
806 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
807 as second argument to lll_lock and lll_unlock macros on
809 * pthread_create.c (__find_in_stack_list): Likewise.
810 (start_thread): Similarly with pd->lock. Use lll_robust_dead
811 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
813 * descr.h (struct pthread): Change lock and setxid_futex field
815 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
816 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
817 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
818 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
820 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
821 * pthread_cond_init.c (__pthread_cond_init): Likewise.
822 * pthreadP.h (__attr_list_lock): Change type to int.
823 * pthread_attr_init.c (__attr_list_lock): Likewise.
824 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
825 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
827 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
828 also for lll_futex_{wake,wait}.
829 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
831 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
832 LLL_SHARED as second argument to lll_{,un}lock.
833 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
834 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
835 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
836 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
838 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
839 as second argument to lll_{,un}lock macros on pd->lock.
840 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
841 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
842 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
843 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
845 * sysdeps/pthread/createthread.c (do_clone, create_thread):
847 * pthread_once.c (once_lock): Change type to int.
848 (__pthread_once): Pass LLL_PRIVATE as second argument to
849 lll_{,un}lock macros on once_lock.
850 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
851 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
852 rwlock->__data.__shared as second argument to them and similarly
854 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
856 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
858 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
859 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
860 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
861 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
862 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
863 to lll_{,un}lock macros on __sem_mappings_lock.
864 * sem_open.c (check_add_mapping): Likewise.
865 (__sem_mappings_lock): Change type to int.
866 * semaphoreP.h (__sem_mappings_lock): Likewise.
867 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
868 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
869 instead of lll_*mutex_*, pass LLL_SHARED as last
871 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
872 pass LLL_SHARED as last argument.
873 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
874 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
875 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
876 pass LLL_SHARED as last argument.
877 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
878 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
879 LLL_SHARED as last argument.
880 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
881 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
883 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
884 __libc_lock_lock_recursive, __libc_lock_unlock,
885 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
886 argument to lll_{,un}lock.
887 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
888 _IO_lock_unlock): Likewise.
889 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
891 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
892 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
894 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
896 (__fork_lock): Change type to int.
897 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
898 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
899 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
901 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
902 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
903 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
905 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
906 pass it through to lll_futex_*wait, only compile in when
908 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
909 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
910 argument and pass it through to lll_futex_*wait.
911 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
912 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
913 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
914 inline functions to __lll_* resp. __lll_robust_*.
915 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
916 (lll_mutex_dead): Add private argument.
917 (__lll_lock_wait_private): New prototype.
918 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
919 __lll_robust_lock_timedwait): Add private argument to prototypes.
920 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
921 call __lll_lock_wait_private, otherwise pass private to
923 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
924 __lll_robust_timedlock): Add private argument, pass it to
925 __lll_*wait functions.
926 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
927 call __lll_unlock_wake_private, otherwise pass private to
929 (__lll_robust_unlock): Add private argument, pass it to
930 __lll_robust_unlock_wake.
931 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
932 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
933 argument, pass it through to __lll_* inline function.
934 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
935 (lll_lock_t): Remove.
936 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
937 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
938 lll_cond_wake, lll_cond_broadcast): Remove.
939 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
940 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
941 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
942 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
943 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
944 the header from assembler. Renamed all lll_mutex_* resp.
945 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
946 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
947 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
948 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
949 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
950 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
951 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
953 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
954 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
955 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
956 (lll_trylock): Likewise, use __lll_trylock_asm, pass
957 MULTIPLE_THREADS_OFFSET as another asm operand.
958 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
959 MULTIPLE_THREADS_OFFSET as last asm operand, call
960 __lll_lock_wait_private if private is constant LLL_PRIVATE,
961 otherwise pass private as another argument to __lll_lock_wait.
962 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
963 lll_timedlock, lll_robust_timedlock): Add private argument, pass
964 private as another argument to __lll_*lock_wait call.
965 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
966 MULTIPLE_THREADS_OFFSET as another asm operand, call
967 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
968 otherwise pass private as another argument to __lll_unlock_wake.
969 (lll_robust_unlock): Add private argument, pass private as another
970 argument to __lll_unlock_wake.
971 (lll_robust_dead): Add private argument, use __lll_private_flag
973 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
974 LLL_MUTEX_LOCK_INITIALIZER.
975 (lll_lock_t): Remove.
976 (LLL_LOCK_INITIALIZER_WAITERS): Define.
977 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
978 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
979 lll_cond_wake, lll_cond_broadcast): Remove.
980 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
981 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
982 2007-05-2{3,9} changes.
983 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
984 kernel-features.h and lowlevellock.h.
985 (LOAD_PRIVATE_FUTEX_WAIT): Define.
986 (LOAD_FUTEX_WAIT): Rewritten.
987 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
989 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
990 (__lll_mutex_lock_wait): Rename to ...
991 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
992 %ecx, %ecx is now private argument. Don't compile in for libc.so.
993 (__lll_mutex_timedlock_wait): Rename to ...
994 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
995 contains private argument. Don't compile in for libc.so.
996 (__lll_mutex_unlock_wake): Rename to ...
997 (__lll_unlock_wake): ... this. %ecx contains private argument.
998 Don't compile in for libc.so.
999 (__lll_timedwait_tid): Use __NR_gettimeofday.
1000 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1001 kernel-features.h and lowlevellock.h.
1002 (LOAD_FUTEX_WAIT): Define.
1003 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1005 (__lll_robust_mutex_lock_wait): Rename to ...
1006 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
1007 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
1009 (__lll_robust_mutex_timedlock_wait): Rename to ...
1010 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
1011 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1012 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1014 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1015 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1016 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1017 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1018 to __lll_lock_wait in %edx.
1019 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1020 Include lowlevellock.h and pthread-errnos.h.
1021 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1022 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1023 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1024 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1025 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1027 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1028 Include lowlevellock.h and pthread-errnos.h.
1029 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1030 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1031 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1032 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1033 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1035 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1036 Include lowlevellock.h.
1037 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1039 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1040 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1041 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1042 __lll_unlock_wake. Use __NR_gettimeofday.
1043 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1044 Include lowlevellock.h.
1045 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1046 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1047 to __lll_*, pass cond_lock address in %edx rather than %ecx to
1048 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1049 and __lll_unlock_wake.
1050 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1051 Include lowlevellock.h.
1052 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1053 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1054 MUTEX(%ebx) address in %edx rather than %ecx to
1055 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1056 and __lll_unlock_wake. Move return value from %ecx to %edx
1058 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1059 Include lowlevellock.h.
1060 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1062 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1063 MUTEX(%ebp) address in %edx rather than %ecx to
1064 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1065 and __lll_unlock_wake. Move return value from %ecx to %edx
1066 register. Use __NR_gettimeofday.
1067 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1068 Include lowlevellock.h.
1069 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1071 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1072 MUTEX(%ebp) address in %edx rather than %ecx to
1073 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1074 and __lll_unlock_wake. Move return value from %ecx to %edx
1075 register. Use __NR_gettimeofday.
1076 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1077 Include lowlevellock.h.
1078 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1079 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1080 MUTEX(%edi) address in %edx rather than %ecx to
1081 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1082 and __lll_unlock_wake.
1083 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1084 Include lowlevellock.h.
1085 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1086 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1087 MUTEX(%ebx) address in %edx rather than %ecx to
1088 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1089 and __lll_unlock_wake. Move return value from %ecx to %edx
1091 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1093 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1095 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1096 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1097 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1099 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1100 (sem_timedwait): Use __NR_gettimeofday.
1101 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1103 (LOCK): Don't define.
1104 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1106 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1107 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1109 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1110 2007-05-2{3,9} changes.
1111 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1112 kernel-features.h and lowlevellock.h.
1113 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1114 (LOAD_FUTEX_WAIT): Rewritten.
1115 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1116 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1117 (__lll_mutex_lock_wait): Rename to ...
1118 (__lll_lock_wait): ... this. %esi is now private argument.
1119 Don't compile in for libc.so.
1120 (__lll_mutex_timedlock_wait): Rename to ...
1121 (__lll_timedlock_wait): ... this. %esi contains private argument.
1122 Don't compile in for libc.so.
1123 (__lll_mutex_unlock_wake): Rename to ...
1124 (__lll_unlock_wake): ... this. %esi contains private argument.
1125 Don't compile in for libc.so.
1126 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1127 kernel-features.h and lowlevellock.h.
1128 (LOAD_FUTEX_WAIT): Define.
1129 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1130 (__lll_robust_mutex_lock_wait): Rename to ...
1131 (__lll_robust_lock_wait): ... this. %esi argument contains private.
1132 Use LOAD_FUTEX_WAIT macro.
1133 (__lll_robust_mutex_timedlock_wait): Rename to ...
1134 (__lll_robust_timedlock_wait): ... this. %esi argument contains
1135 private, use LOAD_FUTEX_WAIT macro.
1136 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1138 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1139 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1140 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1141 __lll_lock_wait and __lll_unlock_wake.
1142 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1143 Include lowlevellock.h and pthread-errnos.h.
1144 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1145 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1146 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1147 pass LLL_SHARED in %esi to both __lll_lock_wait and
1149 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1150 Include lowlevellock.h and pthread-errnos.h.
1151 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1152 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1153 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1154 pass LLL_SHARED in %esi to both __lll_lock_wait and
1156 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1157 Include lowlevellock.h.
1158 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1159 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1160 pass LLL_SHARED in %esi to both __lll_lock_wait and
1162 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1163 Include lowlevellock.h.
1164 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1165 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1166 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1167 and __lll_unlock_wake.
1168 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1169 Include lowlevellock.h.
1170 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1172 (__pthread_rwlock_rdlock): 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_timedrdlock.S:
1176 Include lowlevellock.h.
1177 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1179 (__pthread_rwlock_wrlock): 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_timedwrlock.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 %esi to both __lll_lock_wait
1188 and __lll_unlock_wake.
1189 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1190 Include lowlevellock.h.
1191 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1193 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1194 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1195 and __lll_unlock_wake.
1196 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1197 Include lowlevellock.h.
1198 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1200 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1201 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1202 and __lll_unlock_wake.
1203 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1205 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1207 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1208 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1209 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1211 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1212 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1214 (LOCK): Don't define.
1215 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1217 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1218 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1219 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1220 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1221 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1222 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1223 (__lll_lock_wait_private): New function.
1224 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1225 it to lll_futex_*wait. Don't compile in for libc.so.
1226 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1228 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1229 (struct sparc_pthread_barrier): Remove.
1230 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1231 struct sparc_pthread_barrier. Pass
1232 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1233 and lll_futex_wait macros.
1234 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1236 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1237 Include sparc pthread_barrier_wait.c instead of generic one.
1239 2007-07-30 Jakub Jelinek <jakub@redhat.com>
1241 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1243 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1244 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1246 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1247 (pthread_rwlock_timedwrlock): Likewise.
1248 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1249 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1251 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1253 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1255 2007-07-26 Jakub Jelinek <jakub@redhat.com>
1257 * tst-locale2.c (useless): Add return statement.
1259 2007-07-24 Jakub Jelinek <jakub@redhat.com>
1261 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1262 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1263 * pthread_create.c (start_thread): Likewise.
1264 * init.c (sighandler_setxid): Likewise.
1265 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1266 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1267 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1268 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1269 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1270 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1271 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1272 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1273 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1275 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1277 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1279 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1280 __rtld_notify): Likewise.
1281 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1282 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1283 __pthread_once): Likewise.
1284 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1285 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1286 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1287 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1288 (lll_futex_wait): Add private argument, define as wrapper around
1289 lll_futex_timed_wait.
1290 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1291 use __lll_private_flag macro.
1292 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1293 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1294 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1295 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1296 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1297 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1298 (lll_futex_wait): Add private argument, define as wrapper around
1299 lll_futex_timed_wait.
1300 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1301 use __lll_private_flag macro.
1302 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1303 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1304 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1306 (lll_futex_timed_wait, lll_futex_wake): Use it.
1307 (lll_private_futex_wait, lll_private_futex_timed_wait,
1308 lll_private_futex_wake): Removed.
1309 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1310 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1311 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1312 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1313 (lll_futex_wait): Add private argument, define as wrapper around
1314 lll_futex_timed_wait.
1315 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1316 use __lll_private_flag macro.
1317 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1318 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1320 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1321 (lll_private_futex_wait, lll_private_futex_timed_wait,
1322 lll_private_futex_wake): Removed.
1323 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1324 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1325 (lll_private_futex_wait, lll_private_futex_timed_wait,
1326 lll_private_futex_wake): Removed.
1327 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1328 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1329 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1330 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1331 (lll_futex_wait): Add private argument, define as wrapper around
1332 lll_futex_timed_wait.
1333 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1334 use __lll_private_flag macro.
1335 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1336 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1338 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1340 (lll_futex_timed_wait, lll_futex_wake): Use it.
1341 (lll_private_futex_wait, lll_private_futex_timed_wait,
1342 lll_private_futex_wake): Removed.
1344 2007-07-27 Jakub Jelinek <jakub@redhat.com>
1346 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1347 of the structure for sparc32.
1349 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
1351 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1353 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1355 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1356 code used when private futexes are assumed.
1357 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1360 2007-07-23 Jakub Jelinek <jakub@redhat.com>
1362 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1363 (__lll_private_flag): Define.
1364 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1365 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1367 (lll_private_futex_wait, lll_private_futex_timedwait,
1368 lll_private_futex_wake): Define as wrapper around non-_private
1370 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1371 (__lll_private_flag): Define.
1372 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1373 (lll_private_futex_wait, lll_private_futex_timedwait,
1374 lll_private_futex_wake): Define as wrapper around non-_private
1377 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
1379 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1380 parameter to lll_futex_wait call.
1381 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1383 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1384 Replace lll_futex_wait with lll_private_futex_wait.
1385 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1386 Add LLL_SHARED parameter to lll_futex_wake().
1388 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1389 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1390 lll_private_futex_wake.
1391 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1392 bit from private parm before syscall.
1393 (lll_futex_timed_wait): Likewise.
1394 (lll_futex_wake): Likewise.
1395 (lll_futex_wake_unlock): Likewise.
1396 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1397 (lll_robust_mutex_unlock): Likewise.
1398 (lll_mutex_unlock_force): Likewise.
1399 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1401 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1403 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1404 compilation when unconditionally using private futexes.
1405 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1406 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1408 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1409 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1411 2007-07-17 Jakub Jelinek <jakub@redhat.com>
1413 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1416 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1418 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1421 2007-05-16 Roland McGrath <roland@redhat.com>
1423 * init.c (__nptl_initial_report_events): New variable.
1424 (__pthread_initialize_minimal_internal): Initialize pd->report_events
1427 2007-06-22 Jakub Jelinek <jakub@redhat.com>
1429 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1430 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1432 2007-06-19 Ulrich Drepper <drepper@redhat.com>
1434 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1437 2007-06-18 Ulrich Drepper <drepper@redhat.com>
1439 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1440 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1441 * pthread_mutex_timedlock.c: Likewise.
1442 * pthread_mutex_trylock.c: Likewise.
1443 * pthread_mutex_unlock.c: Likewise.
1445 2007-06-17 Andreas Schwab <schwab@suse.de>
1447 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1450 2007-06-17 Ulrich Drepper <drepper@redhat.com>
1452 * allocatestack.c (allocate_stack): Make code compile if
1453 __ASSUME_PRIVATE_FUTEX is set.
1455 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1457 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1458 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1459 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1460 (__pthread_rwlock_wrlock): Likewise.
1461 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1462 (pthread_rwlock_timedrdlock): Likewise.
1463 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1464 (pthread_rwlock_timedwrlock): Likewise.
1465 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1466 (__pthread_rwlock_unlock): Likewise.
1468 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1470 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1471 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1472 Split __flags into __flags, __shared, __pad1 and __pad2.
1473 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1474 futexes if they are available.
1475 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1476 in libc-lowlevellock.S allow using private futexes.
1477 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1478 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
1479 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
1480 to call lll_futex_timed_wait. Add lll_private_futex_wait,
1481 lll_private_futex_timed_wait and lll_private_futex_wake.
1482 (lll_robust_mutex_unlock): Fix typo.
1483 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1484 field in futex command setup.
1485 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1486 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1487 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1488 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1489 if they are available. Remove clear_once_control.
1490 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1491 futexes if they are available.
1492 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1493 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1494 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1495 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1496 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1497 Wake only when there are waiters.
1498 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1499 support. Indicate that there are waiters. Remove unnecessary
1500 extra cancellation test.
1501 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
1502 left-over duplication of __sem_wait_cleanup.
1504 2007-06-07 Ulrich Drepper <drepper@redhat.com>
1506 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1507 parameter to lll_futex_wait, lll_futex_timed_wait, and
1508 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
1509 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1510 lll_private_futex_wake.
1511 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1512 * allocatestack.c: Adjust use of lll_futex_* macros.
1514 * lowlevellock.h: Likewise.
1515 * pthread_barrier_wait.c: Likewise.
1516 * pthread_cond_broadcast.c: Likewise.
1517 * pthread_cond_destroy.c: Likewise.
1518 * pthread_cond_signal.c: Likewise.
1519 * pthread_cond_timedwait.c: Likewise.
1520 * pthread_cond_wait.c: Likewise.
1521 * pthread_create.c: Likewise.
1522 * pthread_mutex_lock.c: Likewise.
1523 * pthread_mutex_setprioceiling.c: Likewise.
1524 * pthread_mutex_timedlock.c: Likewise.
1525 * pthread_mutex_unlock.c: Likewise.
1526 * pthread_rwlock_timedrdlock.c: Likewise.
1527 * pthread_rwlock_timedwrlock.c: Likewise.
1528 * pthread_rwlock_unlock.c: Likewise.
1529 * sysdeps/alpha/tls.h: Likewise.
1530 * sysdeps/i386/tls.h: Likewise.
1531 * sysdeps/ia64/tls.h: Likewise.
1532 * sysdeps/powerpc/tls.h: Likewise.
1533 * sysdeps/pthread/aio_misc.h: Likewise.
1534 * sysdeps/pthread/gai_misc.h: Likewise.
1535 * sysdeps/s390/tls.h: Likewise.
1536 * sysdeps/sh/tls.h: Likewise.
1537 * sysdeps/sparc/tls.h: Likewise.
1538 * sysdeps/unix/sysv/linux/fork.c: Likewise.
1539 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1540 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1541 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1542 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1543 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1544 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1545 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1546 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1547 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1549 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1550 * sysdeps/x86_64/tls.h: Likewise.
1552 2007-05-29 Ulrich Drepper <drepper@redhat.com>
1554 * pthread_getattr_np.c: No need to install a cancellation handler,
1555 this is no cancellation point.
1556 * pthread_getschedparam.c: Likewise.
1557 * pthread_setschedparam.c: Likewise.
1558 * pthread_setschedprio.c: Likewise.
1559 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1561 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1562 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1563 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1564 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1565 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1566 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1567 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1568 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1569 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1570 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1571 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1572 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1574 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1575 whether there are more than one thread makes no sense here since
1576 we only call the slow path if the locks are taken.
1577 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1579 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1580 COND_NWAITERS_SHIFT.
1581 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1583 * pthread_cond_init.c: Likewise.
1584 * pthread_cond_timedwait.c: Likewise.
1585 * pthread_cond_wait.c: Likewise.
1586 * pthread_condattr_getclock.c: Likewise.
1587 * pthread_condattr_setclock.c: Likewise.
1588 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1589 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1590 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1591 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1592 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1594 2007-05-28 Jakub Jelinek <jakub@redhat.com>
1596 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1599 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1601 (THREAD_GSCOPE_GET_FLAG): Remove.
1602 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1603 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1605 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1606 (THREAD_GSCOPE_GET_FLAG): Remove.
1607 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1608 instead of THREAD_GSCOPE_GET_FLAG.
1609 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
1611 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1612 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1613 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1614 THREAD_GSCOPE_WAIT): Define.
1615 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1616 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1617 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1618 THREAD_GSCOPE_WAIT): Define.
1619 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1620 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1621 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1622 THREAD_GSCOPE_WAIT): Define.
1623 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1624 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1625 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1626 THREAD_GSCOPE_WAIT): Define.
1628 2007-05-24 Richard Henderson <rth@redhat.com>
1630 * descr.h (struct pthread): Add header.gscope_flag.
1631 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1632 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1633 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1634 THREAD_GSCOPE_WAIT): Define.
1636 2007-05-27 Ulrich Drepper <drepper@redhat.com>
1638 * init.c: Make it compile with older kernel headers.
1640 * tst-initializers1.c: Show through exit code which test failed.
1642 * pthread_rwlock_init.c: Also initialize __shared field.
1643 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1644 element in rwlock structure into four byte elements. One of them is
1645 the new __shared element.
1646 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1648 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1649 __shared, adjust names of other padding elements.
1650 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1651 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1652 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1653 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1655 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1656 futex to use private operations if possible.
1657 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1659 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1661 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1662 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1663 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1664 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1666 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1668 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1669 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1671 2007-05-26 Ulrich Drepper <drepper@redhat.com>
1673 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1674 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1675 * pthread_rwlock_timedrdlock.c: Likewise.
1676 * pthread_rwlock_tryrdlock.c: Likewise.
1678 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1681 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1682 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1683 duplication of __sem_wait_cleanup.
1685 * allocatestack.c: Revert last change.
1687 * sysdeps/i386/tls.h: Likewise.
1688 * sysdeps/x86_64/tls.h: Likewise.
1689 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1691 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1693 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1695 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1696 * pthread_barrier_init.c: Set private flag if pshared and private
1697 futexes are supported.
1698 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1699 private field in futex command setup.
1700 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1702 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1704 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1706 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1707 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1708 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1709 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1710 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1712 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1713 * sem_init.c (__new_sem_init): Rewrite to initialize all three
1714 fields in the structure.
1715 (__old_sem_init): New function.
1716 * sem_open.c: Initialize all fields of the structure.
1717 * sem_getvalue.c: Adjust for renamed element.
1718 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1719 (gen-as-const-headers): Add structsem.sym.
1720 * sysdeps/unix/sysv/linux/structsem.sym: New file.
1721 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1722 struct new_sem. Add struct old_sem.
1723 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1724 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1725 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1726 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1727 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1728 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1729 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1730 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1731 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1732 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1733 * tst-sem10.c: New file.
1734 * tst-sem11.c: New file.
1735 * tst-sem12.c: New file.
1736 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1739 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1740 Jakub Jelinek <jakub@redhat.com>
1742 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1743 Move __pthread_enable_asynccancel right before futex syscall.
1744 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1747 2007-05-24 Jakub Jelinek <jakub@redhat.com>
1749 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1750 THREAD_COPY_PRIVATE_FUTEX): Define.
1751 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1752 THREAD_COPY_PRIVATE_FUTEX): Define.
1753 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1754 * init.c (__pthread_initialize_minimal_internal): Use
1755 THREAD_SET_PRIVATE_FUTEX.
1757 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1758 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1759 THREAD_GSCOPE_FLAG_WAIT): Define.
1760 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1761 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1762 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1764 (THREAD_GSCOPE_GET_FLAG): Define.
1765 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1766 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1767 instead of ->header.gscope_flag directly.
1769 2007-05-23 Ulrich Drepper <drepper@redhat.com>
1771 * init.c (__pthread_initialize_minimal_internal): Check whether
1772 private futexes are available.
1773 * allocatestack.c (allocate_stack): Copy private_futex field from
1774 current thread into the new stack.
1775 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1776 futexes if they are available.
1777 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1778 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1779 in libc-lowlevellock.S allow using private futexes.
1780 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1781 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1783 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1784 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1785 if they are available.
1786 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1787 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1788 * sysdeps/i386/tcb-offsets.sym: Likewise.
1789 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1790 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1792 2007-05-21 Ulrich Drepper <drepper@redhat.com>
1794 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1795 Remove ptr_wait_lookup_done again.
1796 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1797 (__pthread_initialize_minimal_internal): Initialize
1798 _dl_wait_lookup_done pointer in _rtld_global directly.
1799 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1800 Remove code to code _dl_wait_lookup_done.
1801 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1804 2007-05-21 Jakub Jelinek <jakub@redhat.com>
1806 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1807 pthread_mutex_init failed with ENOTSUP.
1809 2007-05-19 Ulrich Drepper <drepper@redhat.com>
1811 * allocatestack.c (__wait_lookup_done): New function.
1812 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1813 Add ptr_wait_lookup_done.
1814 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1815 * pthreadP.h: Declare __wait_lookup_done.
1816 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1817 Define macros to implement reference handling of global scope.
1818 * sysdeps/x86_64/tls.h: Likewise.
1819 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1820 Initialize GL(dl_wait_lookup_done).
1822 2007-05-17 Ulrich Drepper <drepper@redhat.com>
1825 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1827 * pthread_mutex_timedlock.c: Likewise.
1828 * pthread_mutex_trylock.c: Likewise.
1829 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1831 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1832 * tst-robust9.c: New file.
1833 * tst-robustpi9.c: New file.
1835 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1836 unnecessary extra cancellation test.
1838 2007-05-14 Ulrich Drepper <drepper@redhat.com>
1840 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1841 extra cancellation test.
1842 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1844 2007-05-10 Ulrich Drepper <drepper@redhat.com>
1846 * descr.h (struct pthread): Rearrange members to fill hole in
1849 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1850 (__pthread_setaffinity_new): If syscall was successful and
1851 RESET_VGETCPU_CACHE is defined, use it before returning.
1852 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1854 2007-05-10 Jakub Jelinek <jakub@redhat.com>
1857 * tst-align2.c: Include stackinfo.h.
1858 * tst-getpid1.c: Likewise.
1860 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
1863 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1864 * tst-getpid1.c (do_test): Likewise.
1867 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1868 (allocate_stack): Likewise.
1870 2007-05-07 Ulrich Drepper <drepper@redhat.com>
1872 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1873 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1874 (__lll_robust_timedlock_wait): Likewise.
1875 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1877 2007-05-06 Mike Frysinger <vapier@gentoo.org>
1880 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1881 * tst-cancel4.c (tf_fdatasync): New test.
1883 2007-04-27 Ulrich Drepper <drepper@redhat.com>
1886 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1887 check mutexes like normal mutexes.
1890 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1891 Initialize the whole sigevent structure to appease valgrind.
1893 2007-04-25 Ulrich Drepper <drepper@redhat.com>
1895 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1896 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1898 2007-04-06 Ulrich Drepper <drepper@redhat.com>
1900 * tst-locale1.c: Avoid warnings.
1901 * tst-locale2.c: Likewise.
1903 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
1905 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1906 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1908 2007-03-16 Jakub Jelinek <jakub@redhat.com>
1910 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1911 __extern_always_inline where appropriate.
1912 * sysdeps/pthread/pthread.h: Likewise.
1914 2007-03-13 Richard Henderson <rth@redhat.com>
1916 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1917 separate cfi regions for the two subsections.
1919 2007-02-25 Ulrich Drepper <drepper@redhat.com>
1921 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1922 new thread, don't just decrement it.
1923 Patch by Suzuki K P <suzuki@in.ibm.com>.
1925 2007-02-21 Ulrich Drepper <drepper@redhat.com>
1927 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1928 PTHFCT_CALL definition.
1930 2007-02-18 Ulrich Drepper <drepper@redhat.com>
1932 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1933 available, don't use it.
1935 2007-02-09 Jakub Jelinek <jakub@redhat.com>
1937 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1938 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1939 call into the kernel to delay.
1941 2007-01-18 Ulrich Drepper <drepper@redhat.com>
1943 * tst-initializers1.c: We want to test the initializers as seen
1944 outside of libc, so undefined _LIBC.
1946 * pthread_join.c (cleanup): Avoid warning.
1948 2007-01-17 Ulrich Drepper <drepper@redhat.com>
1950 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1951 (__lll_timedwait_tid): Add unwind info.
1953 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1954 function table, mangle the pointers.
1955 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1956 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1957 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1958 demangle pointers before use.
1959 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1961 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1962 * sysdeps/pthread/setxid.h: Likewise.
1964 2007-01-12 Ulrich Drepper <drepper@redhat.com>
1966 * tst-rwlock7.c: Show some more information in case of correct
1969 2007-01-11 Ulrich Drepper <drepper@redhat.com>
1971 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1972 (lll_futex_timed_wait): Undo part of last change, don't negate
1975 2007-01-10 Ulrich Drepper <drepper@redhat.com>
1977 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
1978 FUTEX_CMP_REQUEUE and lll_futex_requeue.
1980 2006-12-28 David S. Miller <davem@davemloft.net>
1982 * shlib-versions: Fix sparc64 linux target specification.
1984 2007-01-10 Jakub Jelinek <jakub@redhat.com>
1986 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1987 Adjust include path for pthread_barrier_wait.c move.
1989 2006-12-21 Jakub Jelinek <jakub@redhat.com>
1991 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1992 tid isn't reread from pd->tid in between ESRCH test and the syscall.
1994 2006-12-06 Jakub Jelinek <jakub@redhat.com>
1996 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1997 6 argument cancellable syscalls.
1998 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1999 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2000 6 argument cancellable syscalls.
2001 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2003 2006-12-09 Ulrich Drepper <drepper@redhat.com>
2005 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2006 (__rtld_mrlock_initialize): Add missing closing parenthesis.
2008 2006-10-30 Jakub Jelinek <jakub@redhat.com>
2010 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2011 __sync_lock_release instead of __sync_lock_release_si.
2013 2006-10-29 Jakub Jelinek <jakub@redhat.com>
2015 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2017 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2018 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2019 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2020 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2021 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2022 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2023 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2024 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2025 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2026 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2027 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2029 2006-10-27 Ulrich Drepper <drepper@redhat.com>
2031 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2032 * pthread_barrier_wait.c: ...here.
2033 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2034 * pthread_cond_broadcast.c: ...here.
2035 * sysdeps/pthread/pthread_cond_signal.c: Move to...
2036 * pthread_cond_signal.c: ...here.
2037 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2038 * pthread_cond_timedwait.c: ...here.
2039 * sysdeps/pthread/pthread_cond_wait.c: Move to...
2040 * pthread_cond_wait.c: ...here.
2041 * sysdeps/pthread/pthread_once.c: Move to...
2042 * pthread_once.c: ...here.
2043 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2044 * pthread_rwlock_rdlock.c: ...here.
2045 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2046 * pthread_rwlock_timedrdlock.c: ...here.
2047 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2048 * pthread_rwlock_timedwrlock.c: ...here.
2049 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2050 * pthread_rwlock_unlock.c: ...here.
2051 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2052 * pthread_rwlock_wrlock.c: ...here.
2053 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2054 * pthread_spin_destroy.c: ...here.
2055 * sysdeps/pthread/pthread_spin_init.c: Move to...
2056 * pthread_spin_init.c: ...here.
2057 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2058 * pthread_spin_unlock.c: ...here.
2059 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2060 * pthread_getcpuclockid.c: ...here.
2062 * init.c: USE_TLS support is now always enabled.
2063 * tst-tls5.h: Likewise.
2064 * sysdeps/alpha/tls.h: Likewise.
2065 * sysdeps/i386/tls.h: Likewise.
2066 * sysdeps/ia64/tls.h: Likewise.
2067 * sysdeps/powerpc/tls.h: Likewise.
2068 * sysdeps/s390/tls.h: Likewise.
2069 * sysdeps/sh/tls.h: Likewise.
2070 * sysdeps/sparc/tls.h: Likewise.
2071 * sysdeps/x86_64/tls.h: Likewise.
2073 2006-10-27 Jakub Jelinek <jakub@redhat.com>
2075 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2076 __rtld_mrlock_change): Update oldval if atomic compare and exchange
2079 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2080 Define to THREAD_SELF->header.multiple_threads.
2081 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2083 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2085 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2086 (SINGLE_THREAD_P): Likewise.
2087 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2088 (SINGLE_THREAD_P): Likewise.
2089 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2090 (SINGLE_THREAD_P): Likewise.
2091 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2092 (SINGLE_THREAD_P): Likewise.
2093 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2095 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2096 (SINGLE_THREAD_P): Likewise.
2097 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2098 (SINGLE_THREAD_P): Likewise.
2099 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2102 2006-10-26 Jakub Jelinek <jakub@redhat.com>
2104 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2105 by default rather than 2_3_3.
2107 2006-10-17 Jakub Jelinek <jakub@redhat.com>
2109 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2110 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2111 atomic_* instead of catomic_* macros.
2113 2006-10-12 Ulrich Drepper <drepper@redhat.com>
2116 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2117 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2118 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2119 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2120 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2121 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2122 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2123 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2124 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2125 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2126 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2127 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2128 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2130 2006-10-11 Ulrich Drepper <drepper@redhat.com>
2132 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2133 cancelable syscalls with six parameters.
2135 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2136 operations instead of atomic_*.
2138 2006-10-09 Ulrich Drepper <drepper@redhat.com>
2140 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2142 2006-10-07 Ulrich Drepper <drepper@redhat.com>
2144 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2145 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2146 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2148 * pthread_attr_setstack.c: Allow overwriting the version number of the
2150 * pthread_attr_setstacksize.c: Likewise.
2151 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2153 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2154 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2156 2006-09-24 Ulrich Drepper <drepper@redhat.com>
2159 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2160 Patch by Petr Baudis.
2162 2006-09-18 Jakub Jelinek <jakub@redhat.com>
2164 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2166 * tst-cancel2.c (tf): Loop as long as something was written.
2168 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2170 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2171 mutexes wake all mutexes.
2172 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2173 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2174 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2176 2006-09-12 Ulrich Drepper <drepper@redhat.com>
2178 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2179 to guarantee the thread is always canceled.
2181 2006-09-08 Jakub Jelinek <jakub@redhat.com>
2183 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2185 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2186 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
2187 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2188 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2189 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2191 2006-09-08 Ulrich Drepper <drepper@redhat.com>
2194 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2195 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2196 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2197 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2198 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2199 * Makefile (tests): Add tst-cond22.
2200 * tst-cond22.c: New file.
2202 2006-09-05 Ulrich Drepper <drepper@redhat.com>
2205 * descr.h (struct pthread): Add parent_cancelhandling.
2206 * sysdeps/pthread/createthread.c (create_thread): Pass parent
2207 cancelhandling value to child.
2208 * pthread_create.c (start_thread): If parent thread was canceled
2209 reset the SIGCANCEL mask.
2210 * Makefile (tests): Add tst-cancel25.
2211 * tst-cancel25.c: New file.
2213 2006-09-05 Jakub Jelinek <jakub@redhat.com>
2214 Ulrich Drepper <drepper@redhat.com>
2216 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2217 counterp if it is already zero.
2218 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2220 2006-03-04 Jakub Jelinek <jakub@redhat.com>
2221 Roland McGrath <roland@redhat.com>
2223 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2224 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2225 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): 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/i386/i486/lowlevellock.S: Add unwind info.
2232 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2234 2006-03-03 Jakub Jelinek <jakub@redhat.com>
2235 Roland McGrath <roland@redhat.com>
2237 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2238 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2239 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2240 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2241 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2242 lll_robust_mutex_timedlock, lll_mutex_unlock,
2243 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2244 Add _L_*_ symbols around the subsection.
2245 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2246 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2248 2006-08-31 Ulrich Drepper <drepper@redhat.com>
2250 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2251 change because it can disturb too much existing code. If real hard
2252 reader preference is needed we'll introduce another type.
2253 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2254 (pthread_rwlock_timedwrlock): Likewise.
2255 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2258 2006-08-30 Ulrich Drepper <drepper@redhat.com>
2260 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2262 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2263 (pthread_rwlock_timedwrlock): Likewise.
2264 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2267 2006-08-25 Jakub Jelinek <jakub@redhat.com>
2269 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2270 Only define ifdef SHARED.
2272 2006-08-23 Ulrich Drepper <drepper@redhat.com>
2274 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2275 (free_stacks): ...here.
2276 (__free_stack_cache): New function.
2277 * pthreadP.h: Declare __free_stack_cache.
2278 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2280 * init.c (pthread_functions): Initialize ptr_freeres.
2281 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2282 New freeres function.
2284 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
2287 * Makefile (extra-objs): Add modules to extra-test-objs instead.
2289 2006-08-20 Ulrich Drepper <drepper@redhat.com>
2291 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2292 _XOPEN_REALTIME_THREADS.
2294 2006-08-15 Jakub Jelinek <jakub@redhat.com>
2296 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2297 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2298 HAVE_CLOCK_GETTIME_VSYSCALL.
2299 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2301 2006-08-14 Jakub Jelinek <jakub@redhat.com>
2303 * sysdeps/unix/sysv/linux/bits/posix_opt.h
2304 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2305 * descr.h (struct priority_protection_data): New type.
2306 (struct pthread): Add tpp field.
2307 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2308 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2309 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2310 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2312 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2313 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2314 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2315 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2317 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2319 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2320 * pthread_mutexattr_getprioceiling.c
2321 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2322 in the SCHED_FIFO priority range.
2323 * pthread_mutexattr_setprioceiling.c
2324 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2325 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2326 if mutex is not TPP. Ceiling is now in __data.__lock.
2327 * pthread_mutex_setprioceiling.c: Include stdbool.h.
2328 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
2329 is now in __data.__lock. Add locking.
2330 * pthread_create.c (__free_tcb): Free pd->tpp structure.
2331 * Makefile (libpthread-routines): Add tpp.
2332 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2333 * tst-tpp.h: New file.
2334 * tst-mutexpp1.c: New file.
2335 * tst-mutexpp6.c: New file.
2336 * tst-mutexpp10.c: New file.
2337 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2338 * tst-mutex6.c (TEST_FUNCTION): Likewise.
2340 2006-08-12 Ulrich Drepper <drepper@redhat.com>
2343 * pthread_join.c (pthread_join): Account for self being canceled
2344 when checking for deadlocks.
2345 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
2346 (tf1): Don't print anything after pthread_join returns, this would be
2347 another cancellation point.
2349 * tst-join6.c: New file.
2350 * Makefile (tests): Add tst-join6.
2352 2006-08-03 Ulrich Drepper <drepper@redhat.com>
2355 * pthread_setspecific.c (__pthread_setspecific): Check
2356 out-of-range index before checking for unused key.
2358 * sysdeps/pthread/gai_misc.h: New file.
2360 2006-08-01 Ulrich Drepper <drepper@redhat.com>
2362 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
2363 file. Don't use sysctl.
2364 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
2365 overwrite the file if this is likely not true.
2367 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
2369 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2370 * Makefile (tests): Add tst-getpid3.
2371 * tst-getpid3.c: New file.
2373 2006-07-30 Roland McGrath <roland@redhat.com>
2375 * Makefile (libpthread-routines): Add ptw-sigsuspend.
2377 * sysdeps/unix/sysv/linux/i386/not-cancel.h
2378 (pause_not_cancel): New macro.
2379 (nanosleep_not_cancel): New macro.
2380 (sigsuspend_not_cancel): New macro.
2381 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2382 nanosleep_not_cancel macro from <not-cancel.h>.
2383 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2384 macro from <not-cancel.h>.
2386 2006-07-28 Ulrich Drepper <drepper@redhat.com>
2387 Jakub Jelinek <jakub@redhat.com>
2389 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2390 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
2391 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2392 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2393 * pthread_mutex_init.c: Add support for priority inheritance mutex.
2394 * pthread_mutex_lock.c: Likewise.
2395 * pthread_mutex_timedlock.c: Likewise.
2396 * pthread_mutex_trylock.c: Likewise.
2397 * pthread_mutex_unlock.c: Likewise.
2398 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2400 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2401 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2402 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2403 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2404 pthread-pi-defines.sym.
2405 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2406 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2407 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2408 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2409 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2410 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2411 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2412 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2413 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2414 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2415 _POSIX_THREAD_PRIO_INHERIT to 200112L.
2416 * tst-mutex1.c: Adjust to allow use in PI mutex test.
2417 * tst-mutex2.c: Likewise.
2418 * tst-mutex3.c: Likewise.
2419 * tst-mutex4.c: Likewise.
2420 * tst-mutex5.c: Likewise.
2421 * tst-mutex6.c: Likewise.
2422 * tst-mutex7.c: Likewise.
2423 * tst-mutex7a.c: Likewise.
2424 * tst-mutex8.c: Likewise.
2425 * tst-mutex9.c: Likewise.
2426 * tst-robust1.c: Likewise.
2427 * tst-robust7.c: Likewise.
2428 * tst-robust8.c: Likewise.
2429 * tst-mutexpi1.c: New file.
2430 * tst-mutexpi2.c: New file.
2431 * tst-mutexpi3.c: New file.
2432 * tst-mutexpi4.c: New file.
2433 * tst-mutexpi5.c: New file.
2434 * tst-mutexpi6.c: New file.
2435 * tst-mutexpi7.c: New file.
2436 * tst-mutexpi7a.c: New file.
2437 * tst-mutexpi8.c: New file.
2438 * tst-mutexpi9.c: New file.
2439 * tst-robust1.c: New file.
2440 * tst-robust2.c: New file.
2441 * tst-robust3.c: New file.
2442 * tst-robust4.c: New file.
2443 * tst-robust5.c: New file.
2444 * tst-robust6.c: New file.
2445 * tst-robust7.c: New file.
2446 * tst-robust8.c: New file.
2447 * Makefile (tests): Add the new tests.
2449 * pthread_create.c (start_thread): Add some casts to avoid warnings.
2450 * pthread_mutex_destroy.c: Remove unneeded label.
2452 2006-07-01 Ulrich Drepper <drepper@redhat.com>
2454 * pthread_mutex_init.c (__pthread_mutex_init): Move some
2455 computations to compile time.
2457 2006-06-04 Ulrich Drepper <drepper@redhat.com>
2459 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2461 2006-05-15 Ulrich Drepper <drepper@redhat.com>
2463 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2465 2006-05-11 Ulrich Drepper <drepper@redhat.com>
2467 * pthread_key_create.c (__pthread_key_create): Do away with
2468 __pthread_keys_lock.
2470 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2471 (__kernel_cpumask_size): Mark as hidden.
2472 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2474 * sem_open.c (__sem_mappings_lock): Mark as hidden.
2475 * semaphoreP.h (__sem_mappings_lock): Likewise.
2477 2006-05-10 Ulrich Drepper <drepper@redhat.com>
2479 * pthread_atfork.c: Mark __dso_handle as hidden.
2481 2006-05-09 Ulrich Drepper <drepper@redhat.com>
2484 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2485 the reload problem. Change the one path in pthread_cancel_init
2486 which causes the problem. Force gcc to reload. Simplify callers.
2487 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2488 (_Unwind_GetBSP): Undo last patch.
2490 2006-05-07 Ulrich Drepper <drepper@redhat.com>
2492 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2493 function pointer is reloaded after pthread_cancel_init calls.
2496 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2497 pointers are reloaded after pthread_cancel_init calls.
2499 2006-05-01 Ulrich Drepper <drepper@redhat.com>
2501 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2504 2006-04-27 Ulrich Drepper <drepper@redhat.com>
2506 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2507 Allocate new object which is passed to timer_sigev_thread so that
2508 the timer can be deleted before the new thread is scheduled.
2510 2006-04-26 Roland McGrath <roland@redhat.com>
2512 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2514 2006-04-08 Ulrich Drepper <drepper@redhat.com>
2516 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2517 suffix for conditional jumps.
2518 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2519 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2520 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2521 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2522 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2523 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2525 * init.c (sigcancel_handler): Compare with correct PID even if the
2526 thread is in the middle of a fork call.
2527 (sighandler_setxid): Likewise.
2528 Reported by Suzuki K P <suzuki@in.ibm.com> .
2530 2006-04-07 Jakub Jelinek <jakub@redhat.com>
2532 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2534 2006-04-06 Ulrich Drepper <drepper@redhat.com>
2536 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2537 fails [Coverity CID 105].
2539 2006-04-05 Ulrich Drepper <drepper@redhat.com>
2541 * sysdeps/pthread/pthread.h: Add nonnull attributes.
2543 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
2546 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2547 Define __lll_rel_instr using lwsync.
2549 2006-03-27 Ulrich Drepper <drepper@redhat.com>
2551 * allocatestack.c (allocate_stack): Always initialize robust_head.
2552 * descr.h: Define struct robust_list_head.
2553 (struct pthread): Use robust_list_head in robust mutex list definition.
2554 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2555 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2556 (__pthread_initialize_minimal_internal): Register robust_list with
2558 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2559 Declare __set_robust_list_avail.
2560 * pthread_create.c (start_thread): Register robust_list of new thread.
2561 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2563 * pthread_mutex_destroy.c: For robust mutexes don't look at the
2564 number of users, it's unreliable.
2565 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2566 set_robust_list syscall is available.
2567 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2568 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2569 Set robust_head.list_op_pending before trying to lock a robust mutex.
2570 * pthread_mutex_timedlock.c: Likewise.
2571 * pthread_mutex_trylock.c: Likewise.
2572 * pthread_mutex_unlock.c: Likewise for unlocking.
2573 * Makefile (tests): Add tst-robust8.
2574 * tst-robust8.c: New file.
2576 2006-03-08 Andreas Schwab <schwab@suse.de>
2578 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2579 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2581 2006-03-05 Roland McGrath <roland@redhat.com>
2583 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2584 and $config_os doesn't match *linux*.
2586 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
2588 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2589 Use __syscall_error.
2590 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2591 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2592 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2593 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2594 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2595 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2597 2006-03-02 Ulrich Drepper <drepper@redhat.com>
2599 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2601 2006-03-01 Ulrich Drepper <drepper@redhat.com>
2603 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2604 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2606 (__lll_robust_timedlock_wait): Likewise.
2607 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2608 (__lll_robust_lock_wait): Likewise.
2609 (__lll_robust_timedlock_wait): Likewise.
2610 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2611 (__lll_robust_lock_wait): Likewise.
2612 (__lll_robust_timedlock_wait): Likewise.
2614 2006-03-01 Jakub Jelinek <jakub@redhat.com>
2616 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2617 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2618 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2619 lll_robust_mutex_unlock): Define.
2620 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2622 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
2624 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2625 instead of <clone.S>.
2627 2006-02-27 Jakub Jelinek <jakub@redhat.com>
2629 * Makefile (libpthread-routines): Add
2630 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2631 and pthread_mutex_[sg]etprioceiling.
2632 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2633 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2634 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2635 pthread_mutex_setprioceiling.
2636 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2637 PTHREAD_PRIO_PROTECT): New enum values.
2638 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2639 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2640 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2642 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2643 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2644 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2646 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2647 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2648 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2649 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2650 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2651 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2652 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2654 * pthread_mutex_getprioceiling.c: New file.
2655 * pthread_mutex_setprioceiling.c: New file.
2656 * pthread_mutexattr_getprioceiling.c: New file.
2657 * pthread_mutexattr_setprioceiling.c: New file.
2658 * pthread_mutexattr_getprotocol.c: New file.
2659 * pthread_mutexattr_setprotocol.c: New file.
2661 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2663 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2665 2006-02-27 Roland McGrath <roland@redhat.com>
2667 * sysdeps/pthread/Subdirs: List nptl here too.
2668 * configure (libc_add_on_canonical): New variable.
2670 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2672 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2673 self to get main source tree's file.
2674 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2675 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2676 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2677 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2678 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2679 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2680 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2681 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2682 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2683 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2684 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2685 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2686 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2688 * Makefile: Use $(sysdirs) in vpath directive.
2690 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2691 (CPPFLAGS-timer_routines.c): Likewise.
2693 * Makeconfig (includes): Variable removed.
2695 2006-02-26 Roland McGrath <roland@redhat.com>
2697 * sysdeps/generic/pt-raise.c: Moved to ...
2698 * pt-raise.c: ... here.
2699 * sysdeps/generic/lowlevellock.h: Moved to ...
2700 * lowlevellock.h: ... here.
2702 2006-02-23 Roland McGrath <roland@redhat.com>
2704 * descr.h (struct pthread): Add final member `end_padding'.
2705 (PTHREAD_STRUCT_END_PADDING): Use it.
2707 2006-02-20 Roland McGrath <roland@redhat.com>
2709 * sysdeps/mips: Directory removed, saved in ports repository.
2710 * sysdeps/unix/sysv/linux/mips: Likewise.
2712 2006-02-18 Ulrich Drepper <drepper@redhat.com>
2714 * tst-robust1.c: Add second mutex to check that the mutex list is
2717 2006-02-17 Jakub Jelinek <jakub@redhat.com>
2719 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2720 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2721 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2722 lll_robust_mutex_unlock): New macros.
2723 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2724 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2725 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2726 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2727 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2729 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2731 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2733 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2735 2006-02-17 Ulrich Drepper <drepper@redhat.com>
2737 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2738 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2739 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2740 (lll_robust_mutex_unlock): Likewise.
2742 2006-02-13 Jakub Jelinek <jakub@redhat.com>
2744 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2745 Set robust_list.__next rather than robust_list.
2746 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2747 (__pthread_list_t): New typedef.
2748 (pthread_mutex_t): Replace __next and __prev fields with __list.
2749 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2750 (__pthread_list_t): New typedef.
2751 (pthread_mutex_t): Replace __next and __prev fields with __list.
2752 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2753 (__pthread_list_t, __pthread_slist_t): New typedefs.
2754 (pthread_mutex_t): Replace __next and __prev fields with __list.
2755 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2756 (__pthread_list_t, __pthread_slist_t): New typedefs.
2757 (pthread_mutex_t): Replace __next and __prev fields with __list.
2758 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2759 (__pthread_list_t, __pthread_slist_t): New typedefs.
2760 (pthread_mutex_t): Replace __next and __prev fields with __list.
2761 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2762 (__pthread_slist_t): New typedef.
2763 (pthread_mutex_t): Replace __next field with __list.
2765 2006-02-15 Ulrich Drepper <drepper@redhat.com>
2767 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2768 PTHREAD_MUTEX_OWNERDEAD.
2769 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2770 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2771 * Makefile (libpthread-routines): Add lowlevelrobustlock.
2772 * pthread_create.c (start_thread): Very much simplify robust_list loop.
2773 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2774 to PTHREAD_MUTEX_INCONSISTENT.
2775 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2776 * pthread_mutex_lock.c: Reimplement robust mutex handling.
2777 * pthread_mutex_trylock.c: Likewise.
2778 * pthread_mutex_timedlock.c: Likewise.
2779 * pthread_mutex_unlock.c: Likewise.
2780 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2781 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2782 lowlevelrobustlock.sym.
2783 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2784 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2786 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2787 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2788 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2789 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2790 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2792 2006-02-12 Ulrich Drepper <drepper@redhat.com>
2794 * allocatestack.c (allocate_stack): Initialize robust_list.
2795 * init.c (__pthread_initialize_minimal_internal): Likewise.
2796 * descr.h (struct xid_command): Pretty printing.
2797 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2798 robust_list. Adjust macros.
2799 * pthread_create.c (start_thread): Adjust robust_list handling.
2800 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2801 but the owner for all robust mutex types.
2802 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2803 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
2804 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2805 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2807 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2808 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2810 2006-02-08 Jakub Jelinek <jakub@redhat.com>
2812 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2813 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2815 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2817 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2819 (lll_futex_timed_wait): Define.
2821 2006-01-19 Ulrich Drepper <drepper@redhat.com>
2823 * tst-cancel4.c: Test ppoll.
2825 2006-01-18 Andreas Jaeger <aj@suse.de>
2828 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2829 (pthread_mutex_t): Follow changes for other archs. Based on patch
2830 by Jim Gifford <patches@jg555.com>.
2832 2006-01-13 Richard Henderson <rth@redhat.com>
2834 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2836 2006-01-10 Roland McGrath <roland@redhat.com>
2838 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2839 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2840 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2841 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2842 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2843 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2844 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2845 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2846 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2847 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2849 2006-01-09 Roland McGrath <roland@redhat.com>
2851 * tst-initializers1-c89.c: New file.
2852 * tst-initializers1-c99.c: New file.
2853 * tst-initializers1-gnu89.c: New file.
2854 * tst-initializers1-gnu99.c: New file.
2855 * Makefile (tests): Add them.
2856 (CFLAGS-tst-initializers1-c89.c): New variable.
2857 (CFLAGS-tst-initializers1-c99.c): New variable.
2858 (CFLAGS-tst-initializers1-gnu89.c): New variable.
2859 (CFLAGS-tst-initializers1-gnu99.c): New variable.
2861 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2862 Use __extension__ on anonymous union definition.
2863 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2864 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2865 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2866 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2867 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2869 2006-01-08 Jakub Jelinek <jakub@redhat.com>
2871 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2872 Don't give the union a name because it changes the mangled name.
2873 Instead name the struct for __data.
2874 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2876 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2879 2006-01-09 Jakub Jelinek <jakub@redhat.com>
2881 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2882 stack bias to mc_ftp field.
2884 2006-01-07 Ulrich Drepper <drepper@redhat.com>
2886 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2887 being too clever and reloading the futex value where it shouldn't.
2889 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2891 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2894 2006-01-06 Jakub Jelinek <jakub@redhat.com>
2896 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2899 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2901 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2902 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2903 rename in tcbhead_t.
2905 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2906 Don't give the union a name because it changes the mangled name.
2907 Instead name the struct for __data.
2908 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2909 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2910 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2911 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2912 * pthread_create.c (start_thread): Adjust robust mutex free loop.
2913 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2915 2006-01-05 Ulrich Drepper <drepper@redhat.com>
2917 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2919 (lll_futex_timed_wait): Define.
2920 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2921 * sysdeps/pthread/aio_misc.h: New file.
2923 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
2925 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2927 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
2929 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2930 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2931 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2933 2006-01-04 Ulrich Drepper <drepper@redhat.com>
2935 * tst-cancel24.cc: Use C headers instead of C++ headers.
2937 2006-01-03 Jakub Jelinek <jakub@redhat.com>
2939 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2940 sparc-linux configured glibc.
2941 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2942 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2943 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2944 atomic_compare_and_exchange_val_24_acq instead of
2945 atomic_compare_and_exchange_val_acq.
2946 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2947 instead of atomic_exchange_rel.
2948 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2949 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2951 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2953 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2954 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2955 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2956 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2957 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2958 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2960 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2962 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2963 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2964 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2966 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2968 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2970 2006-01-03 Ulrich Drepper <drepper@redhat.com>
2972 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2975 2006-01-02 Jakub Jelinek <jakub@redhat.com>
2977 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2978 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2979 THREAD_COPY_POINTER_GUARD): Define.
2980 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2981 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2983 2006-01-01 Ulrich Drepper <drepper@redhat.com>
2985 * version.c: Update copyright year.
2987 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2989 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2990 .eh_frame section, use cfi_* directives.
2991 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2993 2005-12-30 Ulrich Drepper <drepper@redhat.com>
2995 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2998 2005-12-29 Ulrich Drepper <drepper@redhat.com>
3000 * sysdeps/pthread/sigaction.c: Removed.
3001 * sigaction.c: New file.
3002 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3004 2005-12-28 Ulrich Drepper <drepper@redhat.com>
3006 * Makefile (tests): Add tst-signal7.
3007 * tst-signal7.c: New file.
3009 2005-12-27 Roland McGrath <roland@redhat.com>
3011 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3012 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3013 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3014 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3015 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3016 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3017 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3018 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3019 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3020 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3021 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3023 2005-12-27 Jakub Jelinek <jakub@redhat.com>
3025 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3026 and __prev field to pthread_mutex_t.
3027 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3028 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3029 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3030 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3031 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3034 2005-12-26 Ulrich Drepper <drepper@redhat.com>
3036 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3037 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3038 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3039 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3040 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3041 and PTHREAD_MUTEXATTR_FLAG_BITS.
3042 * descr.h (struct pthread): Add robust_list field and define
3043 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3044 * pthread_mutexattr_getrobust.c: New file.
3045 * pthread_mutexattr_setrobust.c: New file.
3046 * pthread_mutex_consistent.c: New file.
3047 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3048 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3049 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3050 Adjust pthread_mutex_t initializers.
3051 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3052 field to pthread_mutex_t.
3053 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3054 and __prev field to pthread_mutex_t.
3055 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3056 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3057 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3058 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3059 * pthread_mutexattr_gettype.c: Likewise.
3060 * pthread_mutexattr_setpshared.c: Likewise.
3061 * pthread_mutexattr_settype.c: Likewise.
3062 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3063 Initialize mutex kind according to robust flag.
3064 * pthread_mutex_lock.c: Implement local robust mutex.
3065 * pthread_mutex_timedlock.c: Likewise.
3066 * pthread_mutex_trylock.c: Likewise.
3067 * pthread_mutex_unlock.c: Likewise.
3068 * pthread_create.c (start_thread): Mark robust mutexes which remained
3070 * tst-robust1.c: New file.
3071 * tst-robust2.c: New file.
3072 * tst-robust3.c: New file.
3073 * tst-robust4.c: New file.
3074 * tst-robust5.c: New file.
3075 * tst-robust6.c: New file.
3076 * tst-robust7.c: New file.
3077 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3078 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3079 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3080 tst-robust5, tst-robust6, and tst-robust7.
3082 * tst-typesizes.c: New file.
3083 * Makefile (tests): Add tst-typesizes.
3085 * tst-once3.c: More debug output.
3087 2005-12-24 Ulrich Drepper <drepper@redhat.com>
3089 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3090 missing after last change.
3092 * version.c: Update copyright year.
3094 2005-12-23 Ulrich Drepper <drepper@redhat.com>
3096 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3097 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3098 * pthread_mutex_trylock.c: Likewise.
3099 * pthread_mutex_timedlock.c: Likewise.
3100 * pthread_mutex_unlock.c: Likewise.
3102 2005-12-22 Roland McGrath <roland@redhat.com>
3104 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3105 so that #include_next's search location is not reset to the -I..
3106 directory where <nptl/...> can be found.
3108 2005-12-22 Ulrich Drepper <drepper@redhat.com>
3111 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3112 Fix unwind info. Remove useless branch prediction prefix.
3113 * tst-cancel24.cc: New file.
3114 * Makefile: Add rules to build and run tst-cancel24.
3116 2005-12-21 Roland McGrath <roland@redhat.com>
3118 * libc-cancellation.c: Use <> rather than "" #includes.
3119 * pt-cleanup.c: Likewise.
3120 * pthread_create.c: Likewise.
3121 * pthread_join.c: Likewise.
3122 * pthread_timedjoin.c: Likewise.
3123 * pthread_tryjoin.c: Likewise.
3124 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3125 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3126 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3127 * unwind.c: Likewise.
3129 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3131 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3132 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3133 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3134 THREAD_COPY_POINTER_GUARD): Define.
3136 2005-12-19 Jakub Jelinek <jakub@redhat.com>
3138 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3140 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3141 THREAD_COPY_POINTER_GUARD): Define.
3142 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3143 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3144 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3145 THREAD_COPY_POINTER_GUARD): Define.
3146 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3147 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3148 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3149 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3150 Use PTR_DEMANGLE for B0 if defined.
3152 2005-12-17 Ulrich Drepper <drepper@redhat.com>
3154 * pthread_create.c (__pthread_create_2_1): Use
3155 THREAD_COPY_POINTER_GUARD if available.
3156 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3157 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3158 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3159 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3160 * sysdeps/x86_64/tls.h: Likewise.
3162 2005-12-15 Roland McGrath <roland@redhat.com>
3164 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3166 2005-12-13 Ulrich Drepper <drepper@redhat.com>
3168 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3170 * errno-loc.c: New file.
3172 2005-12-12 Roland McGrath <roland@redhat.com>
3174 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3175 adjustments before choosing stack size. Update minimum stack size
3176 calculation to match allocate_stack change.
3178 2005-12-12 Ulrich Drepper <drepper@redhat.com>
3180 * allocatestack.c (allocate_stack): Don't demand that there is an
3181 additional full page available on the stack beside guard, TLS, the
3184 2005-11-24 Ulrich Drepper <drepper@redhat.com>
3186 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3187 (__cleanup_fct_attribute): Use __regparm__ not regparm.
3189 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3190 compiling 32-bit code we must define __cleanup_fct_attribute.
3192 005-11-24 Jakub Jelinek <jakub@redhat.com>
3195 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3196 __attribute__ instead of __attribute.
3197 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3198 (__cleanup_fct_attribute): Likewise.
3200 2005-11-17 Jakub Jelinek <jakub@redhat.com>
3202 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3203 a write barrier before writing libgcc_s_getcfa.
3205 2005-11-06 Ulrich Drepper <drepper@redhat.com>
3207 * sysdeps/unix/sysv/linux/configure: Removed.
3209 2005-11-05 Ulrich Drepper <drepper@redhat.com>
3211 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3212 optional init_array/fini_array support.
3214 2005-10-24 Roland McGrath <roland@redhat.com>
3216 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3217 versioned_symbol use.
3219 2005-10-16 Roland McGrath <roland@redhat.com>
3221 * init.c (__pthread_initialize_minimal_internal): Even when using a
3222 compile-time default stack size, apply the minimum that allocate_stack
3223 will require, and round up to page size.
3225 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
3227 * Makefile ($(test-modules)): Remove static pattern rule.
3229 2005-10-14 Jakub Jelinek <jakub@redhat.com>
3230 Ulrich Drepper <drepper@redhat.com>
3232 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3233 alignment in callback function.
3234 * Makefile: Add rules to build and run tst-align3.
3235 * tst-align3.c: New file.
3237 2005-10-03 Jakub Jelinek <jakub@redhat.com>
3239 * allocatestack.c (setxid_signal_thread): Add
3240 INTERNAL_SYSCALL_DECL (err).
3242 2005-10-02 Jakub Jelinek <jakub@redhat.com>
3244 * allocatestack.c (setxid_signal_thread): Need to use
3245 atomic_compare_and_exchange_bool_acq.
3247 2005-10-01 Ulrich Drepper <drepper@redhat.com>
3248 Jakub Jelinek <jakub@redhat.com>
3250 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
3252 (struct pthread): Move specific_used field to avoid padding.
3253 Add setxid_futex field.
3254 * init.c (sighandler_setxid): Reset setxid flag and release the
3256 * allocatestack.c (setxid_signal_thread): New function. Broken
3257 out of the bodies of the two loops in __nptl_setxid. For undetached
3258 threads check whether they are exiting and if yes, don't send a signal.
3259 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3260 * pthread_create.c (start_thread): For undetached threads, check
3261 whether setxid bit is set. If yes, wait until signal has been
3264 * allocatestack.c (STACK_VARIABLES): Initialize them.
3265 * pthread_create.c (__pthread_create_2_1): Initialize pd.
3267 2004-09-02 Jakub Jelinek <jakub@redhat.com>
3269 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3270 waiters, awake all waiters on the associated mutex.
3272 2005-09-22 Roland McGrath <roland@redhat.com>
3274 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3275 ../sysdeps/x86_64/hp-timing.h).
3277 2005-08-29 Jakub Jelinek <jakub@redhat.com>
3279 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3280 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3281 (lll_futex_wake_unlock): Define.
3282 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3283 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3284 (lll_futex_wake_unlock): Define.
3285 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3286 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3287 (lll_futex_wake_unlock): Define.
3288 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3289 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3290 (lll_futex_wake_unlock): Define.
3291 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3292 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3293 (lll_futex_wake_unlock): Define.
3294 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3295 lll_futex_wake_unlock.
3296 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3297 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3298 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3299 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3300 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3301 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3303 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3305 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3306 Fix typo in register name.
3308 2005-08-23 Ulrich Drepper <drepper@redhat.com>
3310 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3311 Use __sigfillset. Document that sigfillset does the right thing wrt
3314 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3317 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3318 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3319 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3320 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3321 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3322 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3324 * Makefile (tests): Add tst-initializers1.
3325 (CFLAGS-tst-initializers1.c): Set.
3326 * tst-initializers1.c: New test.
3328 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3330 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3331 Make sure __flags are located at offset 48 from the start of the
3334 2005-07-02 Roland McGrath <roland@redhat.com>
3336 * Makeconfig: Comment fix.
3338 2005-07-05 Jakub Jelinek <jakub@redhat.com>
3340 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3341 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3342 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3343 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3344 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3345 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3346 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3347 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3348 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3349 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3351 2005-06-25 Jakub Jelinek <jakub@redhat.com>
3353 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3354 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3355 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3357 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3358 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3359 field. Put in sysinfo field unconditionally.
3360 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3361 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3362 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3363 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3365 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3366 * pthread_create.c (__pthread_create_2_1): Use
3367 THREAD_COPY_STACK_GUARD macro.
3368 * Makefile: Add rules to build and run tst-stackguard1{,-static}
3370 * tst-stackguard1.c: New file.
3371 * tst-stackguard1-static.c: New file.
3373 2005-06-14 Alan Modra <amodra@bigpond.net.au>
3375 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3376 Invoke CGOTSETUP and CGOTRESTORE.
3377 (CGOTSETUP, CGOTRESTORE): Define.
3379 2005-05-29 Richard Henderson <rth@redhat.com>
3381 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3382 (tf_write, tf_writev): Use it.
3383 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
3386 2005-05-23 Jakub Jelinek <jakub@redhat.com>
3388 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3389 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3390 __librt_*_asynccancel@local.
3392 2005-05-17 Alan Modra <amodra@bigpond.net.au>
3394 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3395 all occurrences of JUMPTARGET. Instead append @local to labels.
3397 2005-05-20 Jakub Jelinek <jakub@redhat.com>
3399 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3400 size/alignment of struct pthread rather than tcbhead_t.
3401 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3403 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3405 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3408 2005-05-19 Richard Henderson <rth@redhat.com>
3410 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3411 __sync_val_compare_and_swap, not explicit _si variant.
3412 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3414 2005-05-03 Ulrich Drepper <drepper@redhat.com>
3417 * sysdeps/pthread/pthread.h: Avoid empty initializers.
3419 2005-05-03 Jakub Jelinek <jakub@redhat.com>
3421 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3422 .eh_frame section, use cfi_* directives.
3424 2005-04-27 Jakub Jelinek <jakub@redhat.com>
3426 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3429 2005-04-27 Ulrich Drepper <drepper@redhat.com>
3432 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3435 2005-04-27 Roland McGrath <roland@redhat.com>
3437 * Makefile (tests): Remove tst-clock2.
3439 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3440 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3441 translating to the kernel clockid_t for our own process/thread clock.
3443 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3445 2005-04-15 Jakub Jelinek <jakub@redhat.com>
3447 * old_pthread_cond_init.c: Include <errno.h>.
3448 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3449 process shared or uses clock other than CLOCK_REALTIME.
3450 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3452 2005-04-13 David S. Miller <davem@davemloft.net>
3454 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3455 * sysdeps/sparc/sparc64/clone.S: New file.
3457 2005-04-05 Jakub Jelinek <jakub@redhat.com>
3460 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3461 __inline instead of inline.
3462 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3464 2005-03-31 Jakub Jelinek <jakub@redhat.com>
3466 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3467 functionally equivalent, but shorter instructions.
3468 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3469 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3470 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3472 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3473 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3474 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3475 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3476 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3477 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3478 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3480 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3481 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3482 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3483 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3484 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3486 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
3488 * sysdeps/mips/Makefile: New file.
3489 * sysdeps/mips/nptl-sysdep.S: New file.
3490 * sysdeps/mips/tcb-offsets.sym: New file.
3491 * sysdeps/mips/pthread_spin_lock.S: New file.
3492 * sysdeps/mips/pthread_spin_trylock.S: New file.
3493 * sysdeps/mips/pthreaddef.h: New file.
3494 * sysdeps/mips/tls.h: New file.
3495 * sysdeps/mips/jmpbuf-unwind.h: New file.
3496 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3497 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3498 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3499 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3500 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3501 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3502 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3503 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3504 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3505 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3507 2005-03-23 Ulrich Drepper <drepper@redhat.com>
3510 * pthread_create.c (__pthread_create_2_1): Rename syscall error
3513 2005-03-10 Jakub Jelinek <jakub@redhat.com>
3515 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3517 2005-02-25 Roland McGrath <roland@redhat.com>
3519 * alloca_cutoff.c: Correct license text.
3520 * tst-unload.c: Likewise.
3521 * sysdeps/pthread/allocalim.h: Likewise.
3522 * sysdeps/pthread/pt-initfini.c: Likewise.
3523 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3524 * sysdeps/pthread/bits/sigthread.h: Likewise.
3525 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3526 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3528 2005-02-16 Roland McGrath <roland@redhat.com>
3530 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3531 Use unsigned int * for ptr_nthreads.
3533 2005-02-14 Alan Modra <amodra@bigpond.net.au>
3536 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3539 2005-02-07 Richard Henderson <rth@redhat.com>
3542 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3545 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
3547 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3548 order of arguments in invocation of atomic_add_zero.
3550 2005-01-26 Jakub Jelinek <jakub@redhat.com>
3553 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3554 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3555 at least gotntpoff relocation and addition.
3556 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3558 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3560 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3563 2005-01-06 Ulrich Drepper <drepper@redhat.com>
3565 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3566 entry for static tls deallocation fix.
3567 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3568 also contains information whether the memory pointed to is static
3570 * sysdeps/i386/tls.h: Likewise.
3571 * sysdeps/ia64/tls.h: Likewise.
3572 * sysdeps/powerpc/tls.h: Likewise.
3573 * sysdeps/s390/tls.h: Likewise.
3574 * sysdeps/sh/tls.h: Likewise.
3575 * sysdeps/sparc/tls.h: Likewise.
3576 * sysdeps/x86_64/tls.h: Likewise.
3578 2004-12-27 Ulrich Drepper <drepper@redhat.com>
3580 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3582 2004-12-21 Jakub Jelinek <jakub@redhat.com>
3584 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3586 * Makefile (tests): Add tst-align2.
3587 * tst-align2.c: New test.
3588 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3589 -mpreferred-stack-boundary=4.
3591 2004-12-18 Roland McGrath <roland@redhat.com>
3593 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3594 New file removed withdrawn for the moment.
3596 2004-12-17 Richard Henderson <rth@redhat.com>
3598 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3599 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3601 2004-12-16 Ulrich Drepper <drepper@redhat.com>
3603 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3604 Increased PTHREAD_STACK_MIN.
3606 * tst-context1.c (stacks): Use bigger stack size.
3608 2004-12-16 Jakub Jelinek <jakub@redhat.com>
3610 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3611 * sysdeps/sparc/tcb-offsets.sym: Add TID.
3613 2004-12-15 Jakub Jelinek <jakub@redhat.com>
3615 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3616 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3617 * sysdeps/s390/tcb-offsets.sym (TID): Add.
3619 2004-12-15 Ulrich Drepper <drepper@redhat.com>
3621 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3623 2004-12-14 Ulrich Drepper <drepper@redhat.com>
3625 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3626 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3628 * tst-getpid1.c: If child crashes, report this first. Print which
3631 2004-12-09 Ulrich Drepper <drepper@redhat.com>
3633 * init.c (__pthread_initialize_minimal_internal): Also unblock
3636 2004-12-01 Jakub Jelinek <jakub@redhat.com>
3638 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3639 _POSIX_THREAD_CPUTIME): Define to 0.
3640 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3641 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3642 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3643 __timer_signal_thread_tclk): Remove.
3644 (init_module): Remove their initialization.
3645 (thread_cleanup): Remove their cleanup assertions.
3646 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3647 __timer_signal_thread_tclk): Remove.
3648 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3649 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3650 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3652 2004-12-07 Jakub Jelinek <jakub@redhat.com>
3654 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3655 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3657 * Makefile (tests): Add tst-getpid2.
3658 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3659 (do_test): Use it. Use __clone2 instead of clone on ia64.
3660 * tst-getpid2.c: New test.
3662 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3664 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3666 2004-12-04 Ulrich Drepper <drepper@redhat.com>
3668 * Makefile (tests): Add tst-getpid1.
3669 * tst-getpid1.c: New file.
3670 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3671 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3673 2004-12-02 Roland McGrath <roland@redhat.com>
3675 * Makefile (libpthread-nonshared): Variable removed.
3676 ($(objpfx)libpthread_nonshared.a): Target removed.
3677 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3678 These are now handled by generic magic from
3679 libpthread-static-only-routines being set.
3681 2004-11-27 Ulrich Drepper <drepper@redhat.com>
3683 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3684 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3685 _POSIX_THREAD_PRIO_PROTECT): Define.
3686 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3687 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3688 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3690 2004-11-26 Jakub Jelinek <jakub@redhat.com>
3692 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3693 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3694 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3695 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3696 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3697 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3698 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3700 2004-11-24 Ulrich Drepper <drepper@redhat.com>
3702 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3704 * Makefile (libpthread-routines): Add pthread_setschedprio.
3705 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3706 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3707 * pthread_setschedprio.c: New file.
3709 2004-11-20 Jakub Jelinek <jakub@redhat.com>
3711 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3712 * pthread_cancel.c (pthread_create): Likewise.
3714 * Makefile (libpthread-routines): Add vars.
3715 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3716 * init.c (__default_stacksize, __is_smp): Remove.
3718 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3719 and define a wrapper macro.
3720 (PTHREAD_STATIC_FN_REQUIRE): Define.
3721 * allocatestack.c (__find_thread_by_id): Undefine.
3722 * pthread_create (__pthread_keys): Remove.
3723 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3724 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3725 PTHREAD_STATIC_FN_REQUIRE.
3727 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3729 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3730 parameter to REGISTER macro.
3732 2004-11-17 Roland McGrath <roland@redhat.com>
3734 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3735 Make sure SIGCANCEL is blocked as well.
3737 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3739 * sysdeps/pthread/setxid.h: New file.
3740 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3741 (struct xid_command): Add forward decl.
3742 (struct pthread_functions): Change return type of __nptl_setxid hook
3744 * pthreadP.h (__nptl_setxid): Change return type to int.
3745 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3746 calling thread, return its return value and set errno on failure.
3747 * descr.h (struct xid_command): Change id type to long array.
3749 * Makefile: Add rules to build and test tst-setuid1 and
3751 * tst-setuid1.c: New test.
3752 * tst-setuid1-static.c: New test.
3754 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3756 * Makefile (tests): Add tst-exit3.
3757 * tst-exit3.c: New test.
3759 2004-11-09 Ulrich Drepper <drepper@redhat.com>
3761 * Makefile (tests): Add tst-exit2.
3762 * tst-exit2.c: New file.
3764 2004-11-09 Roland McGrath <roland@redhat.com>
3767 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3768 here, before calling clone.
3769 * pthread_create.c (start_thread): Don't do it here.
3771 2004-11-02 Jakub Jelinek <jakub@redhat.com>
3773 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3775 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3777 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3778 Set ETIMEDOUT to errno when time is up. Tweak to avoid
3781 2004-10-28 Jakub Jelinek <jakub@redhat.com>
3783 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3784 if sched_priority is not between minprio and maxprio.
3786 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3788 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3789 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3791 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3792 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3794 2004-10-24 Ulrich Drepper <drepper@redhat.com>
3796 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3797 not-cancelable I/O functions.
3799 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3801 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3802 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3803 make sure 2 is stored in the futex and we looked at the old value.
3804 Fix a few other problems to return the correct value.
3806 2004-10-14 Richard Henderson <rth@redhat.com>
3808 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3811 2004-10-06 Jakub Jelinek <jakub@redhat.com>
3813 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3814 of pthread-functions.h and pthreaddef.h.
3815 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3817 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3818 Change __data.__nwaiters from int to unsigned int.
3820 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3821 sysconf (_SC_THREAD_CPUTIME) returns negative value.
3823 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3826 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3827 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3829 2004-10-06 Ulrich Drepper <drepper@redhat.com>
3831 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
3832 test fails, remove message queue.
3833 (tf_msgsnd): Likewise.
3835 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3837 * tst-clock1.c: Change #ifdef to #if defined.
3838 * tst-clock2.c: Likewise.
3839 * tst-cond11.c: Likewise.
3841 * sysdeps/pthread/timer_create.c (timer_create): Use
3842 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3843 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3846 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3848 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3849 _POSIX_THREAD_CPUTIME): Define to 0.
3851 2004-10-04 Ulrich Drepper <drepper@redhat.com>
3853 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3854 and _POSIX_THREAD_CPUTIME to zero.
3855 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3856 * tst-barrier2.c: Fix testing for POSIX feature.
3857 * tst-clock1.c: Likewise.
3858 * tst-clock2.c: Likewise.
3859 * tst-cond11.c: Likewise.
3860 * tst-cond4.c: Likewise.
3861 * tst-cond6.c: Likewise.
3862 * tst-flock2.c: Likewise.
3863 * tst-mutex4.c: Likewise.
3864 * tst-mutex9.c: Likewise.
3865 * tst-rwlock12.c: Likewise.
3866 * tst-rwlock4.c: Likewise.
3867 * tst-signal1.c: Likewise.
3868 * tst-spin2.c: Likewise.
3869 * sysdeps/pthread/posix-timer.h: Likewise.
3870 * sysdeps/pthread/timer_create.c: Likewise.
3871 * sysdeps/pthread/timer_routines.c: Likewise.
3873 2004-10-01 Ulrich Drepper <drepper@redhat.com>
3875 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3876 (__lll_mutex_timedlock_wait): Address futex correctly.
3878 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3879 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3880 make sure 2 is stored in the futex and we looked at the old value.
3881 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3882 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
3883 which might very well made the code not working at all before.
3886 2004-09-28 Ulrich Drepper <drepper@redhat.com>
3888 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3889 allow SIGSETXID to be sent.
3890 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3891 for SIGSETXID to be defined.
3892 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3893 SIGSETXID cannot be blocked.
3895 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3896 Add __extension__ to long long types.
3897 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3898 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3899 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3900 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3901 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3902 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3903 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3905 2004-09-25 Ulrich Drepper <drepper@redhat.com>
3907 * descr.h (struct pthread): Add stopped_start field.
3908 * sysdeps/pthread/createthread.c (create_thread): Set
3909 start_stopped flag in descriptor for new thread appropriately.
3910 * pthread_create.c (start_thread): Only take lock to be stopped on
3911 startup if stopped_start flag says so.
3913 2004-09-24 Ulrich Drepper <drepper@redhat.com>
3915 * pthread_create.c (__pthread_create_2_1): Remember whether thread
3916 is created detached and if yes, do not try to free the stack in case
3917 the thread creation failed.
3918 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3919 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3920 case there has been no error. [BZ #405]
3922 * pthread_create.c (start_thread): Don't wait for scheduler data
3923 etc to be set at the beginning of the function. The cancellation
3924 infrastructure must have been set up. And enable async
3925 cancellation before potentially going to sleep. [BZ #401]
3927 2004-09-20 Ulrich Drepper <drepper@redhat.com>
3929 * Versions: Remove exports for pthread_set*id_np functions.
3930 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3932 * Makefile: Don't build pthread_set*id code for now.
3934 2004-09-19 Ulrich Drepper <drepper@redhat.com>
3936 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3938 * allocatestack.c (__nptl_setxid): New function.
3939 * descr.h (struct xid_command): Define type.
3940 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3941 (sighandler_setxid): New function.
3942 (__pthread_initialize_minimal): Register sighandler_setxid for
3944 * pt-allocrtsig.c: Update comment.
3945 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
3946 Declare __nptl_setxid.
3947 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3948 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3949 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3950 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3951 and pthread_setresuid_np.
3952 * pthread_setgid_np.c: New file.
3953 * pthread_setuid_np.c: New file.
3954 * pthread_setegid_np.c: New file.
3955 * pthread_seteuid_np.c: New file.
3956 * pthread_setregid_np.c: New file.
3957 * pthread_setreuid_np.c: New file.
3958 * pthread_setresgid_np.c: New file.
3959 * pthread_setresuid_np.c: New file.
3960 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3961 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3962 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3963 and pthread_setresuid_np.
3964 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3965 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3966 pthread_setregid, and pthread_setresgid.
3968 2004-09-18 Ulrich Drepper <drepper@redhat.com>
3970 * allocatestack.c (allocate_stack): Return EAGAIN instead of
3971 ENOMEM when out of memory.
3973 2004-09-10 Roland McGrath <roland@redhat.com>
3976 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3977 code, since we don't try to use the broken CLONE_STOPPED any more.
3978 * pthread_create.c (start_thread): Likewise.
3980 2004-09-15 Richard Henderson <rth@redhat.com>
3982 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3984 2004-09-01 David Mosberger <davidm@hpl.hp.com>
3986 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3987 (__libc_unwind_longjmp): Delete macro and declare as function.
3988 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3989 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3991 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3992 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3993 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3995 2004-09-12 Ulrich Drepper <drepper@redhat.com>
3997 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3999 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4000 types also for __USE_XOPEN2K.
4001 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4002 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4003 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4004 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4005 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4006 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4007 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4010 2004-09-08 Ulrich Drepper <drepper@redhat.com>
4012 * sysdeps/pthread/pthread.h
4013 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4014 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4015 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4016 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4019 2004-09-07 Ulrich Drepper <drepper@redhat.com>
4021 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4022 PSEUDO to be used with . prefix.
4024 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4025 Use atomic_increment instead of atomic_exchange_and_add.
4026 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4028 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4030 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4033 * allocatestack.c (allocate_stack): Use atomic_increment_val
4034 instead of atomic_exchange_and_add.
4035 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4036 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4038 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4041 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4042 the initialization function might throw.
4044 2005-09-05 Richard Henderson <rth@redhat.com>
4046 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4047 Move definition inside libpthread, libc, librt check. Provide
4048 definition for rtld.
4050 2004-09-02 Ulrich Drepper <drepper@redhat.com>
4052 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4053 * sysdeps/i386/jmpbuf-unwind.h: Likewise
4054 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4055 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4056 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4057 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4058 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4059 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4062 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4063 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4064 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4066 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4067 Decrement __nwaiters. If pthread_cond_destroy has been called and
4068 this is the last waiter, signal pthread_cond_destroy caller and
4069 avoid using the pthread_cond_t structure after unlock.
4070 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4071 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4072 Read clock type from the least significant bits of __nwaiters instead
4074 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4075 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4077 2004-08-31 Jakub Jelinek <jakub@redhat.com>
4080 * Makefile (tests): Add tst-cond20 and tst-cond21.
4081 * tst-cond20.c: New test.
4082 * tst-cond21.c: New test.
4083 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4084 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4086 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4088 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4089 (pthread_cond_t): Likewise.
4090 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4092 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4094 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4096 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4097 (cond_nwaiters): New.
4099 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4100 if there are waiters not signalled yet.
4101 Wait until all already signalled waiters wake up.
4102 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4103 __nwaiters. If pthread_cond_destroy has been called and this is the
4104 last waiter, signal pthread_cond_destroy caller and avoid using
4105 the pthread_cond_t structure after unlock.
4106 (__pthread_cond_wait): Increment __nwaiters in the beginning,
4107 decrement it when leaving. If pthread_cond_destroy has been called
4108 and this is the last waiter, signal pthread_cond_destroy caller.
4109 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4110 Likewise. Read clock type from the least significant bits of
4111 __nwaiters instead of __clock.
4112 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4113 whether clock ID can be encoded in COND_CLOCK_BITS bits.
4114 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4115 clock type just from the last COND_CLOCK_BITS bits of value.
4116 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4117 instead of __clock, just from second bit of condattr's value.
4119 2004-08-30 Jakub Jelinek <jakub@redhat.com>
4121 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4122 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
4124 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4126 2004-08-15 Roland McGrath <roland@frob.com>
4128 * pthread_atfork.c: Update copyright terms including special exception
4129 for these trivial files, which are statically linked into executables
4130 that use dynamic linking for the significant library code.
4132 2004-08-09 Jakub Jelinek <jakub@redhat.com>
4134 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4135 pthread_rwlock_rdlock.
4136 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4137 Decrease __nr_readers_queued after reacquiring lock.
4138 * sysdeps/pthread/pthread_rwlock_timedrdlock
4139 (pthread_rwlock_timedrdlock): Likewise.
4140 Reported by Bob Cook <bobcook47@hotmail.com>.
4142 2004-08-11 Jakub Jelinek <jakub@redhat.com>
4144 * tst-rwlock14.c (tf): Read main thread handle from *ARG
4145 before pthread_barrier_wait.
4147 2004-08-07 Ulrich Drepper <drepper@redhat.com>
4149 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4150 Remove unnecessary exception handling data.
4152 2004-07-23 Jakub Jelinek <jakub@redhat.com>
4155 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4156 instead of clockid_t.
4158 2004-07-21 Roland McGrath <roland@redhat.com>
4160 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4162 2004-07-19 Roland McGrath <roland@redhat.com>
4164 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4166 2004-07-02 Roland McGrath <roland@redhat.com>
4168 * configure: Don't exit.
4170 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4172 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4173 (__pthread_cond_timedwait): Check for invalid nanosecond in
4176 2004-07-07 Ulrich Drepper <drepper@redhat.com>
4178 * Makefile: Add rules to build and run tst-fini1.
4179 * tst-fini1.c: New file.
4180 * tst-fini1mod.c: New file.
4182 2004-07-05 Ulrich Drepper <drepper@redhat.com>
4184 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4185 if no cancellation support is needed.
4186 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4187 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4188 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4189 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4190 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4191 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4192 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4193 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4194 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4196 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4197 only if not already defined.
4199 2004-07-05 Jakub Jelinek <jakub@redhat.com>
4201 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4202 constraint "m" instead of "0" for futex.
4204 * shlib-versions: Add powerpc64-.*-linux.*.
4206 2004-07-04 Jakub Jelinek <jakub@redhat.com>
4208 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4209 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4211 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4212 1 billion and 64-bit tv_nsec which is valid when truncated to 32
4215 2004-06-29 Roland McGrath <roland@redhat.com>
4217 * Banner: NPTL no longer has its own version number.
4218 * Makefile (nptl-version): Variable removed.
4219 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4220 using $(version), the glibc version number.
4222 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4224 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4225 Fix branch offset for a PLT entry.
4226 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4228 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4230 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4232 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4235 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4237 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4240 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4242 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4243 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4245 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4246 (pthread_rwlock_timedrdlock): Likewise.
4248 2004-06-22 Jakub Jelinek <jakub@redhat.com>
4250 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4251 Set __r7 to val, not mutex.
4253 2004-06-27 Ulrich Drepper <drepper@redhat.com>
4255 * Makefile: Add rules to build tst-rwlock14.
4256 * tst-rwlock14.c: New file.
4258 2004-06-24 Boris Hu <boris.hu@intel.com>
4260 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4262 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4264 2004-06-19 Andreas Jaeger <aj@suse.de>
4266 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4267 assembler in last patch.
4269 2004-06-17 Ulrich Drepper <drepper@redhat.com>
4271 * sysdeps/pthread/pthread_cond_timedwait.c
4272 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4273 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4274 (__pthread_cond_timedwait): Check for invalid nanosecond in
4276 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4277 * tst-cond19.c: New file.
4278 * Makefile: Add rules to build and run tst-cond19.
4280 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
4282 * tst-context1.c (GUARD_PATTERN): Defined.
4283 (tst_context_t): Define struct containing ucontext_t & guard words.
4284 (ctx): Declare as an array of tst_context_t.
4285 (fct): Verify uc_link & guard words are still valid.
4286 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
4288 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4290 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4291 Add __data.__futex field, reshuffle __data.__clock.
4292 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4293 (__pthread_cond_signal): Increment __futex at the same time as
4294 __wakeup_seq or __total_seq. Pass address of __futex instead of
4295 address of low 32-bits of __wakeup_seq to futex syscall.
4296 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4297 (__pthread_cond_wait): Likewise. Pass __futex value from before
4298 releasing internal lock to FUTEX_WAIT.
4299 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4300 (__pthread_cond_timedwait): Likewise.
4301 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4302 (FUTEX_CMP_REQUEUE): Define.
4303 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4304 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4305 Pass __futex value from before the unlock and __futex address instead
4306 of address of low 32-bits of __wakeup_seq to futex syscall.
4307 Fallback to FUTEX_WAKE all on any errors.
4309 2004-06-08 Jakub Jelinek <jakub@redhat.com>
4311 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4313 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4314 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4315 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4316 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4317 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
4319 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
4321 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4322 Add memory clobber to inline assembly.
4323 (__lll_mutex_trylock): Likewise.
4324 (__lll_mutex_cond_trylock): Likewise.
4326 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
4328 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4329 Pass val argument as 6th system call argument in %r7.
4331 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4333 * Makefile (tests): Add tst-cond16.
4334 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4335 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4336 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4337 Add __data.__futex field, reshuffle __data.__clock.
4338 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4339 (__pthread_cond_signal): Increment __futex at the same time as
4340 __wakeup_seq or __total_seq. Pass address of __futex instead of
4341 address of low 32-bits of __wakeup_seq to futex syscall.
4342 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4343 (__pthread_cond_wait): Likewise. Pass __futex value from before
4344 releasing internal lock to FUTEX_WAIT.
4345 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4346 (__pthread_cond_timedwait): Likewise.
4347 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4348 (FUTEX_CMP_REQUEUE): Define.
4349 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4350 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4351 Pass __futex value from before the unlock and __futex address instead
4352 of address of low 32-bits of __wakeup_seq to futex syscall.
4353 Fallback to FUTEX_WAKE all on any errors.
4354 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4356 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4357 internally. Return non-zero if error, zero if success.
4358 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4359 Add __data.__futex field, reshuffle __data.__clock.
4360 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4362 (lll_futex_requeue): Add val argument, return 1 unconditionally
4364 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4365 Add __data.__futex field, reshuffle __data.__clock.
4366 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4368 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4369 internally. Return non-zero if error, zero if success.
4370 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4371 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4372 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4374 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4375 internally. Return non-zero if error, zero if success.
4376 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4377 Add __data.__futex field, reshuffle __data.__clock.
4378 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4380 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4381 internally. Return non-zero if error, zero if success.
4382 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4383 Add __data.__futex field, reshuffle __data.__clock.
4384 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4385 Add __data.__futex field, reshuffle __data.__clock.
4386 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4387 Increment __futex at the same time as __wakeup_seq or __total_seq.
4388 Pass address of __futex instead of address of low 32-bits of
4389 __wakeup_seq to futex syscall.
4390 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4391 Pass __futex value from before releasing internal lock
4393 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4394 Likewise. Avoid unnecessary shadowing of variables.
4395 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4396 Set __futex to 2 * __total_seq. Pass __futex value from before the
4397 unlock and __futex address instead of address of low 32-bits of
4398 __wakeup_seq to futex_requeue macro, adjust for new return value
4400 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4401 (__pthread_cond_signal): Increment __futex at the same time as
4402 __wakeup_seq or __total_seq. Pass address of __futex instead of
4403 address of low 32-bits of __wakeup_seq to futex syscall.
4404 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4405 (__pthread_cond_wait): Likewise. Pass __futex value from before
4406 releasing internal lock to FUTEX_WAIT.
4407 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4408 (__pthread_cond_timedwait): Likewise.
4409 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4410 (FUTEX_CMP_REQUEUE): Define.
4411 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4412 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4413 Pass __futex value from before the unlock and __futex address instead
4414 of address of low 32-bits of __wakeup_seq to futex syscall.
4415 Fallback to FUTEX_WAKE all on any errors.
4417 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4419 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4420 Add nop to align the end of critical section.
4421 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4423 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4425 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4426 Add __broadcast_seq field.
4427 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4428 all waiters as woken with woken_seq and bump broadcast counter.
4429 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4430 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
4431 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4432 Comment typo fixes. Avoid returning -ETIMEDOUT.
4434 2004-06-01 Ulrich Drepper <drepper@redhat.com>
4436 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4437 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4438 Reported by Kaz Kojima.
4440 2004-05-25 Jakub Jelinek <jakub@redhat.com>
4442 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4444 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4446 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4447 __broadcast_seq with bc_seq after acquiring internal lock instead of
4450 2004-05-18 Jakub Jelinek <jakub@redhat.com>
4452 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4454 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4455 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4456 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4457 (pthread_cond_t): Add __data.__broadcast_seq field.
4458 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4459 (FRAME_SIZE): Define.
4460 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
4462 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4464 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
4466 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4467 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
4470 2004-05-18 Ulrich Drepper <drepper@redhat.com>
4472 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4473 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4474 Add __broadcast_seq field.
4475 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4476 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4477 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4478 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4479 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4480 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4481 all waiters as woken with woken_seq and bump broadcast counter.
4482 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4483 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4484 __broadcast_seq field.
4485 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4486 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4487 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4488 * pthread_cond_init.c: Initialize __broadcast_seq field.
4489 * Makefile (tests): Add tst-cond17 and tst-cond18.
4490 Add .NOTPARALLEL goal.
4491 * tst-cond16.c: New file. From Jakub.
4492 * tst-cond17.c: New file. From Jakub.
4493 * tst-cond18.c: New file. From Jakub.
4495 2004-05-16 Ulrich Drepper <drepper@redhat.com>
4497 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4500 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4501 Parametrize frame size. Correct some unwind info.
4502 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4504 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4506 * tst-stack3.c: Note testing functionality beyond POSIX.
4508 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4510 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4511 Change conditional from ifdef to if.
4513 2004-04-23 Jakub Jelinek <jakub@redhat.com>
4515 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4516 SYSDEP_CANCEL_ERROR): Define.
4519 2004-05-01 Jakub Jelinek <jakub@redhat.com>
4521 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4523 2004-04-20 Jakub Jelinek <jakub@redhat.com>
4525 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4527 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4529 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4530 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4531 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4532 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4534 2004-04-19 Ulrich Drepper <drepper@redhat.com>
4536 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4537 thread has all signals blocked.
4539 2004-04-18 Andreas Jaeger <aj@suse.de>
4541 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4542 (SEM_VALUE_MAX): Add missing brace.
4544 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4546 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4548 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4549 * sysdeps/pthread/tst-mqueue8x.c: New test.
4550 * tst-cancel4.c: Update comment about message queues.
4552 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4553 return it_value { 0, 0 }.
4554 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4556 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4557 assertion for SIGEV_NONE.
4558 (thread_attr_compare): Compare all attributes, not just a partial
4561 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4563 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4565 2004-04-17 Ulrich Drepper <drepper@redhat.com>
4567 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4568 Just use a plain number.
4569 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4570 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4571 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4572 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4573 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4574 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4575 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4577 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4579 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4581 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4583 2004-04-15 Jakub Jelinek <jakub@redhat.com>
4585 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4586 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4587 of calling sigwaitinfo.
4589 2004-04-16 Ulrich Drepper <drepper@redhat.com>
4591 * allocatestack.c (allocate_stack): Set reported_guardsize
4593 * pthread_getattr_np.c (pthread_getattr_np): Use
4594 reported_guardsize instead of guardsize.
4595 * descr.h (struct pthread): Add reported_guardsize field.
4597 2004-04-13 Jakub Jelinek <jakub@redhat.com>
4599 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4601 2004-04-12 Ulrich Drepper <drepper@redhat.com>
4603 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4605 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4607 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4608 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4609 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4610 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4611 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4613 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4614 (_POSIX_MESSAGE_PASSING): Define.
4615 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4616 (_POSIX_MESSAGE_PASSING): Define.
4617 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4618 (_POSIX_MESSAGE_PASSING): Define.
4620 2004-04-04 Ulrich Drepper <drepper@redhat.com>
4622 * tst-context1.c (fct): Check whether correct stack is used.
4624 2004-04-03 Ulrich Drepper <drepper@redhat.com>
4626 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4627 matching constraints for asm mem parameters.
4629 * tst-clock2.c (tf): Don't define unless needed.
4631 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
4633 * Makefile (link-libc-static): Use $(static-gnulib) instead of
4636 2004-03-30 Ulrich Drepper <drepper@redhat.com>
4638 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4639 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4640 * pthreadP.h: Declare __nptl_deallocate_tsd.
4641 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4644 * Makefile (tests): Add tst-tsd5.
4645 * tst-tsd5.c: New file.
4647 2004-03-29 Ulrich Drepper <drepper@redhat.com>
4649 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4650 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4651 is SHLIB_COMPAT check.
4652 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4653 (__pthread_attr_getaffinity_old): Likewise.
4654 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4655 (__pthread_getaffinity_old): Likewise.
4656 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4657 (__pthread_setaffinity_old): Likewise.
4659 2004-03-26 Ulrich Drepper <drepper@redhat.com>
4661 * allocatestack.c (_make_stacks_executable): Call
4662 _dl_make_stack_executable first.
4664 2004-03-24 Roland McGrath <roland@redhat.com>
4666 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4667 constraint instead of "0".
4669 2004-03-24 Ulrich Drepper <drepper@redhat.com>
4671 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4672 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4674 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4675 code to avoid warning.
4677 2004-03-24 Andreas Jaeger <aj@suse.de>
4679 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4680 (__pthread_attr_setaffinity_old): Remove const.
4682 2004-03-23 Ulrich Drepper <drepper@redhat.com>
4684 * sysdeps/unix/sysv/linux/smp.h: New file.
4685 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4686 * init.c: Define __is_smp.
4687 (__pthread_initialize_minimal_internal): Call is_smp_system to
4688 initialize __is_smp.
4689 * pthreadP.h: Declare __is_smp.
4690 Define MAX_ADAPTIVE_COUNT is necessary.
4691 * pthread_mutex_init.c: Add comment regarding __spins field.
4692 * pthread_mutex_lock.c: Implement adaptive mutex type.
4693 * pthread_mutex_timedlock.c: Likewise.
4694 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4695 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4697 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4698 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4699 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4700 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4701 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4702 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4703 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4704 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4705 lll_mutex_cond_trylock.
4706 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4707 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4708 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4709 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4710 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4711 Define BUSY_WAIT_NOP.
4712 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4713 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4715 * tst-mutex5.c: Add support for testing adaptive mutexes.
4716 * tst-mutex7.c: Likewise.
4717 * tst-mutex5a.c: New file.
4718 * tst-mutex7a.c: New file.
4719 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4721 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4722 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4723 vgettimeofday call might destroy the content.
4725 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4728 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4729 No need to restrict type of ret. Make it int. Add comment.
4731 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4732 Remove unnecessary setne instruction.
4734 2004-03-22 Jakub Jelinek <jakub@redhat.com>
4736 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4737 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4738 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4739 If realloc fails, break out of the loop.
4741 2004-03-20 Andreas Jaeger <aj@suse.de>
4743 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4744 (__pthread_setaffinity_old): Fix interface.
4745 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4746 (__pthread_getaffinity_old): Likewise.
4748 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4749 (__pthread_setaffinity_new): Remove duplicate declaration.
4751 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4753 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4754 the return value to a safe register.
4755 (CDISABLE): Set the function argument correctly.
4757 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4759 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4760 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4761 Rewrite so that only one locked memory operation per round is needed.
4762 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4763 (pthread_barrier_wait): After wakeup, release lock only when the
4764 last thread stopped using the barrier object.
4765 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4766 (__pthread_cond_wait): Don't store mutex address if the current
4767 value is ~0l. Add correct cleanup support and unwind info.
4768 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4769 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4770 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4771 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4772 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4773 Add correct cleanup support and unwind info.
4774 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4775 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4776 information for syscall wrappers.
4778 2004-03-18 Ulrich Drepper <drepper@redhat.com>
4780 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4781 cpusetsize field, remove next.
4782 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4783 parameter for size of the CPU set.
4784 (pthread_setaffinity_np): Likewise.
4785 (pthread_attr_getaffinity_np): Likewise.
4786 (pthread_attr_setaffinity_np): Likewise.
4787 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4788 interface change, keep compatibility code.
4789 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4790 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4791 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4792 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
4793 __pthread_getaffinity_np.
4794 * Versions: Add version for changed interfaces.
4795 * tst-attr3.c: Adjust test for interface change.
4796 * pthread_getattr_np.c: Query the kernel about the affinity mask with
4797 increasing buffer sizes.
4798 * pthread_attr_destroy.c: Remove unused list handling.
4799 * pthread_attr_init.c: Likewise.
4801 2004-03-17 Roland McGrath <roland@redhat.com>
4803 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4804 first argument to clock_getres so we ever enable kernel timers.
4806 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
4808 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4810 2004-03-12 Richard Henderson <rth@redhat.com>
4812 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4813 oldvalue from CENABLE to CDISABLE.
4815 2004-03-12 Ulrich Drepper <drepper@redhat.com>
4817 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4818 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4819 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4820 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4822 2004-03-11 Richard Henderson <rth@redhat.com>
4824 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4825 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4826 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4828 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4830 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4831 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4832 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4834 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4836 * forward.c (__pthread_cond_broadcast_2_0,
4837 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4838 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4839 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4841 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4843 * sysdeps/sh/tcb-offsets.sym: Add PID.
4844 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4845 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4847 2004-03-10 Ulrich Drepper <drepper@redhat.com>
4849 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4850 include <sysdep-cancel.h>, vfork is no cancellation point.
4851 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4852 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4853 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4855 2004-03-10 Jakub Jelinek <jakub@redhat.com>
4857 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4859 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4860 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4862 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4864 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4865 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4866 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4867 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4868 of DO_CALL_VIA_BREAK. Work around a gas problem.
4870 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4871 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4872 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4873 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4874 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4875 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4877 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4878 a local register for saving old PID. Negate PID in parent upon exit.
4880 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4882 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4883 before syscall, set to the old value in the parent afterwards.
4884 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4885 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4887 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4888 before syscall, set to the old value in the parent afterwards.
4889 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4890 * sysdeps/s390/tcb-offsets.sym: Add PID.
4892 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4893 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4894 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4895 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4896 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4897 * sysdeps/sparc/tcb-offsets.sym: Add PID.
4899 2004-03-10 Andreas Schwab <schwab@suse.de>
4901 * sysdeps/ia64/tcb-offsets.sym: Add PID.
4902 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4903 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4905 2004-03-09 Jakub Jelinek <jakub@redhat.com>
4907 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4908 * tst-cancel21.c (do_one_test): Likewise.
4909 Reported by Gordon Jin <gordon.jin@intel.com>.
4911 2004-02-09 Jakub Jelinek <jakub@redhat.com>
4913 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4914 if non-zero and set to INT_MIN if zero.
4915 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4916 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4917 (SAVE_PID, RESTORE_PID): Define.
4919 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4920 Use relative path to avoid including NPTL i386/vfork.S.
4921 (SAVE_PID, RESTORE_PID): Define.
4922 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4923 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4924 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4926 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4927 * tst-vfork1.c: New test.
4928 * tst-vfork2.c: New test.
4929 * tst-vfork1x.c: New test.
4930 * tst-vfork2x.c: New test.
4932 2004-03-08 Ulrich Drepper <drepper@redhat.com>
4934 * sysdeps/i386/tcb-offsets.sym: Add PID.
4935 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4936 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4937 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4939 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
4941 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4943 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
4945 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4948 2004-03-07 Ulrich Drepper <drepper@redhat.com>
4950 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4953 * tst-once4.c: Remove unnecessary macro definition.
4955 * tst-mutex7.c (do_test): Limit thread stack size.
4956 * tst-once2.c (do_test): Likewise.
4957 * tst-tls3.c (do_test): Likewise.
4958 * tst-tls1.c (do_test): Likewise.
4959 * tst-signal3.c (do_test): Likewise.
4960 * tst-kill6.c (do_test): Likewise.
4961 * tst-key4.c (do_test): Likewise.
4962 * tst-join4.c (do_test): Likewise.
4963 * tst-fork1.c (do_test): Likewise.
4964 * tst-context1.c (do_test): Likewise.
4965 * tst-cond2.c (do_test): Likewise.
4966 * tst-cond10.c (do_test): Likewise.
4967 * tst-clock2.c (do_test): Likewise.
4968 * tst-cancel10.c (do_test): Likewise.
4969 * tst-basic2.c (do_test): Likewise.
4970 * tst-barrier4.c (do_test): Likewise.
4972 2004-03-05 Ulrich Drepper <drepper@redhat.com>
4974 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4976 2004-03-01 Ulrich Drepper <drepper@redhat.com>
4978 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4979 (__pthread_cond_timedwait): Optimize wakeup test.
4980 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4981 (__pthread_cond_wait): Likewise.
4982 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4983 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4986 2004-02-29 Ulrich Drepper <drepper@redhat.com>
4988 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4989 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
4990 the atomic instruction needed.
4991 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4992 (__lll_mutex_lock_wait): Likewise.
4994 2004-02-28 Ulrich Drepper <drepper@redhat.com>
4996 * Makefile (tests): Add tst-cond14 and tst-cond15.
4997 * tst-cond14.c: New file.
4998 * tst-cond15.c: New file.
5000 2004-02-27 Ulrich Drepper <drepper@redhat.com>
5002 * sysdeps/pthread/createthread.c (create_thread): Remove use of
5003 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
5004 needs to be implemented differently to be useful.
5006 2004-02-26 Ulrich Drepper <drepper@redhat.com>
5008 * pthread_attr_setschedparam.c: Don't test priority against limits
5009 here. Set ATTR_FLAG_SCHED_SET flag.
5010 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5011 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5012 from parent thread to child. If attribute is used and scheduling
5013 parameters are not inherited, copy parameters from attribute or
5014 compute them. Check priority value.
5015 * pthread_getschedparam.c: If the parameters aren't known yet get
5016 them from the kernel.
5017 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5018 ATTR_FLAG_POLICY_SET flag for thread.
5019 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5020 and ATTR_FLAG_POLICY_SET.
5022 * sysdeps/pthread/createthread.c: Use tgkill if possible.
5024 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5025 fail if stack address hasn't been set. Just return 0.
5027 2004-02-25 Ulrich Drepper <drepper@redhat.com>
5029 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
5030 libpthread for the files in this list.
5031 (CFLAGS-tst-unload): Removed.
5032 * tst-unload.c (do_test): Don't use complete path for
5035 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5038 2004-02-22 Ulrich Drepper <drepper@redhat.com>
5040 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5041 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5042 operation per round is needed.
5043 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5044 (__lll_mutex_lock_wait): Likewise.
5046 2004-02-20 Ulrich Drepper <drepper@redhat.com>
5048 * tst-cancel9.c (cleanup): Don't print to stderr.
5050 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5052 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5054 2004-02-20 Jakub Jelinek <jakub@redhat.com>
5056 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5057 (__syscall_error_handler2): Call CDISABLE.
5058 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5059 (__syscall_error_handler2): Call CDISABLE.
5061 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5062 Release lock before the loop, don't reacquire it.
5064 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5066 2004-02-19 Andreas Schwab <schwab@suse.de>
5068 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5071 2004-02-18 Ulrich Drepper <drepper@redhat.com>
5073 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5074 (pthread_barrier_wait): After wakeup, release lock only when the
5075 last thread stopped using the barrier object.
5076 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5077 (pthread_barrier_wait): Likewise.
5078 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5080 * Makefile (tests): Add tst-barrier4.
5081 * tst-barrier4.c: New file.
5083 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5084 (__pthread_cond_timedwait): Perform timeout test while holding
5085 internal lock to prevent wakeup race.
5086 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5087 * sysdeps/pthread/pthread_cond_timedwait.c
5088 (__pthread_cond_timedwait): Likewise.
5089 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5090 (__pthread_cond_timedwait): Likewise.
5092 2004-02-18 Jakub Jelinek <jakub@redhat.com>
5094 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5095 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5096 * Makefile (tests): Add tst-rwlock13.
5097 * tst-rwlock13.c: New test.
5099 2004-02-16 Ulrich Drepper <drepper@redhat.com>
5101 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5102 (__condvar_tw_cleanup): Little optimization.
5103 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5105 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
5107 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5108 libpthread as "lib" parameter to SHLIB_COMPAT.
5109 (__novmx_siglongjmp): Fix typo in function name.
5110 (__novmx_longjmp): Fix typo in function name.
5112 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5114 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5117 * sysdeps/generic/pt-longjmp.c: Moved to...
5118 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
5120 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
5122 * Makefile (libpthread-routines): Add pt-cleanup.
5123 * pt-longjmp.c: Removed.
5124 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5125 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5126 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5127 Version longjmp, siglongjmp for GLIBC_2.3.4.
5128 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5130 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5132 * sysdeps/pthread/pthread_cond_timedwait.c
5133 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
5134 Reuse code. Add __builtin_expects.
5136 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5137 (__pthread_cond_timedwait): Get internal lock in case timeout has
5138 passed before the futex syscall.
5139 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5141 2004-01-20 Ulrich Drepper <drepper@redhat.com>
5143 * allocatestack.c: Pretty printing.
5145 * sysdeps/pthread/createthread.c (create_thread): Don't add
5146 CLONE_DETACHED bit if it is not necessary.
5148 2004-01-16 Ulrich Drepper <drepper@redhat.com>
5150 * pthread_getattr_np.c: Include ldsodefs.h.
5152 2004-01-16 Richard Henderson <rth@redhat.com>
5154 * allocatestack.c: Don't declare __libc_stack_end.
5155 * init.c (__pthread_initialize_minimal_internal): Likewise.
5156 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5158 2004-01-15 Richard Henderson <rth@redhat.com>
5160 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5161 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5162 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5163 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5164 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5165 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5166 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5167 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5169 2004-01-14 Ulrich Drepper <drepper@redhat.com>
5171 * init.c (pthread_functions): Make array const.
5173 2004-01-13 Ulrich Drepper <drepper@redhat.com>
5175 * allocatestack.c (__make_stacks_executable): Change interface.
5176 Check parameters. Pass parameter on to libc counterpart.
5177 * pthreadP.h: Change declaration.
5179 2004-01-13 Richard Henderson <rth@redhat.com>
5181 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5183 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5186 * sysdeps/alpha/Makefile: New file.
5187 * sysdeps/alpha/tcb-offsets.sym: New file.
5188 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5189 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5191 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5194 2004-01-08 Jakub Jelinek <jakub@redhat.com>
5196 * Makefile (tests): Add tst-backtrace1.
5197 * tst-backtrace1.c: New test.
5199 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
5201 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5202 register as second parameter to the REGISTER macro.
5203 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5204 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5205 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5206 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5207 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5208 of thread register as second parameter to REGISTER macro in 64 case.
5210 2004-01-03 Ulrich Drepper <drepper@redhat.com>
5212 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5213 (CFLAGS-getpid.o): Defined.
5214 (CFLAGS-getpid.os): Defined.
5216 2003-12-31 Ulrich Drepper <drepper@redhat.com>
5218 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5219 returned for main thread does not overlap with any other VMA.
5220 Patch by Jakub Jelinek.
5222 2003-12-29 Jakub Jelinek <jakub@redhat.com>
5224 * tst-raise1.c: Include stdio.h.
5226 2003-12-23 Jakub Jelinek <jakub@redhat.com>
5228 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5229 setting with __ASSUME_TGKILL || defined __NR_tgkill.
5230 If pid is 0, set it to selftid.
5231 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5232 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
5233 != 0, return self->tid without doing a syscall.
5234 * descr.h (struct pthread): Move pid field after tid.
5236 * Makefile (tests): Add tst-raise1.
5237 * tst-raise1.c: New file.
5239 2003-12-23 Roland McGrath <roland@redhat.com>
5241 * tst-oddstacklimit.c: New file.
5242 * Makefile (tests): Add it.
5243 (tst-oddstacklimit-ENV): New variable.
5245 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5246 value up to page size for __default_stacksize.
5248 2003-12-21 Ulrich Drepper <drepper@redhat.com>
5250 * Makefile (tests): Add tst-eintr5.
5251 * tst-eintr5.c: New file.
5253 * eintr.c (eintr_source): Prevent sending signal to self.
5255 * tst-eintr2.c (tf1): Improve error message.
5257 2003-12-20 Ulrich Drepper <drepper@redhat.com>
5259 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5260 * sysdeps/unix/sysv/linux/getpid.c: New file.
5261 * pthread_cancel.c: Add comment explaining use of PID field.
5262 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5263 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5264 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5265 temporarily to signal the field must not be relied on and updated
5267 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5268 temporarily negative.
5269 * sysdeps/unix/sysv/linux/raise.c: Likewise.
5271 2003-12-19 Ulrich Drepper <drepper@redhat.com>
5273 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
5274 (eintr_source): If ARG != NULL, use pthread_kill.
5275 * tst-eintr1.c: Adjust for this change.
5276 * tst-eintr2.c: Likewise.
5277 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5278 * tst-eintr3.c: New file.
5279 * tst-eintr4.c: New file.
5281 2003-12-19 Jakub Jelinek <jakub@redhat.com>
5283 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5284 if CANCELSTATE_BITMASK is set.
5285 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5288 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5289 (tests-reverse): Add tst-cancel23.
5290 * tst-cancel22.c: New test.
5291 * tst-cancel23.c: New test.
5293 2003-12-18 Ulrich Drepper <drepper@redhat.com>
5295 * tst-eintr1.c: Better error messages.
5297 * Makefile (tests): Add tst-eintr2.
5298 * tst-eintr2.c: New file.
5300 2003-12-18 Jakub Jelinek <jakub@redhat.com>
5302 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5303 (CFLAGS-tst-cancelx21.c): Set.
5304 * tst-cancel21.c: New test.
5305 * tst-cancelx21.c: New test.
5307 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
5309 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5310 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
5311 * pt-longjmp.c: Include jmpbuf-unwind.h.
5312 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5313 _JMPBUF_UNWINDS. Adjust compared pointers.
5314 * init.c (__pthread_initialize_minimal_internal): Initialize
5315 pd->stackblock_size.
5316 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5317 * sysdeps/alpha/jmpbuf-unwind.h: New file.
5318 * sysdeps/i386/jmpbuf-unwind.h: New file.
5319 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5320 * sysdeps/s390/jmpbuf-unwind.h: New file.
5321 * sysdeps/sh/jmpbuf-unwind.h: New file.
5322 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5323 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5324 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5325 (_JMPBUF_CFA_UNWINDS): Remove.
5326 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5328 2003-12-12 Jakub Jelinek <jakub@redhat.com>
5330 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5331 (CFLAGS-tst-cancelx20.c): Set.
5332 * tst-cancel20.c: New test.
5333 * tst-cancelx20.c: New test.
5335 2003-12-17 Ulrich Drepper <drepper@redhat.com>
5337 * init.c (__pthread_initialize_minimal_internal): Don't treat
5338 architectures with separate register stack special here when
5339 computing default stack size.
5341 2003-12-17 Roland McGrath <roland@redhat.com>
5343 * Makefile (tst-cancelx7-ARGS): New variable.
5344 Reportd by Greg Schafer <gschafer@zip.com.au>.
5346 2003-12-17 Jakub Jelinek <jakub@redhat.com>
5348 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
5349 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5350 (tst-stack3-ENV): Set.
5351 ($(objpfx)tst-stack3-mem): New.
5352 * tst-stack3.c: New test.
5354 2003-12-10 David Mosberger <davidm@hpl.hp.com>
5356 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5357 Add unwind directives. Drop unused .regstk directive.
5358 (_fini_EPILOG_BEGINS): Add unwind directives.
5360 2003-12-11 Ulrich Drepper <drepper@redhat.com>
5362 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5363 Assume parameter is a pointer.
5364 (lll_futex_wake): Likewise.
5365 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5367 (lll_futex_wake): Likewise.
5368 Reported by Boris Hu.
5369 * sysdeps/unix/sysv/linux/unregister-atfork.c
5370 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5372 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5374 2003-12-10 Ulrich Drepper <drepper@redhat.com>
5376 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5377 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5378 __rtld_lock_initialize for ld.so lock.
5379 Patch in part by Adam Li <adam.li@intel.com>.
5381 2003-12-02 David Mosberger <davidm@hpl.hp.com>
5383 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5384 in $(gnulib). Also, remove stale comment.
5386 2003-11-12 David Mosberger <davidm@hpl.hp.com>
5388 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5389 advantage of new syscall stub and optimize accordingly.
5391 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5392 from SYS_futex, to match expectations of
5393 sysdep.h:DO_INLINE_SYSCALL.
5394 (lll_futex_clobbers): Remove.
5395 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5396 (lll_futex_wake): Likewise.
5397 (lll_futex_requeue): Likewise.
5398 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5399 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5401 (__lll_mutex_lock): Likewise.
5402 (__lll_mutex_cond_lock): Likewise.
5403 (__lll_mutex_timed_lock): Likewise.
5404 (__lll_mutex_unlock): Likewise.
5405 (__lll_mutex_unlock_force): Likewise.
5407 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5408 comes before the include of <sysdep.h>.
5409 (THREAD_SELF_SYSINFO): New macro.
5410 (THREAD_SYSINFO): Likewise.
5411 (INIT_SYSINFO): New macro.
5412 (TLS_INIT_TP): Call INIT_SYSINFO.
5414 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5416 * sysdeps/pthread/createthread.c (create_thread): Use
5417 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5418 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5419 THREAD_SELF_SYSINFO instead of open code.
5420 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5421 (THREAD_SYSINFO): Likewise.
5423 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5425 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5427 2003-12-06 Ulrich Drepper <drepper@redhat.com>
5429 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5430 instead of .init. Patch by David Mosberger.
5432 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
5434 * sysdeps/pthread/configure.in: Remove broken declaration in C
5435 cleanup handling check.
5437 2003-11-30 Andreas Jaeger <aj@suse.de>
5439 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5440 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5443 2003-11-27 Jakub Jelinek <jakub@redhat.com>
5445 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5446 * pthread_attr_destroy.c: Include shlib-compat.h.
5447 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5448 is set in iattr->flags.
5449 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5451 2003-11-21 Jakub Jelinek <jakub@redhat.com>
5453 * Makefile (distribute): Add tst-cleanup4aux.c.
5455 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
5458 2003-11-21 Ulrich Drepper <drepper@redhat.com>
5460 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5461 pthread_cond_signal.
5463 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5464 store mutex address if the current value is ~0l.
5465 * sysdeps/pthread/pthread_cond_timedwait.c
5466 (__pthread_cond_timedwait): Likewise.
5467 * sysdeps/pthread/pthread_cond_broadcast.c
5468 (__pthread_cond_broadcast): Don't use requeue for pshared
5471 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5472 (__pthread_cond_wait): Don't store mutex address if the current
5474 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5475 (__pthread_cond_timedwait): Likewise.
5476 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5477 (__pthread_cond_broadcast): Don't use requeue for pshared
5480 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5481 element with ~0l for pshared condvars, with NULL otherwise.
5483 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5484 (__pthread_cond_wait): Don't store mutex address if the current
5486 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5487 (__pthread_cond_timedwait): Likewise.
5488 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5489 (__pthread_cond_broadcast): Don't use requeue for pshared
5492 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5493 * tst-cond12.c: New file.
5494 * tst-cond13.c: New file.
5496 2003-11-17 Ulrich Drepper <drepper@redhat.com>
5498 * sysdeps/pthread/configure.in: Make missing forced unwind support
5501 2003-11-11 Ulrich Drepper <drepper@redhat.com>
5503 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5505 2003-11-06 Ulrich Drepper <drepper@redhat.com>
5507 * Makefile: Add magic to clean up correctly.
5509 2003-11-05 Jakub Jelinek <jakub@redhat.com>
5511 * unwind.c (FRAME_LEFT): Define.
5512 (unwind_stop): Handle old style cleanups here.
5513 (__pthread_unwind): Handle old style cleanups only if
5514 !HAVE_FORCED_UNWIND.
5515 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5516 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5517 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5518 ($(objpfx)tst-cleanupx4): Likewise.
5519 * tst-cleanup4.c: New test.
5520 * tst-cleanup4aux.c: New.
5521 * tst-cleanupx4.c: New test.
5523 2003-11-04 Ulrich Drepper <drepper@redhat.com>
5525 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5526 lll_mutex_*lock macros to skip atomic operations on some archs.
5528 2003-11-03 Ulrich Drepper <drepper@redhat.com>
5530 * sysdeps/pthread/tst-timer.c (main): Initialize
5531 sigev2.sigev_value as well.
5533 2003-10-15 Roland McGrath <roland@redhat.com>
5535 * sysdeps/pthread/configure.in: Barf if visibility attribute support
5537 * sysdeps/pthread/configure: Regenerated.
5539 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5541 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5542 locking macros. No distinction between normal and mutex locking
5544 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5545 Merge bits from lowlevelmutex.S we still need.
5546 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5547 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5548 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5549 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5550 new mutex implementation.
5551 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5552 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5553 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5554 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5555 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5556 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5557 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5558 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5559 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5560 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5561 symbol for entry point to avoid cancellation.
5563 2003-10-07 Jakub Jelinek <jakub@redhat.com>
5565 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5567 (SAVE_OLDTYPE_0): Fix a typo.
5569 2003-10-03 Ulrich Drepper <drepper@redhat.com>
5571 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5572 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
5574 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5576 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5579 2003-10-02 Jakub Jelinek <jakub@redhat.com>
5581 * Makefile (tests): Add tst-cancel19.
5582 * tst-cancel19.c: New test.
5584 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5586 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5587 restoring of the old cancellation type.
5589 2003-09-30 Jakub Jelinek <jakub@redhat.com>
5591 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5593 2003-09-27 Wolfram Gloger <wg@malloc.de>
5595 * sysdeps/pthread/malloc-machine.h: New file
5597 2003-09-24 Roland McGrath <roland@redhat.com>
5599 * allocatestack.c (__make_stacks_executable): Don't ignore return
5600 value from _dl_make_stack_executable.
5602 2003-09-24 Ulrich Drepper <drepper@redhat.com>
5604 * allocatestack.c (__make_stacks_executable): Also change
5605 permission of the currently unused stacks.
5607 * allocatestack.c (change_stack_perm): Split out from
5608 __make_stacks_executable.
5609 (allocate_stack): If the required permission changed between the time
5610 we started preparing the stack and queueing it, change the permission.
5611 (__make_stacks_executable): Call change_stack_perm.
5613 * Makefile: Build tst-execstack-mod locally.
5614 * tst-execstack-mod.c: New file.
5616 2003-09-23 Jakub Jelinek <jakub@redhat.com>
5618 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5620 2003-09-23 Roland McGrath <roland@redhat.com>
5622 * tst-execstack.c: New file.
5623 * Makefile (tests): Add it.
5624 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5625 (LDFLAGS-tst-execstack): New variable.
5627 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5628 whether to use PROT_EXEC for stack mmap.
5629 (__make_stacks_executable): New function.
5630 * pthreadP.h: Declare it.
5631 * init.c (__pthread_initialize_minimal_internal): Set
5632 GL(dl_make_stack_executable_hook) to that.
5634 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5636 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5637 recommendation from AMD re avoidance of lock prefix.
5639 2003-09-22 Jakub Jelinek <jakub@redhat.com>
5641 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5642 lll_futex_timed_wait instead of lll_futex_wait.
5643 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5644 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5645 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5646 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5647 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5648 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5649 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5650 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5651 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5652 Completely revamp the locking macros. No distinction between
5653 normal and mutex locking anymore.
5654 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5655 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5656 __lll_lock_timedwait): Fix prototypes.
5657 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5658 __lll_lock_timedwait): Likewise.
5659 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5660 macros, add __builtin_expect.
5661 (lll_mutex_timedlock): Likewise. Fix return value.
5662 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5663 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5664 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5665 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5666 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5667 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5668 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5669 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5671 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5673 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5674 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5675 operation if possible.
5677 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5678 like jumping over the lock prefix.
5680 2003-09-21 Ulrich Drepper <drepper@redhat.com>
5682 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5683 locking macros. No distinction between normal and mutex locking
5685 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5686 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5687 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5688 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5689 locking. Merge bits from lowlevelmutex.S we still need.
5690 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5691 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5692 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5693 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5694 * Makefile (routines): Remove libc-lowlevelmutex.
5695 (libpthread-rountines): Remove lowlevelmutex.
5696 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5697 for new mutex implementation.
5698 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5699 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5700 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5701 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5702 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5704 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5706 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5707 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5708 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5709 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5710 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5711 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5712 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5713 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5715 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5717 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5718 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5719 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5721 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5722 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5724 2003-09-20 Ulrich Drepper <drepper@redhat.com>
5726 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5727 in parameters of asm with output parameters.
5729 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5730 type of DECR parameter to int.
5731 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5733 2003-09-18 Jakub Jelinek <jakub@redhat.com>
5735 * tst-attr3.c (tf, do_test): Print stack start/end/size and
5736 guardsize for each thread.
5738 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5740 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5741 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5742 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5744 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5745 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5747 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5748 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5749 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5750 (pthread_getaffinity_np): Add hidden_def.
5752 * Makefile (tests): Add tst-attr3.
5753 * tst-attr3.c: New test.
5755 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5757 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5759 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5760 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5762 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5764 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5765 * tst-align.c: Include tst-stack-align.h.
5766 (tf, do_test): Use TEST_STACK_ALIGN macro.
5768 2003-09-17 Ulrich Drepper <drepper@redhat.com>
5770 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5773 2003-09-16 Ulrich Drepper <drepper@redhat.com>
5775 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5776 stack-related values for the initial thread.
5778 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5780 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5782 2003-09-11 Ulrich Drepper <drepper@redhat.com>
5784 * pthread_mutex_lock.c: Minor code rearrangements.
5786 2003-09-05 Roland McGrath <roland@redhat.com>
5788 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5789 Instead, include ../nptl_db/db_info.c to do its magic.
5790 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5791 (__pthread_pthread_key_2ndlevel_size): Likewise.
5792 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5793 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5794 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5795 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5796 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5797 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5798 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5799 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5800 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5801 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5802 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5803 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5804 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5805 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5806 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5807 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5808 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5810 2003-09-08 Ulrich Drepper <drepper@redhat.com>
5812 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5813 of pthread_t to be compatible with LT.
5814 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5815 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5816 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5817 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5818 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5819 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5820 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5822 2003-09-04 Ulrich Drepper <drepper@redhat.com>
5824 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5826 2003-09-04 Jakub Jelinek <jakub@redhat.com>
5828 * unwind-forcedunwind.c: Move to...
5829 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5830 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5831 * sysdeps/pthread/jmpbuf-unwind.h: New file.
5832 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5833 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5834 * unwind.c: Include jmpbuf-unwind.h.
5835 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5837 2003-09-02 Jakub Jelinek <jakub@redhat.com>
5839 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5840 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5841 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5842 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5843 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5844 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5845 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5846 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5847 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5848 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5849 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5851 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5852 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5853 * Makefile (tests): Add tst-stack2.
5854 * tst-stack2.c: New test.
5855 * tst-stack1.c: Include limits.h and sys/param.h.
5856 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5858 * pthread_condattr_setpshared.c: Include errno.h.
5859 (pthread_condattr_setpshared): Return EINVAL if pshared
5860 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5862 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5863 defined symbol for entry point to avoid cancellation.
5864 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5866 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5868 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5870 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5872 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5874 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5875 __close_nocancel, __read_nocancel, __write_nocancel,
5876 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
5877 libpthread.so or librt.so, define to corresponding function
5878 without _nocancel suffix.
5879 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5880 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5881 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5883 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5885 2003-09-02 Ulrich Drepper <drepper@redhat.com>
5887 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5888 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5890 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5891 in subsections has a symbol associated with it.
5893 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5894 defined symbol for entry point to avoid cancellation.
5895 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5897 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5899 * Makefile (tests): Add tst-tls5.
5900 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5901 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5902 ($(objpfx)tst-tls5): New.
5903 ($(objpfx)tst-tls6.out): Likewise.
5904 (tests): Depend on $(objpfx)tst-tls6.out.
5905 * tst-tls3.c: Include stdint.h and pthreaddef.h.
5906 (do_test): Check pthread_self () return value alignment.
5907 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5908 (tf): Check pthread_self () return value alignment.
5909 * tst-tls5.c: New test.
5911 * tst-tls5mod.c: New.
5912 * tst-tls5moda.c: New.
5913 * tst-tls5modb.c: New.
5914 * tst-tls5modc.c: New.
5915 * tst-tls5modd.c: New.
5916 * tst-tls5mode.c: New.
5917 * tst-tls5modf.c: New.
5918 * tst-tls6.sh: New test.
5920 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5921 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5922 * init.c (pthread_functions): Initialize them.
5923 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5924 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5925 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5926 pthread_cond_timedwait@@GLIBC_2.3.2.
5928 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5930 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5931 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5932 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5933 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5934 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5935 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5937 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5939 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5940 _POSIX_THREAD_PRIORITY_SCHEDULING.
5941 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5943 2003-08-31 Ulrich Drepper <drepper@redhat.com>
5945 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5946 nested function, use static inline function from libio.h.
5947 Code by Richard Henderson.
5949 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5952 2003-08-30 Jakub Jelinek <jakub@redhat.com>
5954 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5955 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5956 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5957 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5958 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5959 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5960 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5961 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5962 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5963 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5964 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5965 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5966 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5967 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5968 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5969 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5970 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5971 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5972 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5973 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5974 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5975 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5976 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5977 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5978 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5979 * sysdeps/sparc/tls.h: New file.
5980 * sysdeps/sparc/tcb-offsets.sym: New file.
5981 * sysdeps/sparc/Makefile: New file.
5982 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5983 * init.c [__sparc__] (__NR_set_tid_address): Define.
5985 2003-08-29 Jakub Jelinek <jakub@redhat.com>
5987 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5988 _IO_release_lock): Define.
5990 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
5992 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5993 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
5995 2003-08-27 Ulrich Drepper <drepper@redhat.com>
5997 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5998 (__pthread_cleanup_class): Add missing return types of member
6001 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
6003 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6004 (lll_mutex_unlock_force): Add memory barrier between store and futex
6007 2003-08-25 Ulrich Drepper <drepper@redhat.com>
6009 * tst-cancel4.c (do_test): Also unlink tempfname and remove
6010 tempmsg in first loop.
6012 2003-08-18 Ulrich Drepper <drepper@redhat.com>
6014 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6015 _POSIX_THREAD_PRIORITY_SCHEDULING.
6016 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6018 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6020 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6021 (__rtld_lock_default_lock_recursive,
6022 __rtld_lock_default_unlock_recursive): Define.
6023 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6024 __rtld_lock_unlock_recursive): Define using
6025 GL(_dl_rtld_*lock_recursive).
6026 * init.c (__pthread_initialize_minimal_internal): Initialize
6027 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6028 Lock GL(_dl_load_lock) the same number of times as
6029 GL(_dl_load_lock) using non-mt implementation was nested.
6031 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6032 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6034 2003-08-06 Jakub Jelinek <jakub@redhat.com>
6036 * tst-cancel17.c (do_test): Make len2 maximum of page size and
6039 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6041 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6043 2003-08-03 Jakub Jelinek <jakub@redhat.com>
6045 * sysdeps/pthread/createthread.c (do_clone): Move error handling
6046 to first syscall error check. Move syscall error check for tkill
6047 into __ASSUME_CLONE_STOPPED #ifdef.
6049 2003-08-02 Ulrich Drepper <drepper@redhat.com>
6051 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6052 is not defined, do explicit synchronization.
6053 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
6054 is not defined also unlock pd->lock for non-debugging case in case
6056 * pthread_create.c (start_thread): Always get and release pd->lock
6057 if __ASSUME_CLONE_STOPPED is not defined.
6058 (start_thread_debug): Removed. Adjust users.
6059 * allocatestack.c (allocate_stack): Always initialize lock if
6060 __ASSUME_CLONE_STOPPED is not defined.
6061 * Makefile (tests): Add tst-sched1.
6062 * tst-sched1.c: New file.
6064 * sysdeps/pthread/createthread.c (do_clone): Only use
6065 sched_setschduler and pass correct parameters.
6067 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6069 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6070 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6071 PTHREAD_STACK_MIN in comments.
6073 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6075 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6076 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6078 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6079 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6080 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6081 (__pthread_cleanup_upto): Fix prototype.
6082 (_longjmp_unwind): Adjust caller.
6083 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6084 Change second argument to const struct pointer.
6085 * tst-sem8.c (main): Remove unused s2 and s3 variables.
6086 * tst-sem9.c (main): Likewise.
6087 * unwind.c: Include string.h for strlen prototype.
6089 2003-07-31 Ulrich Drepper <drepper@redhat.com>
6091 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6092 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6093 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6095 Patch by Nicholas Miell <nmiell@attbi.com>.
6097 2003-07-30 Jakub Jelinek <jakub@redhat.com>
6099 * init.c (__pthread_initialize_minimal_internal): Initialize
6100 GL(dl_init_static_tls).
6101 * pthreadP.h (__pthread_init_static_tls): New prototype.
6102 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6104 * Makefile (tests): Add tst-tls4.
6105 (modules-names): Add tst-tls4moda and tst-tls4modb.
6106 ($(objpfx)tst-tls4): Link against libdl and libpthread.
6107 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6109 * tst-tls4.c: New file.
6110 * tst-tls4moda.c: New file.
6111 * tst-tls4modb.c: New file.
6113 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
6115 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6116 before __timer_dealloc.
6117 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6118 Don't call list_unlink.
6120 2003-07-29 Roland McGrath <roland@redhat.com>
6122 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6124 2003-07-25 Jakub Jelinek <jakub@redhat.com>
6126 * tst-cancel17.c (do_test): Check if aio_cancel failed.
6127 Don't reuse struct aiocb A if it failed.
6128 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6129 not just one byte, as that does not block.
6131 2003-07-22 Jakub Jelinek <jakub@redhat.com>
6133 * sysdeps/pthread/unwind-resume.c: New file.
6134 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6135 unwind-resume in csu subdir.
6136 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6138 (librt-sysdep_routines, librt-shared-only-routines): Add
6140 * sysdeps/pthread/rt-unwind-resume.c: New file.
6141 * unwind-forcedunwind.c: New file.
6142 * Makefile (libpthread-routines): Add unwind-forcedunwind.
6143 (libpthread-shared-only-routines): Likewise.
6144 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6145 * pthreadP.h (pthread_cancel_init): New prototype.
6146 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6148 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6149 attr argument const struct pthread_attr *.
6151 * res.c (__res_state): Return __resp.
6152 * descr.h: Include resolv.h.
6153 (struct pthread): Add res field.
6154 * pthread_create.c: Include resolv.h.
6155 (start_thread): Initialize __resp.
6156 * Makefile (tests): Add tst-_res1.
6157 (module-names): Add tst-_res1mod1, tst-_res1mod2.
6158 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6159 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6161 * tst-_res1.c: New file.
6162 * tst-_res1mod1.c: New file.
6163 * tst-_res1mod2.c: New file.
6165 2003-07-21 Ulrich Drepper <drepper@redhat.com>
6167 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6169 * Makefile: Define various *-no-z-defs variables for test DSOs
6170 which has undefined symbols.
6172 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
6174 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6175 Retry if the stwcx fails to store once_control.
6177 2003-07-20 Ulrich Drepper <drepper@redhat.com>
6179 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6180 pthread_attr_setaffinity.
6181 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6182 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6183 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6184 * pthread_attr_destroy.c: Free cpuset element if allocated.
6185 * pthread_create.c: Pass iattr as additional parameter to
6187 * sysdeps/pthread/createthread.c: If attribute is provided and
6188 a new thread is created with affinity set or scheduling parameters,
6189 start thread with CLONE_STOPPED.
6190 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6191 pthread_attr_setaffinity.
6192 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6195 2003-07-15 Ulrich Drepper <drepper@redhat.com>
6197 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6199 2003-07-14 Ulrich Drepper <drepper@redhat.com>
6201 * sysdeps/pthread/configure.in: Require CFI directives also for
6204 2003-07-15 Jakub Jelinek <jakub@redhat.com>
6206 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6209 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6211 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6213 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6214 registers as variables. Call __pthread_mutex_unlock_usercnt.
6215 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6216 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6217 not self pointer in __writer. Compare with TID to determine
6219 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6220 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6222 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6224 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6225 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6226 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6227 macros also when compiling librt.
6229 2003-07-11 Jakub Jelinek <jakub@redhat.com>
6231 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6232 -fasynchronous-unwind-tables.
6233 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6234 (PSEUDO): Add cfi directives.
6235 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6237 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6240 2003-07-08 Jakub Jelinek <jakub@redhat.com>
6242 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6243 __pthread_unregister_cancel): Add prototypes and hidden_proto.
6244 * unwind.c (__pthread_unwind_next): Add hidden_def.
6245 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6247 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6248 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6249 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6251 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6252 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6254 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6255 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6256 __pthread_unregister_cancel and __pthread_unwind_next.
6258 2003-07-04 Jakub Jelinek <jakub@redhat.com>
6260 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6261 different symbol for the cancellation syscall wrapper and
6262 non-cancellation syscall wrapper.
6263 (PSEUDO_END): Define.
6265 2003-07-05 Richard Henderson <rth@redhat.com>
6267 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6268 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6269 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6270 return actual return value from the syscall, not 0.
6272 2003-07-07 Ulrich Drepper <drepper@redhat.com>
6274 * descr.h (struct pthread): Add pid field.
6275 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6276 (__reclaim_stacks): Likewise.
6277 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6278 also check for PID of the signal source.
6279 (__pthread_initialize_minimal_internal): Also initialize pid field
6280 of initial thread's descriptor.
6281 * pthread_cancel.c: Use tgkill instead of tkill if possible.
6282 * sysdeps/unix/sysv/linux/fork.c: Likewise.
6283 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6284 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6285 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6287 2003-07-05 Ulrich Drepper <drepper@redhat.com>
6289 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6290 Fix use of parameter.
6291 (__libc_cleanup_pop): Likewise.
6293 2003-07-04 Ulrich Drepper <drepper@redhat.com>
6295 * init.c (sigcancel_handler): Change parameters to match handler
6296 for SA_SIGACTION. Check signal number and code to recognize
6297 invalid invocations.
6299 2003-07-03 Roland McGrath <roland@redhat.com>
6301 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6302 Apply sizeof (struct pthread) bias to r13 value.
6304 2003-07-03 Ulrich Drepper <drepper@redhat.com>
6306 * sysdeps/pthread/configure.in: Require CFI directives.
6308 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6310 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6311 libpthread compilation.
6312 * unwind.c (__pthread_unwind): Add hidden_def.
6313 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6315 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6317 * libc-cancellation.c (__libc_cleanup_routine): Define.
6318 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6319 (__pthread_cleanup_pop): Define.
6321 2003-07-01 Richard Henderson <rth@redhat.com>
6323 * sysdeps/alpha/elf/pt-initfini.c: New file.
6324 * sysdeps/alpha/pthread_spin_lock.S: New file.
6325 * sysdeps/alpha/pthread_spin_trylock.S: New file.
6326 * sysdeps/alpha/pthreaddef.h: New file.
6327 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6328 * sysdeps/alpha/tls.h: New file.
6329 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6330 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6331 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6332 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6333 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6334 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6335 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6336 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6337 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6338 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6340 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6342 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6343 cleanup support and unwind info.
6345 2003-06-30 Ulrich Drepper <drepper@redhat.com>
6347 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6348 Use correct cleanup handler registration. Add unwind info.
6349 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6350 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6351 * tst-once3.c: Add cleanup handler and check it is called.
6352 * tst-once4.c: Likewise.
6353 * tst-oncex3.c: New file.
6354 * tst-oncex4.c: New file.
6355 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6357 2003-06-29 Ulrich Drepper <drepper@redhat.com>
6359 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6361 2003-06-27 Ulrich Drepper <drepper@redhat.com>
6363 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6364 (tf_msgsnd): Likewise.
6366 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6367 premature returns a bit more.
6369 2003-06-26 Ulrich Drepper <drepper@redhat.com>
6371 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6372 definition to the front.
6374 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6375 the cleanup functions to make the names unique. Fix dwarf opcode
6377 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6378 functions to make the names unique. Fix CFA offset for two blocks.
6380 2003-06-25 Ulrich Drepper <drepper@redhat.com>
6382 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6383 missing closing braces.
6384 Patch by Christophe Saout <christophe@saout.de>.
6386 2003-06-24 Roland McGrath <roland@redhat.com>
6388 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6390 2003-06-24 Ulrich Drepper <drepper@redhat.com>
6392 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6393 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6395 * pthreadP.h: Declare __find_thread_by_id.
6396 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6397 * pthread_clock_gettime.c: Allow using other thread's clock.
6398 * pthread_clock_settime.c: Likewise.
6399 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6400 * Makefile: Add rules to build and run tst-clock2.
6401 * tst-clock2.c: New file.
6403 2003-06-23 Ulrich Drepper <drepper@redhat.com>
6405 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6406 to use exception-based cleanup handler.
6407 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6409 * tst-cond8.c (ch): Announce that we are done.
6411 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6413 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6414 Also test aio_suspend with timeout value.
6416 2003-06-22 Ulrich Drepper <drepper@redhat.com>
6418 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6419 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6422 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6423 (__pthread_mutex_lock_internal): Likewise.
6424 (__pthread_mutex_unlock_internal): Likewise.
6425 (__pthread_mutex_unlock_usercnt): Declare.
6426 * pthread_mutex_destroy.c: Always fail if used in any way.
6427 * pthread_mutex_init.c: Update comment.
6428 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6429 * pthread_mutex_timedlock.c: Adjust __nusers.
6430 * pthread_mutex_trylock.c: Adjust __nusers.
6431 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6432 and public interfaces are wrapper with pass additional parameter.
6433 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6435 * tst-mutex8.c: New file.
6436 * Makefile (tests): Add tst-mutex8.
6437 * sysdeps/pthread/pthread_cond_timedwait.c: Call
6438 __pthread_mutex_unlock_usercnt.
6439 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6440 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6441 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6442 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6443 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6444 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6445 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6447 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6448 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6449 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6450 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6451 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6453 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6454 * pthread_mutex_timedlock.c: Likewise.
6455 * pthread_mutex_trylock.c: Adjust __nusers.
6456 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6457 * tst-mutex9.c: New file.
6458 * Makefile (tests): Add tst-mutex9.
6459 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6460 * sysdeps/ia64/tls.h: Likewise.
6461 * sysdeps/powerpc/tls.h: Likewise.
6462 * sysdeps/s390/tls.h: Likewise.
6463 * sysdeps/sh/tls.h: Likewise.
6464 * sysdeps/x86_64/tls.h: Likewise.
6465 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6466 Change type of __owner.
6467 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6468 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6469 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6470 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6471 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6473 2003-06-19 Jakub Jelinek <jakub@redhat.com>
6475 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6476 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6478 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6479 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
6480 instead of nr to lll_futex_wake. Only set errno and return -1
6483 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6484 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6485 return actual return value from the syscall, not 0.
6487 2003-06-18 Ulrich Drepper <drepper@redhat.com>
6489 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6490 find a random value.
6491 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
6494 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6495 compat_timer_settime.
6496 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6497 compat_timer_gettime.
6498 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6499 compat_timer_getoverrun.
6500 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6501 compat_timer_delete.
6503 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6504 error-checking mutex detect busy mutexes.
6506 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6508 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6509 Add ax to clobber list.
6510 (lll_mutex_cond_lock): Likewise.
6511 (lll_mutex_unlock): Likewise.
6512 (lll_lock): Likewise.
6513 (lll_unlock): Likewise.
6515 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6516 * tst-cancel18.c: New file.
6517 * tst-cancelx18.c: New file.
6519 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6522 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6523 * tst-cancel17.c: New file.
6524 * tst-cancelx17.c: New file.
6526 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6527 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6528 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6530 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6532 2003-06-16 Jakub Jelinek <jakub@redhat.com>
6534 * sysdeps/pthread/createthread.c (create_thread): Set
6535 header.multiple_threads unconditionally.
6536 * allocatestack.c (allocate_stack): Likewise.
6537 * descr.h (struct pthread): Add header.multiple_threads
6539 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6540 Define for librt. #error if neither libpthread, libc nor librt.
6541 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6543 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6544 CDISABLE): Likewise.
6545 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6546 CDISABLE): Likewise.
6547 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6548 CDISABLE): Likewise.
6549 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6550 CDISABLE): Likewise. Access header.multiple_threads outside of
6551 libc and libpthread.
6552 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6554 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6555 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6557 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6559 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6560 Also test early cancellation before the thread reaches the cancellation
6563 * Makefile: Compile forward.c with exceptions.
6565 * sysdeps/unix/sysv/linux/sleep.c: New file.
6567 2003-06-16 Ulrich Drepper <drepper@redhat.com>
6569 * Makefile: Add CFLAGS definition to compile function wrappers
6570 duplicated from libc with exceptions.
6571 * tst-cancel4.c: Also check cancellation handlers.
6573 * Makefile: Add rules to build and run tst-cancel16 and
6574 tst-cancelx16. Add missing CFLAGS definitions.
6575 * tst-cancel16.c: New file.
6576 * tst-cancelx16.c: New file.
6578 2003-06-15 Ulrich Drepper <drepper@redhat.com>
6580 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6581 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6582 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6583 (DL_SYSINFO_IMPLEMENTATION): Likewise.
6585 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6586 (LIBC_CANCEL_RESET): Likewise.
6587 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6588 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6590 (CFLAGS-libcrt-cancellation.c): Define.
6591 * sysdeps/pthread/librt-cancellation.c: New file.
6592 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6593 macros also when compiling librt.
6594 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6595 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6596 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6597 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6598 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6599 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6600 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6602 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6603 compat_timer_create.
6605 2003-06-14 Ulrich Drepper <drepper@redhat.com>
6607 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6609 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6611 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6612 Add libc_hidden_def.
6614 2003-06-13 Roland McGrath <roland@redhat.com>
6616 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6617 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6619 2003-06-11 Ulrich Drepper <drepper@redhat.com>
6621 * allocatestack.c (queue_stack): Always inline.
6622 * ptreadhP.h (__do_cancel): Likewise.
6624 2003-06-10 Jakub Jelinek <jakub@redhat.com>
6626 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6629 2003-06-10 Ulrich Drepper <drepper@redhat.com>
6631 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6632 (__pthread_cond_signal): Remove incorrect second addition for
6635 2003-06-09 Ulrich Drepper <drepper@redhat.com>
6637 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6638 (__pthread_cond_signal): Use correct futex pointer in
6639 __lll_mutex_lock_wait call.
6641 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6642 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6644 2003-06-08 Ulrich Drepper <drepper@redhat.com>
6646 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6648 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6651 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6652 hand-written CFI generation code. Since ENTRY/END also initiated
6653 CFI frames this caused two CFI sets to be generated.
6655 2003-06-07 Ulrich Drepper <drepper@redhat.com>
6657 * cleanup_routine.c: New file.
6658 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6659 * sysdeps/pthread/pthread.h: Add support for fully exception-based
6661 * Makefile (libpthread-routines): Add cleanup_routine.
6662 Add more CFLAGS variables to compile with exceptions. Add comments
6663 why which file needs unwind tables.
6664 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6666 * tst-cancelx1.c: New file.
6667 * tst-cancelx2.c: New file.
6668 * tst-cancelx3.c: New file.
6669 * tst-cancelx4.c: New file.
6670 * tst-cancelx5.c: New file.
6671 * tst-cancelx6.c: New file.
6672 * tst-cancelx7.c: New file.
6673 * tst-cancelx8.c: New file.
6674 * tst-cancelx9.c: New file.
6675 * tst-cancelx10.c: New file.
6676 * tst-cancelx11.c: New file.
6677 * tst-cancelx12.c: New file.
6678 * tst-cancelx13.c: New file.
6679 * tst-cancelx14.c: New file.
6680 * tst-cancelx15.c: New file.
6681 * tst-cleanupx0.c: New file.
6682 * tst-cleanupx0.expect: New file.
6683 * tst-cleanupx1.c: New file.
6684 * tst-cleanupx2.c: New file.
6685 * tst-cleanupx3.c: New file.
6687 * tst-cleanup0.c: Make standard compliant.
6688 * tst-cleanup1.c: Likewise.
6690 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6691 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6692 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6693 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6694 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6695 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6696 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6698 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6699 * tst-cancel12.c: New file.
6700 * tst-cancel13.c: New file.
6701 * tst-cancel14.c: New file.
6702 * tst-cancel15.c: New file.
6703 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6706 * tst-cancel1.c: Add some comments.
6708 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6711 2003-06-06 Ulrich Drepper <drepper@redhat.com>
6713 * Makefile (CFLAGS-pthread_cancel.c): Define.
6715 2003-06-05 Ulrich Drepper <drepper@redhat.com>
6717 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6718 Change type of __writer element to int.
6719 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6720 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6721 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6722 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6723 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6724 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6725 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6726 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6727 Compare with TID to determine deadlocks.
6728 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6729 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6730 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6731 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6732 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6733 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6735 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6737 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6738 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6739 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6741 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6743 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6744 * Makefile (tests): Add tst-rwlock12.
6745 * tst-rwlock12.c: New file.
6747 2003-06-05 Jakub Jelinek <jakub@redhat.com>
6749 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6750 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6751 Remove bogus hidden_proto.
6752 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6754 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6755 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6756 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6757 ___lll_mutex_timedlock): Likewise.
6759 2003-06-04 Ulrich Drepper <drepper@redhat.com>
6761 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6762 (__pthread_cond_signal): Add some code to eventually handle
6765 2003-06-01 Ulrich Drepper <drepper@redhat.com>
6767 * Makefile (tests): Add tst-exec4.
6768 (tst-exec4-ARGS): Define.
6769 * tst-exec4.c: New file.
6771 2003-05-31 Ulrich Drepper <drepper@redhat.com>
6773 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6774 Also fail if tv_nsec < 0.
6775 (__lll_timedwait_tid): Likewise.
6776 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6777 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6779 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6781 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6783 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6785 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6787 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6790 * Makefile (tests): Add tst-sem8 and tst-sem9.
6791 * tst-sem8.c: New file.
6792 * tst-sem9.c: New file.
6793 * sem_open.c: Fix creation of in_use record if the file exists but
6796 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6799 * sysdeps/pthread/timer_create.c (timer_create): In case
6800 evp==NULL, assign timer ID to sival_ptr.
6802 * descr.h (struct pthread_unwind_buf): Change type of prev element to
6803 struct pthread_unwind_buf *.
6804 (struct pthread): Likewise for cleanup_jmp_buf element.
6806 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6807 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6808 * unwind.c (__pthread_unwind_next): Likewise.
6810 2003-05-30 Ulrich Drepper <drepper@redhat.com>
6812 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6813 (lll_futex_timed_wait): Use int for futex value parameter.
6814 (lll_futex_wake): Likewise.
6815 (lll_futex_requeue): Likewise.
6817 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6818 Replace one memory operation with one register operation.
6820 * tst-join4.c (do_test): Fix error message.
6822 * tst-rwlock6.c (do_test): Use correct format specifier.
6824 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6825 (__lll_mutex_lock_wait): Replace one memory operation with one
6827 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6828 (__lll_mutex_lock_wait): Likewise.
6830 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6831 (__lll_mutex_cond_lock): Add one to value parameter of
6832 __lll_lock_wait to reflect reality in the futex syscall.
6833 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6834 (lll_mutex_cond_lock): Likewise.
6836 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6838 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6840 (lll_mutex_cond_lock): Define.
6842 2003-05-29 Ulrich Drepper <drepper@redhat.com>
6844 * Makefile (tests): Add tst-signal6.
6845 * tst-signal6.c: New file.
6847 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6848 (__lll_mutex_unlock_force): New function
6849 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6851 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6852 (__lll_mutex_unlock_force): New function.
6853 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6855 * tst-rwlock7.c (do_test): Use correct format specifier.
6857 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6858 Find break parameter in correct asm argument.
6860 2003-05-27 Jakub Jelinek <jakub@redhat.com>
6862 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6864 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6866 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6868 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6869 lll_futex_requeue, lll_mutex_unlock_force): Define.
6871 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6873 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6874 (pthread_cond_t): Add __mutex.
6875 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6876 lll_futex_requeue, lll_mutex_unlock_force): Define.
6878 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6880 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6881 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6883 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6885 (lll_futex_wait, lll_futex_wake): Define.
6886 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6887 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6888 FUTEX_REQUEUE instead of FUTEX_WAIT.
6889 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6890 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6891 mutex which was used in condvar structure. Call
6892 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6893 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6895 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6896 include tcb-offsets.h. Read wakeup value in locked region.
6897 Use the value of gbr register as THREAD_ID.
6898 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6899 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6900 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6902 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6905 2003-05-28 Ulrich Drepper <drepper@redhat.com>
6907 * sysdeps/pthread/pthread_cond_broadcast.c
6908 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6910 2003-05-26 Ulrich Drepper <drepper@redhat.com>
6912 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6913 typo in register name.
6914 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6915 correctly. Actually use requeue. Little optimization.
6916 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6917 mutex address early. Handle cancellation state as 32-bit value.
6918 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6919 Remove unnecessary label.
6921 2003-05-25 Ulrich Drepper <drepper@redhat.com>
6923 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6924 instead of FUTEX_WAIT.
6925 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6926 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6927 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6928 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6929 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6930 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6931 used in condvar structure. Call __pthread_mutex_cond_lock instead
6932 of __pthread_mutex_lock_internal.
6933 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6934 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6935 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6936 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6937 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6938 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6939 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6940 Add pthread_mutex_cond_lock.
6941 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6942 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6943 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6944 lll_mutex_cond_lock.
6945 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6946 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6947 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6949 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6950 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6952 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6953 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6955 * pthreadP.h: Declare __pthread_mutex_cond_lock.
6956 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6957 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
6958 macro don't define aliases.
6960 * cancellation.c: Remove __pthread_enable_asynccancel_2.
6961 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6962 * sysdeps/pthread/pthread_cond_timedwait.c: Use
6963 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6964 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6965 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6966 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6967 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6968 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6970 2003-05-17 Ulrich Drepper <drepper@redhat.com>
6972 * sem_open.c: Fix one endless loop. Implement correct semantics
6973 wrt opening the same semaphore more then once.
6974 * sem_close.c: Adjust for sem_open change.
6975 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
6976 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6977 * Makefile (tests): Add tst-sem7.
6978 * tst-sem7.c: New file.
6980 2003-05-16 Roland McGrath <roland@redhat.com>
6982 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6983 uninitialized variable braino.
6985 2003-05-16 Ulrich Drepper <drepper@redhat.com>
6987 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6988 test for syscall availability.
6990 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6991 __no_posix_timers to -1 if the syscalls don't exist.
6993 * pthread_join.c (pthread_join): Set tid field of the joined
6994 thread to -1. This isn't necessary but helps to recognize some
6995 error conditions with almost no cost.
6997 * allocatestack.c (FREE_P): Also negative values indicate an
7000 * unwind.c: Include <unistd.h>.
7002 2003-05-14 Ulrich Drepper <drepper@redhat.com>
7004 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7006 2003-05-14 Jakub Jelinek <jakub@redhat.com>
7008 * Makefile (crti-objs, crtn-objs): New variables.
7009 (omit-deps, extra-objs): Add crtn.
7010 ($(objpfx)libpthread.so): Depend on both crti and crtn
7011 and links to them in multidir.
7012 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7014 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
7016 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7017 (lll_mutex_unlock): Use atomic_exchange_rel.
7019 2003-05-11 Ulrich Drepper <drepper@redhat.com>
7021 * cond-perf.c (cons): Add missing locking around setting of alldone.
7023 2003-05-10 Ulrich Drepper <drepper@redhat.com>
7025 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7027 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7029 2003-05-09 Ulrich Drepper <drepper@redhat.com>
7031 * tst-sem6.c: New file.
7032 * Makefile (tests): Add tst-sem6.
7034 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7035 Use atomic_exchange_rel instead of atomic_exchange.
7036 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7039 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7040 code for lll_futex_wait and lll_futex_wake in static apps. Use
7041 vsyscall is possible.
7043 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7044 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7045 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7046 pthread_setaffinity_np.
7047 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7048 and pthread_setaffinity_np.
7049 * Makefile (libpthread-routines): Add pthread_getaffinity and
7050 pthread_setaffinity.
7052 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7053 use it in case mmap to allocate the stack fails.
7054 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7055 ARCH_MAP_FLAGS here.
7056 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7059 2003-05-08 Ulrich Drepper <drepper@redhat.com>
7061 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7062 handler implementation. It is now lockless in fork().
7063 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7064 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7065 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
7066 declare the __fork_*_lists.
7067 (struct fork_handler): Include pointers to all three functions.
7068 Add next, refcntr and need_signal elements.
7069 (__fork_handlers): New declaration.
7070 (__register_atfork_malloc): Remove declaration.
7071 (HAVE_register_atfork_malloc): Remove definition.
7072 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7073 __pthread_child_handler variable.
7074 (__libc_pthread_init): Use __register_atfork instead of explicitly
7076 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7078 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7080 * unwind.c (unwind_cleanup): Print error message and then abort. This
7081 function must never be reached.
7083 * cond-perf.c: New file.
7085 2003-05-05 Ulrich Drepper <drepper@redhat.com>
7087 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7089 2003-05-04 Roland McGrath <roland@redhat.com>
7091 * Makefile ($(objpfx)../libc.so): New target.
7093 2003-05-02 Ulrich Drepper <drepper@redhat.com>
7095 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7096 (pthread_condattr_t): Size is only an int, don't use long for
7098 (pthread_mutexattr_t): Likewise.
7099 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7100 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7101 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7103 2003-05-01 Ulrich Drepper <drepper@redhat.com>
7105 * sysdeps/i386/tls.h: Define THREAD_ID.
7106 * sysdeps/ia64/tls.h: Likewise.
7107 * sysdeps/powerpc/tls.h: Likewise.
7108 * sysdeps/s390/tls.h: Likewise.
7109 * sysdeps/sh/tls.h: Likewise.
7110 * sysdeps/x86_64/tls.h: Likewise.
7111 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7113 * pthread_mutex_timedlock.c: Likewise.
7114 * pthread_mutex_trylock.c: Likewise.
7115 * pthread_mutex_unlock.c: Likewise.
7116 * pthread_rwlock_trywrlock.c: Likewise.
7117 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7118 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7119 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7120 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7122 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7125 2003-04-29 Jakub Jelinek <jakub@redhat.com>
7127 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7128 (__SIZEOF_PTHREAD_COND_T): Define to 48.
7129 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7130 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7131 Make __align long long instead of long.
7132 (pthread_rwlock_t): Formatting.
7133 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7134 (pthread_rwlock_t): Formatting.
7135 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7136 (pthread_cond_t): Make __align long long instead of long.
7137 (pthread_rwlock_t): Move __flags field to the same position as in
7140 2003-04-30 Ulrich Drepper <drepper@redhat.com>
7142 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7143 * tst-rwlock7.c (do_test): Likewise.
7145 2003-04-26 Roland McGrath <roland@redhat.com>
7147 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7149 2003-04-22 Jakub Jelinek <jakub@redhat.com>
7151 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7152 sizeof (struct pthread).
7153 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7155 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7157 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7159 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7161 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7163 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7165 (NO_TLS_OFFSET): Define.
7166 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7167 add TLS_TCB_SIZE unnecessarily.
7169 2003-04-22 Roland McGrath <roland@redhat.com>
7171 * Makeconfig (shared-thread-library): Reverse link order to work
7174 2003-04-22 Ulrich Drepper <drepper@redhat.com>
7176 * semaphore.h: Fix typo in comment.
7178 2003-04-21 Ulrich Drepper <drepper@redhat.com>
7180 * sysdeps/pthread/sigfillset.c: New file.
7182 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7183 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7184 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7185 * sysdeps/pthread/sigaction.c: Likewise.
7186 * sysdeps/pthread/sigprocmask.c: New file.
7187 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7189 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7190 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
7193 2003-04-19 Ulrich Drepper <drepper@redhat.com>
7195 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7196 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7198 * sysdeps/unix/sysv/linux/unregister-atfork.c
7199 (__unregister_atfork): Don't free memory not allocated dynamically.
7201 * semaphore.h: Remove __THROW marker from cancellation points.
7202 * nptl/sysdeps/pthread/pthread.h: Likewise.
7204 2003-04-18 Ulrich Drepper <drepper@redhat.com>
7206 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7207 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7210 2003-04-16 Jakub Jelinek <jakub@redhat.com>
7212 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7214 2003-04-15 Roland McGrath <roland@redhat.com>
7216 * forward.c (__pthread_unwind): Tweak to avoid warning.
7218 2003-04-15 Ulrich Drepper <drepper@redhat.com>
7220 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7222 2003-04-14 Ulrich Drepper <drepper@redhat.com>
7224 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7225 overflow CFA advance instructions.
7226 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7228 2003-04-14 Jakub Jelinek <jakub@redhat.com>
7230 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7231 * sysdeps/i386/pthread_spin_lock.c: Likewise.
7232 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
7235 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7236 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7237 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7238 DW_CFA_advance_loc for .Laddl-.Lsubl.
7240 2003-04-13 Ulrich Drepper <drepper@redhat.com>
7242 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7243 position-independent unwind data for static libraries.
7244 Add missing unwind info. Add comments.
7246 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7247 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7248 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7249 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7251 2003-04-12 Ulrich Drepper <drepper@redhat.com>
7253 * Makefile: Make sure all cancellation points are compiled with
7254 exception and asynchronous unwind tables.
7256 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7257 which mishandles loading of global object addresses in PIC.
7258 (THREAD_SETMEM_NC): Likewise.
7260 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7262 * pthread.h: Define new data structure for cleanup buffer. Declare
7263 new cleanup handler interfaces.
7264 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
7265 (struct pthread): Add cleanup_jmp_buf pointer. Define
7266 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7267 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
7268 it. Declare old cleanup handler installation functions.
7269 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
7271 * cleanup_defer.c: Likewise.
7272 * cleanup_compat.c: New file. Old cleanup code.
7273 * cleanup_def_compat.c: New file. Old cleanup code.
7274 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7275 if own thread descriptor.
7276 * unwind.c: New file.
7277 * forward.c: Add __pthread_unwind.
7278 * init.c (pthread_functions): Add __pthread_unwind.
7279 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7280 Add ptr___pthread_unwind.
7281 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7282 and unwind function.
7283 * Makefile (libpthread-routines): Add cleanup_compat,
7284 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
7285 table generation if necessary.
7286 * version.c: Record whether unwind support is compiled in.
7287 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7288 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7290 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7291 complication to generate unwind information for syscall wrappers.
7292 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7293 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7294 __cleanup_fct_attribute.
7296 * Makefile: Add rules to build and run tst-cleanup0.
7297 * tst-cleanup0.c: New file.
7298 * tst-cleanup0.expect: New file.
7300 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
7301 caller. Optimize to avoid often unecessary local variable.
7303 2003-04-11 Roland McGrath <roland@redhat.com>
7305 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7306 sets variable `multidir'; include that.
7307 (generated): Add it.
7308 ($(objpfx)$(multidir)/crti.o): New target.
7309 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7311 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7313 * tst-attr2.c (do_test): Add cast to avoid warning.
7314 * tst-mutex4.c (do_test): Likewise.
7316 2003-04-10 Ulrich Drepper <drepper@redhat.com>
7318 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7321 2003-04-09 Ulrich Drepper <drepper@redhat.com>
7323 * Makefile (tests): Add tst-detach1.
7324 * tst-detach1.c: New file.
7326 2003-04-08 Ulrich Drepper <drepper@redhat.com>
7328 * sysdeps/pthread/pthread.h: Remove duplicate
7329 pthread_cleanup_{push,pop} definitions.
7331 * tst-barrier2.c: Eliminate warnings.
7332 * tst-cancel4.c: Likewise.
7333 * tst-cond4.c: Likewise.
7334 * tst-cond6.c: Likewise.
7335 * tst-detach1.c: Likewise.
7336 * tst-rwlock4.c: Likewise.
7337 * tst-rwlock6.c: Likewise.
7338 * tst-rwlock7.c: Likewise.
7339 * tst-sem3.c: Likewise.
7340 * tst-spin2.c: Likewise.
7341 * tst-umask1.c: Likewise.
7343 2003-04-07 Ulrich Drepper <drepper@redhat.com>
7345 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7347 2003-04-06 Ulrich Drepper <drepper@redhat.com>
7349 * descr.h (struct pthread): Move cancelhandling member to the front.
7351 2003-04-05 Ulrich Drepper <drepper@redhat.com>
7353 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7354 malloc_parent, and malloc_child statically.
7355 (__register_atfork_malloc): New function.
7356 (free_mem): Don't free any of the malloc_* variables on the list.
7357 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7358 Define HAVE_register_atfork_malloc.
7360 2003-04-04 Ulrich Drepper <drepper@redhat.com>
7362 * sysdeps/pthread/createthread.c (create_thread): Add some more
7363 comments explaining when to set multiple_threads and when not.
7365 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7366 THREAD_ATOMIC_BIT_SET if not already defined.
7367 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7368 THREAD_ATOMIC_BIT_SET:
7369 * sysdeps/x86_64/tls.h: Likewise.
7370 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7371 THREAD_ATOMIC_CMPXCHG_VAL.
7372 (_pthread_cleanup_pop_restore): Likewise.
7373 * cancellation.c (__pthread_enable_asynccancel): Likewise.
7374 (__pthread_enable_asynccancel_2): Likewise.
7375 (__pthread_disable_asynccancel): Likewise.
7376 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7377 (__libc_disable_asynccancel): Likewise.
7378 * init.c (sigcancel_handler): Likewise.
7379 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7380 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7382 2003-04-03 Ulrich Drepper <drepper@redhat.com>
7384 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7385 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7386 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7387 * Makefile (tests): Add tst-cancel11.
7388 * tst-cancel11.c: New file.
7390 2003-04-01 Ulrich Drepper <drepper@redhat.com>
7392 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7393 round, not the first. Use specific_used flag instead of local
7394 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
7395 (__free_tcb): Don't call deallocate_tsd here.
7396 (start_thread): Call deallocate_tsd here.
7397 * pthread_setspecific.c: Set specific_used flag really only when
7399 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7400 * tst-tsd3.c: New file.
7401 * tst-tsd4.c: New file.
7403 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7405 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7406 Use atomic_exchange_and_add instead of __lll_add.
7407 (__lll_mutex_timedlock): Likewise.
7408 Patch by Ian Wienand.
7410 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
7412 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7413 (SINGLE_THREAD_P): Fix typo.
7414 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7416 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7418 * Makefile (tests): Add tst-align.
7419 * tst-align.c: New file.
7420 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7422 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7425 * tst-tsd2.c: Add casts to avoid warnings.
7427 2003-03-30 Ulrich Drepper <drepper@redhat.com>
7429 * descr.h (struct pthread): Move most often used elements to the front.
7431 2003-03-29 Ulrich Drepper <drepper@redhat.com>
7433 * Makefile (libpthread-routines): Add pthread_atfork.
7434 (libpthread-static-only-routines): Add pthread_atfork.
7436 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7438 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7440 (INSTALL_DTV): Add parens.
7441 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7442 Use passed descr instead of THREAD_SELF.
7443 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7444 (__lll_mutex_timedlock_wait): Correct expected value after
7446 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7447 Release lock before waking up the waiters.
7448 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7449 criteria. Reorderstruct passed to cleanup handler. Fix
7450 handling of cancellation and failung pthread_mutex_unlock call.
7451 Use __pthread_enable_asynccancel_2 instead of
7452 __pthread_enable_asynccancel.
7453 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7454 Return result of lock re-get if it fails.
7455 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7456 for __pthread_cleanup_push.
7457 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7458 completely broken rwlock implementation.
7459 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7460 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7461 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7462 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7463 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7464 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
7465 versioned_symbol macro.
7466 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7467 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7469 2003-03-27 Ulrich Drepper <drepper@redhat.com>
7471 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7472 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
7474 (struct timer): Remove th and bar field.
7475 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7476 debugging code. Create only one helper thread.
7477 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7479 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7480 Renamed. Define statically. Use thread info from siginfo.
7481 (__helper_once): New variable.
7482 (__helper_tid): New variable.
7483 (__reset_helper_control): New function.
7484 (__start_helper_thread): New function.
7486 * pthread_create.c (start_thread): Don't use setjmp inside
7487 __builtin_expect to work around gcc bug.
7489 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7490 timer_delete syscall fails, but not with ENOSYS, set
7493 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7494 (timer_settime): Fix typo.
7495 * sysdeps/unix/sysv/linux/timer_getoverr.c
7496 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7498 2003-03-27 Jakub Jelinek <jakub@redhat.com>
7500 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7501 offset of cleanupbuf.__prev.
7503 2003-03-26 Jakub Jelinek <jakub@redhat.com>
7505 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7508 2003-03-26 Ulrich Drepper <drepper@redhat.com>
7510 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7511 NULL provide default definition to syscall.
7513 2003-03-25 Roland McGrath <roland@redhat.com>
7515 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7516 (timer_id2ptr): Fix typo.
7518 2003-03-25 Ulrich Drepper <drepper@redhat.com>
7520 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7521 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7522 * sysdeps/ia64/pthreaddef.h: Likewise.
7523 * sysdeps/powerpc/pthreaddef.h: Likewise.
7524 * sysdeps/s390/pthreaddef.h: Likewise.
7525 * sysdeps/sh/pthreaddef.h: Likewise.
7526 * sysdeps/x86_64/pthreaddef.h: Likewise.
7527 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7528 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7530 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7531 SIGTIMER is not unblocked.
7532 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7534 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7536 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7537 pass pointer through as ID.
7538 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7539 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7540 * sysdeps/unix/sysv/linux/timer_create.c: New file.
7541 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7542 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7543 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7544 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7545 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7546 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7547 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7548 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7549 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7550 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7551 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7552 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7553 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7554 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7555 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7556 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7557 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7558 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7559 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7560 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7561 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7562 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7563 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7564 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7565 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7566 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7567 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7568 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7569 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7570 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7572 * pthreadP.h: Remove FRAME_LEFT definition.
7573 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7574 already left frame. Programs which have this problem are not POSIX
7576 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7578 2003-03-24 Ulrich Drepper <drepper@redhat.com>
7580 * sysdeps/pthread/tst-timer.c: Check return values of the
7583 2003-03-23 Roland McGrath <roland@redhat.com>
7585 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7586 * tst-tls3mod.c: Likewise.
7587 * tst-tls1.c: Likewise.
7588 * tst-tls2.c: Likewise.
7590 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7593 * tst-join5.c (tf1, tf2): Add a cast.
7595 * Makeconfig (includes): Append -I$(..)nptl to this variable.
7597 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7598 Don't test anything.
7599 * tst-cond4.c: Likewise.
7600 * tst-cond6.c: Likewise.
7601 * tst-flock2.c: Likewise.
7602 * tst-mutex4.c: Likewise.
7603 * tst-rwlock4.c: Likewise.
7604 * tst-signal1.c: Likewise.
7605 * tst-spin2.c: Likewise.
7606 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7608 * tst-mutex4.c: Use test-skeleton.c.
7609 * tst-spin2.c: Likewise.
7610 * tst-sysconf.c: Likewise.
7611 * tst-barrier2.c: Likewise.
7612 * tst-cond4.c: Likewise.
7613 * tst-cond6.c: Likewise.
7614 * tst-rwlock4.c: Likewise.
7615 * tst-unload.c: Likewise.
7616 * tst-flock2.c (do_test): Use return instead of exit.
7618 2003-03-22 Jakub Jelinek <jakub@redhat.com>
7620 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7622 2003-03-21 Ulrich Drepper <drepper@redhat.com>
7624 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7625 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7626 instead of __lll_compare_and_swap.
7627 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7629 Removed definition if __lll_compare_and_swap.
7631 * cancellation.c: Adjust for new form of compare&exchange macros.
7632 * cleanup_defer.c: Likewise.
7634 * libc-cancellation.c: Likewise.
7635 * old_pthread_cond_broadcast.c: Likewise.
7636 * old_pthread_cond_signal.c: Likewise.
7637 * old_pthread_cond_timedwait.c: Likewise.
7638 * old_pthread_cond_wait.c: Likewise.
7639 * pthread_cancel.c: Likewise.
7640 * pthread_create.c: Likewise.
7641 * pthread_detach.c: Likewise.
7642 * pthread_join.c: Likewise.
7643 * pthread_key_delete.c: Likewise.
7644 * pthread_setcancelstate.c: Likewise.
7645 * pthread_setcanceltype.c: Likewise.
7646 * pthread_timedjoin.c: Likewise.
7647 * pthread_tryjoin.c: Likewise.
7648 * sysdeps/pthread/createthread.c: Likewise.
7650 2003-03-20 Ulrich Drepper <drepper@redhat.com>
7652 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7653 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7654 definitions. Replace uses with calls to atomic_* functions.
7655 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7656 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7657 __lll_test_and_set calls with atomic_exchange_and_add and
7658 atomic_exchange calls respectively.
7659 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7660 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7661 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7662 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7663 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7664 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7665 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7667 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7668 returns the old value.
7670 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
7672 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7673 int for variable OLDVAL and correct inline assembler contraint.
7674 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7675 type int for variable OLD.
7677 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7679 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7680 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7681 instead of multiple_threads field in the TCB.
7683 2003-03-19 Ulrich Drepper <drepper@redhat.com>
7685 * sysdeps/i386/i686/bits/atomic.h: Removed.
7686 * sysdeps/i386/i586/bits/atomic.h: Removed.
7687 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
7688 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
7689 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
7690 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
7691 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
7692 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
7693 * atomic.h: Removed. Moved to glibc.
7695 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7696 support for clock selection.
7698 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7701 2003-03-18 Roland McGrath <roland@redhat.com>
7703 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7704 Add __lll_rel_instr first. Add memory clobber.
7705 (lll_mutex_unlock): Use __lll_test_and_set.
7706 From Paul Mackerras <paulus@samba.org>.
7708 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7710 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7711 (SINGLE_THREAD_P): Add `header.' prefix.
7712 From Paul Mackerras <paulus@samba.org>.
7714 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7715 pthread_timedjoin_np to ...
7716 (libpthread: GLIBC_2.3.3): ... here.
7717 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7719 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7720 Avoid shadowing VAL variable.
7722 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7725 2003-03-18 Ulrich Drepper <drepper@redhat.com>
7727 * Makefile (tests): Add tst-cond11.
7728 * tst-cond11.c: New file.
7730 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7731 struct passed to cleanup handler to eliminate one more
7733 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7735 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7736 (pthrad_cond_t): Replace __unused field with __clock.
7738 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7739 waken all waiters in cleanup handler.
7740 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7741 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7743 * pthread_condattr_getclock.c: New file.
7744 * pthread_condattr_setclock.c: New file.
7745 * sysdeps/pthread/pthread.h: Declare these new functions.
7746 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7747 * Makefile (libpthread-routines): Add the new functions.
7748 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7749 Renamed field to value. Document use of the bits.
7750 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7752 * pthread_condattr_setpshared.c: Likewise.
7753 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7754 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7755 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7757 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7758 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7759 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7760 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7761 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7762 Implement clock selection.
7763 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7764 * pthread-errnos.sym: Add ENOSYS.
7765 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7766 _POSIX_CLOCK_SELECTION.
7767 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7769 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7770 invalid .size directive.
7772 2003-03-17 Roland McGrath <roland@redhat.com>
7774 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7777 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7779 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7780 Use __lll_add instead of spelling it out. Use protected symbol names.
7781 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7783 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7784 Renamed from lll_compare_and_swap. Use new name where necessary.
7785 (__lll_add): Defined.
7786 (__lll_dec_if_positive): Defined.
7787 (__lll_test_and_set): Defined.
7788 * sysdeps/ia64/pthread_spin_init.c: Removed.
7789 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7790 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7791 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7792 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7793 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7794 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7795 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7796 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7797 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7798 __sync_lock_release_si.
7799 Patch by Jakub Jelinek.
7801 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7802 Fix timeout handling.
7803 (__lll_timedwait_tid): Likewise.
7804 (lll_unlock_wake_cb): Wake up other waiters if necessary.
7805 Patch by Jakub Jelinek.
7807 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7809 2003-03-17 Roland McGrath <roland@redhat.com>
7811 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7812 * sysdeps/pthread/pthread_spin_init.c: New file.
7813 * sysdeps/pthread/pthread_spin_unlock.c: New file.
7814 * sysdeps/powerpc/Makefile: New file.
7815 * sysdeps/powerpc/pthread_spin_lock.c: New file.
7816 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7817 * sysdeps/powerpc/pthreaddef.h: New file.
7818 * sysdeps/powerpc/tcb-offsets.sym: New file.
7819 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7820 * sysdeps/powerpc/tls.h: New file.
7821 * sysdeps/powerpc/bits/atomic.h: New file.
7822 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7823 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7824 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7826 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7827 * sysdeps/unix/sysv/linux/sem_post.c: New file.
7828 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7829 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7830 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7831 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7832 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7833 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7834 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7835 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7836 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7837 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7838 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7839 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7840 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7842 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7844 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7845 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7846 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7847 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7848 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7850 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7852 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7853 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7854 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7855 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7856 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7858 2003-03-16 Roland McGrath <roland@redhat.com>
7860 * tst-fork4.c: Include <string.h>.
7861 * tst-signal2.c: Likewise.
7862 * tst-mutex5.c (do_test): exit -> return.
7863 * tst-mutex2.c: Include <stdlib.h>.
7865 2003-03-16 Ulrich Drepper <drepper@redhat.com>
7867 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7868 (__lll_mutex_timedlock_wait): Correct expected value after
7869 spurious wakeup. Otherwise we would never wait again.
7871 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7872 zone versus inline asm stupidity. Use correct instructions.
7874 * tst-rwlock6.c: Add some more status output.
7876 2003-03-15 Roland McGrath <roland@redhat.com>
7878 * sysdeps/pthread/configure.in: New file.
7879 * sysdeps/pthread/configure: New file (generated).
7881 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7883 * allocatestack.c (allocate_stack): Store the exact stack size of
7884 user allocated stacks.
7886 2003-03-15 Jakub Jelinek <jakub@redhat.com>
7888 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7889 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7890 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7891 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7892 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7893 Use `header.' prefix.
7894 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7896 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7898 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7899 __builtin_frame_address, use stack pointer.
7901 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7902 instead of __builtin_frame_pointer.
7904 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7906 * tst-basic1.c (do_test): Add cast to avoid warning.
7907 * tst-basic2.c (do_test): Likewise.
7909 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7910 amount of stack correction.
7912 * tst-fork4.c: Use test-skeleton.c.
7914 2003-03-14 Roland McGrath <roland@redhat.com>
7916 * init.c: Fix typo "#eli" for "#else".
7918 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
7920 * allocatestack.c (__stack_user): Use hidden_data_def.
7921 * pthread_create.c (__pthread_keys): Likewise.
7923 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7925 2003-03-14 Roland McGrath <roland@redhat.com>
7927 * tst-fork4.c: New file.
7928 * Makefile (tests): Add it.
7930 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7931 we always define the padding space.
7932 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7933 stopped supporting its own extensions fully.
7934 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7935 struct also called `header', so `header.multiple_threads' is the field
7936 name to use on all machines.
7937 * allocatestack.c (allocate_stack): Use `header.' prefix.
7938 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7939 * pthread_create.c (__pthread_create_2_1): Likewise.
7940 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7941 (THREAD_SELF): Likewise.
7942 * sysdeps/x86_64/tls.h: Likewise.
7943 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7944 (SINGLE_THREAD_P): Likewise.
7945 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7946 (SINGLE_THREAD_P): Likewise.
7947 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7948 (SINGLE_THREAD_P): Likewise.
7950 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7953 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7955 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7956 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7958 * pthread_create.c (start_thread): setjmp is expected to return 0.
7960 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7961 (THREAD_GETMEM_NC): Likewise.
7963 2003-03-13 Ulrich Drepper <drepper@redhat.com>
7965 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7966 and the size of the stack which must be allocated is a multiple,
7967 allocate one more page.
7968 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7969 MULTI_PAGE_ALIASING.
7971 2003-03-13 Roland McGrath <roland@redhat.com>
7973 * pthread_create.c (start_thread): Set EXITING_BIT after the
7974 event-reporting (and destructors), not before.
7976 2003-03-13 Jakub Jelinek <jakub@redhat.com>
7978 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7979 lll_futex_wake): Declare register variables as long int instead of
7980 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7981 Make syscall arguments clobbered by the syscall.
7982 (lll_futex_wait): Define using lll_futex_timed_wait.
7984 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7987 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7990 * allocatestack.c (nptl_ncreated): Only declare if
7991 COLORING_INCREMENT != 0.
7993 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7994 (__libc_enable_asynccancel_2): Remove prototype.
7996 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7997 ctid to match kernel.
7999 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8001 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8002 libc_multiple_threads.
8003 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8004 __libc_multiple_threads to...
8005 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
8007 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8009 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8010 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8012 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8013 (__pthread_once_internal): Define.
8015 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8016 macros instead of .symver directly.
8017 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8018 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8020 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8021 * sysdeps/x86_64/tcb-offsets.sym: New file.
8022 * sysdeps/x86_64/Makefile: New file.
8024 * sysdeps/i386/tcb-offsets.sym: Add SELF.
8025 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8026 to access own pthread_t in TCB.
8027 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8029 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8031 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8033 2003-03-12 Roland McGrath <roland@redhat.com>
8035 * pthread-errnos.sym: New file.
8036 * Makefile (gen-as-const-headers): New variable, list that file.
8037 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8038 header <pthread-errnos.h> instead of defining errno values here.
8039 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8040 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8041 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8042 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8043 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8045 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8047 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8048 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8049 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8050 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8051 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8052 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8053 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8054 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8055 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8056 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8057 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8058 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8059 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8060 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8061 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8062 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8063 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8064 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8065 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8066 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8067 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8068 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8069 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8070 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8071 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8072 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8073 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8075 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8076 CLONE_CHILD_SETTID worked.
8078 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8080 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8082 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8085 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8086 (pthread_cond_t): Add padding.
8088 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8089 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8090 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8092 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8093 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8094 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8095 (__pthread_rwlock_timedrdlock): Likewise.
8096 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8097 (__pthread_rwlock_wrlock): Likewise.
8098 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8099 (__pthread_rwlock_rdlock): Likewise.
8101 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8103 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8104 result of lock re-get if it fails.
8106 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8108 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8109 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8110 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8111 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8112 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8113 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8114 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8115 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8116 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8117 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8119 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8120 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8122 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8123 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8124 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8125 (create_thread): Likewise.
8126 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8127 * init.c (__pthread_initialize_minimal_internal): Initialize
8128 __libc_multiple_threads_ptr if necessary.
8129 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
8130 __pthread_multiple_threads and __libc_multiple_threads_ptr.
8131 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8132 __libc_multiple_threads.
8133 (__libc_pthread_init): Return pointer to __libc_pthread_init if
8136 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8137 (THREAD_SETMEM_NC): Likewise.
8139 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8140 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8141 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8142 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8144 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8145 Eliminate one entire instruction.
8147 * cancellation.c (__pthread_enable_asynccancel_2): New function.
8148 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8149 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8150 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8151 instead of __pthread_enable_asynccancel.
8152 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8153 (__pthread_cond_wait): Likewise.
8154 * sysdeps/pthread/pthread_cond_timedwait.c
8155 (__pthread_cond_timedwait): Likewise.
8156 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8158 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8159 (__condvar_cleanup): Wake up all waiters in case we got signaled
8160 after being woken up but before disabling asynchronous
8162 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8163 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8164 (__condvar_cleanup): Likewise.
8166 * init.c (__NR_set_tid_address): If already defined, don't redefine.
8167 Make it an error if architecture has no #if case. Add x86-64.
8169 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8170 pt-initfini.s generation.
8172 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8173 (TLS_INIT_TP): Fix typo.
8175 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8177 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8178 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8180 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8181 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8182 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8183 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8184 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8185 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8186 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8187 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8189 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8191 * sysdeps/pthread/pthread_cond_timedwait.c
8192 (__pthread_cond_timedwait): Return the result of the final
8193 locking. If it succeeds, the regular function return value.
8195 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8196 Return result of the final locking.
8197 * version.c (__nptl_main): Work around problems with the strange
8198 INTERNAL_SYSCALL macro on ppc32.
8199 * init.c (__pthread_initialize_minimal_internal): Unblock
8200 SIGCANCEL in case the parent blocked it.
8201 Reported by Paul Mackerras <paulus@samba.org>.
8203 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8204 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8205 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8207 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8209 * sysdeps/pthread/pthread_cond_timedwait.c
8210 (__pthread_cond_timedwait): Unlock and fail if
8211 __pthread_mutex_unlock_internal failed.
8213 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8214 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8216 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8217 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8218 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8219 ALLOCATE_STACK): New macros.
8220 (TLS_TPADJ): New macro.
8221 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8222 (allocate_stack): Handle TLS_DTV_AT_TP and
8223 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
8224 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8226 * init.c [__ia64__] (__NR_set_tid_address): Define.
8228 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8229 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8230 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8231 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8232 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8233 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8234 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8235 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8236 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8237 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8238 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8239 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8240 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8241 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8242 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8243 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8244 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8245 * sysdeps/ia64/bits/atomic.h: New file.
8246 * sysdeps/ia64/Makefile: New file.
8247 * sysdeps/ia64/pthread_spin_init.c: New file.
8248 * sysdeps/ia64/pthread_spin_lock.c: New file.
8249 * sysdeps/ia64/pthread_spin_trylock.c: New file.
8250 * sysdeps/ia64/pthread_spin_unlock.c: New file.
8251 * sysdeps/ia64/pthreaddef.h: New file.
8252 * sysdeps/ia64/tcb-offsets.sym: New file.
8253 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8254 * sysdeps/ia64/tls.h: New file.
8256 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8257 to syscall instead of no arguments.
8259 2003-03-10 Ulrich Drepper <drepper@redhat.com>
8261 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8262 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8263 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8264 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8266 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8269 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8271 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8272 lowlevelbarrier.sym.
8273 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8274 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8275 Include lowlevelbarrier.h and don't define offsets locally.
8276 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8278 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8279 (__lll_mutex_lock_wait): Reverse order of first two parameters.
8280 (__lll_mutex_timedlock_wait): Likewise.
8281 (lll_mutex_lock): Adjust asm for that.
8282 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
8283 (lll_lock): Adjust asm for operand order change.
8284 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8285 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8287 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8288 Reverse order of parameters.
8289 (__lll_timedwait_tid): Remove regparms attribute.
8290 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8291 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8293 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8294 (__lll_timedwait_tid): Remove one unnecessary instruction.
8296 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8297 __lll_mutex_timedlock_wait only for NOT_IN_libc.
8298 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8301 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8302 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8304 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8307 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8308 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
8310 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8311 define LOCK here (if UP is not defined). The actual code is in
8314 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8315 LOCK is already defined. Don't define lll_unlock_wake_cb and
8316 __lll_timedwait_tid for libc.so.
8317 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8318 define LOCK here (if UP is not defined). The actual code is in
8321 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8322 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8323 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8324 instead of lowlevelsem.h.
8325 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8326 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8327 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8329 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8331 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8332 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8333 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8335 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8337 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8340 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8342 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8343 of __libc_locking_needed.
8344 (lll_trylock): Initialize %eax to zero.
8346 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8347 pthread_cond_t definition.
8349 2003-03-10 Roland McGrath <roland@redhat.com>
8351 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8352 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8353 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8354 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8355 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8357 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8358 Instead of setting PD->multiple_threads, set globals
8359 __pthread_multiple_threads and __libc_multiple_threads.
8360 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8361 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8362 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8364 * descr.h (struct pthread): Conditionalize first member on
8365 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
8366 containing an anonymous tcbhead_t. Move `list' member out.
8367 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8368 * allocatestack.c: Remove use of `header.data.' prefix.
8369 * pthread_create.c: Likewise.
8370 * init.c (__pthread_initialize_minimal_internal): Likewise.
8371 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8372 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8373 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8374 * sysdeps/x86_64/tls.h: Likewise.
8375 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8376 (SINGLE_THREAD_P): Likewise.
8377 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8378 (SINGLE_THREAD_P): Likewise.
8379 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8380 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8382 2003-03-09 Ulrich Drepper <drepper@redhat.com>
8384 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8386 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8387 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8389 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8390 leftovers from the ia32 code.
8392 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8394 (clear_once_control): Don't load %esi.
8396 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8399 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8401 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8402 * sysdeps/unix/sysv/linux/createthread.c: ...here.
8404 * Makefile (tests): Add tst-cond10.
8405 * tst-cond10.c: New file.
8407 2003-03-08 Ulrich Drepper <drepper@redhat.com>
8409 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8410 * tst-signal3.c (do_test): Likewise.
8411 * tst-sem5.c (do_test): Likewise.
8412 * tst-kill6.c (do_test): Likewise.
8413 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
8415 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8417 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8418 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8419 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8420 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8421 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8422 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8423 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8425 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8427 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8428 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8429 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8430 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8431 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8432 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8433 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8434 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8436 * allocatestack.c (allocate_stack): If mprotect() fails free the
8439 2003-03-07 Ulrich Drepper <drepper@redhat.com>
8441 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8443 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8444 lll_wake_tid. This was used only to work around kernel limits in
8446 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8447 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8448 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8449 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8451 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8452 (__pthread_initialize_minimal_internal): Change initialization of
8453 __static_tls_align_m1 appropriately.
8454 * pthreadP.h (__static_tls_align_m1): Renamed from
8456 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8457 instead of __static_tls_align-1.
8459 2003-03-04 Ulrich Drepper <drepper@redhat.com>
8461 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8463 * pthread_create.c: Define __pthread_keys using nocommon
8464 attribute, not by placing it explicitly in bss.
8465 Remove DEFINE_DEALLOC definition. Not needed anymore.
8467 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8468 Use it in mmap call to allocate stacks.
8470 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8472 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8473 result of the thread function.
8475 2003-03-03 Ulrich Drepper <drepper@redhat.com>
8477 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
8478 version is just fine.
8480 * sysdeps/unix/sysv/linux/libc_pthread_init.c
8481 (__pthread_child_handler): Renamed from pthread_child_handler,
8482 exported, and marked hidden. Change all users.
8483 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8484 free __pthread_child_handler from child list.
8486 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
8488 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8490 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8491 Fix handling of cancellation and failing pthread_mutex_unlock call.
8492 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8493 (__pthread_cond_wait): Likewise.
8495 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8496 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8497 lll_futex_timed_wait call.
8498 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8499 (pthread_rwlock_timedwrlock): Likewise.
8501 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8502 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8503 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8505 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8506 check of lll_futex_wake return value.
8508 2003-03-03 Roland McGrath <roland@redhat.com>
8510 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8512 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8513 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8514 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8516 2003-03-02 Ulrich Drepper <drepper@redhat.com>
8518 * sysdeps/pthread/timer_create.c (timer_create): Return correct
8519 error for CPU clocks.
8521 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8522 _POSIX_MONOTONIC_CLOCK.
8523 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8525 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8528 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8530 * descr.h (struct pthread): Move cleanup field to the front.
8532 2003-03-01 Roland McGrath <roland@redhat.com>
8534 * sem_open.c (sem_open): Braino fix.
8536 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8538 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8539 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8540 __pthread_cleanup_pop functionality.
8541 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8543 * descr.h (struct pthread): Move tid field to the front now that
8546 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8547 (__lll_mutex_timedlock_wait): Remove.
8548 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8549 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8550 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8551 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8552 (lll_unlock_wake_cb): Don't save and restore %esi.
8553 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8555 (__lll_timedwait_tid): Add alignment.
8556 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8557 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8559 (__lll_timedwait_tid): Removed.
8560 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8561 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8562 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8563 (pthread_barrier_wait): Don't save, load, and restore %esi for
8565 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8566 (__pthread_cond_signal): Don't save, load, and restore %esi.
8567 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8568 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8569 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8570 Don't save, load, and restore %esi.
8572 2003-02-27 Ulrich Drepper <drepper@redhat.com>
8574 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8575 Release lock before waking up the waiters.
8577 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8579 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8580 (reader_thread): Likewise.
8582 * sysdeps/pthread/pthread_rwlock_unlock.c
8583 (__pthread_rwlock_unlock): Release internal lock early. Don't try
8584 to wake up readers if there are none.
8586 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8587 Release internal lock before wake threads.
8589 2003-02-26 Ulrich Drepper <drepper@redhat.com>
8591 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8592 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
8594 * tst-rwlock9.c: Likewise.
8595 * tst-rwlock10.c: New file.
8596 * tst-rwlock11.c: New file.
8598 * Makefile (tests): Add tst-dlsym1.
8599 * tst-dlsym1.c: New file.
8601 * init.c (__pthread_initialize_minimal_internal): Set
8602 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8603 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8605 2003-02-24 Ulrich Drepper <drepper@redhat.com>
8607 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8609 * tst-cond2.c: Fix sychronization with child.
8611 * tst-rwlock8.c (reader_thread): Remove unused variable.
8613 * Makefile: Add rules to build and run tst-tls3.
8614 * tst-tls3.c: New file.
8615 * tst-tls3mod.c: New file.
8617 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8618 * tst-rwlock8.c: New file.
8619 * tst-rwlock9.c: New file.
8620 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8621 complete broken rwlock implementation.
8622 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8624 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8626 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8627 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8628 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8629 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8630 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8631 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8632 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8634 2003-02-23 Roland McGrath <roland@redhat.com>
8636 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8638 2003-02-23 Ulrich Drepper <drepper@redhat.com>
8640 * Makefile (tests): Add tst-context1.
8641 * tst-context1.c: New file.
8643 * Makefile (tests): Add tst-tls1 and tst-tls2.
8644 * tst-tls1.c: New file.
8645 * tst-tls2.c: New file.
8647 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8650 * pthread_create.c (start_thread): Set EXITING_BIT early.
8652 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8653 (THREAD_GETMEM_NC): Likewise.
8655 2003-02-22 Ulrich Drepper <drepper@redhat.com>
8657 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8658 off 3 more bytes by using offset-less instructions when possible.
8660 * Makefile: Add dependency for $(objpfx)version.d.
8662 * eintr.c (eintr_source): Add unnecessary return but the compiler
8665 * tst-kill3.c: Include <unistd.h>.
8667 2003-02-21 Roland McGrath <roland@redhat.com>
8669 * pthread_create.c (start_thread): Call __libc_thread_freeres.
8671 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8673 * Makefile (tests): Add tst-eintr1.
8674 (distribute): Add eintr.c.
8675 * tst-eintr1.c: New file.
8676 * eintr.c: New file.
8678 * pthread_cancel.c (pthread_cancel): Use tkill directly.
8680 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8681 Disallow sending SIGCANCEL.
8683 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
8684 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8685 * tst-kill1.c: New file.
8686 * tst-kill2.c: New file.
8687 * tst-kill3.c: New file.
8688 * tst-kill5.c: New file.
8689 * tst-kill6.c: New file.
8690 * tst-basic7.c: Renamed to...
8691 * tst-kill4.c: ...this.
8693 2003-02-21 Roland McGrath <roland@redhat.com>
8695 * Makefile (install-lib-ldscripts): New variable.
8697 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8699 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8700 * pthread_cancel.c: Use INVALID_TD_P.
8701 * pthread_detach.c: Likewise.
8702 * pthread_getschedparam.c: Likewise.
8703 * pthread_setschedparam.c: Likewise.
8704 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8705 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8706 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8707 * pthread_timedjoin.c: Likewise.
8709 * tst-basic7.c: Include <signal.h>.
8711 * pthread_join.c (pthread_join): Limited checking for invalid
8713 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8715 2003-02-20 Ulrich Drepper <drepper@redhat.com>
8717 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8718 beginning of the loop. Clear the entire first block of TSD.
8719 * Makefile (tests): Add tst-key4.
8720 * tst-key4.c: New file.
8722 2003-02-18 Ulrich Drepper <drepper@redhat.com>
8724 * Makefile (tests): Add tst-basic7.
8725 * tst-basic7.c: New file.
8727 * pthread_create.c (deallocate_tsd): Mark as internal_function.
8728 Add some more __builtin_expect.
8730 * pthreadP.h: Define dummy version of DEBUGGING_P.
8732 2003-02-17 Ulrich Drepper <drepper@redhat.com>
8734 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8735 _POSIX_THREAD_PRIORITY_SCHEDULING.
8736 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8737 _XOPEN_REALTIME_THREADS.
8738 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8740 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8741 kernel returns EINVAL for PID <= 0, work around it.
8743 * Makefile (tests): Add tst-signal5.
8744 * tst-signal5.c: New file.
8746 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8749 * tst-cancel1.c (tf): Block all signals.
8751 * Makefile (tests): Add tst-basic6.
8752 * tst-basic6.c: New file.
8754 * tst-basic1.c: Add test for process ID.
8756 * Makefile (tests): Add tst-cancel10.
8757 * tst-cancel10.c: New file.
8759 * Makefile (tests): Add tst-signal4.
8760 * tst-signal4.c: New file.
8762 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8763 __sigismember instead of sigismember. Add __builtin_expect.
8765 2003-02-16 Ulrich Drepper <drepper@redhat.com>
8767 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8768 pthread_setcancelstate, and pthread_rwlock_setpshared.
8770 * tst-cancel7.c (do_test): Make sure the pid file exists before
8771 canceling the thread.
8773 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8774 pthread_rwlock_timedrdlock tests.
8775 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8776 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8777 Check for invalid tv_nsec field.
8778 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8781 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8782 recursive mutex of overflow.
8784 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8786 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8787 going into an endless loop.
8788 * Makefile (tests): Add tst-cancel9.
8789 * tst-cancel9.c: New file.
8791 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8793 2003-02-15 Ulrich Drepper <drepper@redhat.com>
8795 * tst-mutex5.c (do_test): Add more timedlock tests.
8797 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8798 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8800 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8801 use INLINE_SYSCALL. Error number is returned, not -1.
8803 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8804 and __deallocate_stack with internal_function.
8805 * pthread_create.c: Adjust definitions appropriately.
8806 * allocatestack.c: Likewise.
8808 * pthread_join.c: Add one more __builtin_expect.
8809 * pthread_timedjoin.c: Likewise.
8811 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8812 not data of sequence number does not match.
8813 Add one __builtin_expect.
8815 * Makefile (tests): Add tst-clock1.
8816 * tst-clock1.c: New file.
8818 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8820 * Makefile (tests): Add tst-basic5.
8821 * tst-basic5.c: New file.
8823 2003-02-14 Ulrich Drepper <drepper@redhat.com>
8825 * Makefile (tests): Add tst-basic4.
8826 * tst-basic4.c: New file.
8828 * pthreadP.h: Add declaraction for __nptl_nthreads.
8829 * pthread_create.c: Define __nptl_nthreads
8830 (start_thread): Increment __nptl_nthreads at beginning. Decrement
8831 after thread is done. If then zero, call exit(0).
8832 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8833 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
8834 * init.c (pthread_functions): Initialize ptr_nthreads.
8835 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8836 (__reclaim_stacks): Decrement __nptl_nthreads.
8837 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8839 * Makefile (tests): Add tst-basic3.
8840 * tst-basic3.c: New file.
8842 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
8843 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
8844 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8845 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
8846 if asynchronous canceling is enabled.
8847 * pthread_join.c (pthread_join): When recognizing circular joins,
8848 take into account the other thread might be already canceled.
8849 * Makefile (tests): Add tst-join5.
8850 * tst-join5.c: New file.
8852 * Makefile (tests): Add tst-join4.
8853 * tst-join4.c: New file.
8855 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8857 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8859 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
8861 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8862 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8863 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8865 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8867 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8868 error if lll_futex_wake failed.
8870 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8872 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8873 handling of cancellation and failung pthread_mutex_unlock call.
8874 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8875 * Makefile (tests): Add tst-cond8 and tst-cond9.
8876 * tst-cond8.c: New file.
8877 * tst-cond9.c: New file.
8879 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8881 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
8882 non-standard initializers with __USE_GNU.
8884 * Makefile (tests): Add tst-cleanup3.
8885 * tst-cleanup3.c: New file.
8887 2003-02-12 Ulrich Drepper <drepper@redhat.com>
8889 * Makefile (tests): Add tst-attr1 and tst-attr2.
8890 * tst-attr1.c: New file.
8891 * tst-attr2.c: New file.
8893 * Makefile: Add rules to build and run tst-atfork2 test.
8894 * tst-atfork2.c: New file.
8895 * tst-atfork2mod.c: New file.
8897 * sysdeps/unix/sysv/linux/unregister-atfork.c
8898 (__unregister_atfork): Free the memory allocated for the handlers
8899 after removing them from the lists.
8901 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8904 * tst-atfork1.c (do_test): Wait for the child we forked.
8905 Report error in child.
8907 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8909 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8911 2003-02-10 Ulrich Drepper <drepper@redhat.com>
8913 * Makefile (tests): Add tst-cancel8.
8914 * tst-cancel8.c: New file.
8916 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8917 clearing of control variable.
8918 * Makefile (tests): Add tst-once3 and tst-once4.
8919 * tst-once3.c: New file.
8920 * tst-once4.c: New file.
8922 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
8924 * sysdeps/sh/Makefile: New file.
8925 * sysdeps/sh/bits/atomic.h: New file.
8926 * sysdeps/sh/pthread_spin_init.c: New file.
8927 * sysdeps/sh/pthread_spin_lock.c: New file.
8928 * sysdeps/sh/pthread_spin_trylock.S: New file.
8929 * sysdeps/sh/pthread_spin_unlock.S: New file.
8930 * sysdeps/sh/pthreaddef.h: New file.
8931 * sysdeps/sh/tcb-offsets.sym: New file.
8932 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8933 * sysdeps/sh/tls.h: New file.
8934 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8935 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8936 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8937 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8938 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8939 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8940 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8941 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8942 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8943 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8944 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8945 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8946 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8947 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8948 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8949 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8950 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8951 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8952 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8953 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8954 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8955 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8956 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8957 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8958 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8959 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8960 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8961 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8962 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8963 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8965 2003-02-08 Ulrich Drepper <drepper@redhat.com>
8967 * tst-cond2.c: Rearrange code to not rely on behavior undefined
8970 * tst-basic2.c (do_test): Lock mutex before creating the thread.
8972 2003-02-07 Ulrich Drepper <drepper@redhat.com>
8974 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8975 (TLS_GET_FS): New #define.
8976 (TLS_SET_FS): New #define.
8977 Correct value of __NR_set_thread_area.
8979 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8981 2003-02-06 Ulrich Drepper <drepper@redhat.com>
8983 * Makefile (tests): Add tst-popen1.
8984 * tst-popen1.c: New file.
8986 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8987 but inactive generalization.
8988 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8989 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8990 Minor optimization, remove one instruction.
8991 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8993 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
8995 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8997 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
8999 * init.c (__NR_set_tid_address): Add #ifdef for s390.
9000 * sysdeps/pthread/pthread_barrier_wait.c: New file.
9001 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9002 * sysdeps/pthread/pthread_cond_signal.c: New file.
9003 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9004 * sysdeps/pthread/pthread_cond_wait.c: New file.
9005 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9006 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9007 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9008 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9009 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9010 * sysdeps/s390/Makefile: New file.
9011 * sysdeps/s390/bits/atomic.h: New file.
9012 * sysdeps/s390/pthread_spin_init.c: New file.
9013 * sysdeps/s390/pthread_spin_lock.c: New file.
9014 * sysdeps/s390/pthread_spin_trylock.c: New file.
9015 * sysdeps/s390/pthread_spin_unlock.c: New file.
9016 * sysdeps/s390/pthreaddef.h: New file.
9017 * sysdeps/s390/tcb-offsets.sym: New file.
9018 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9019 * sysdeps/s390/tls.h: New file.
9020 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9021 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9022 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9023 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9024 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9025 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9026 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9027 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9028 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9029 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9030 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9031 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9032 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9033 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9034 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9035 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9036 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9037 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9038 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9039 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9040 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9041 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9042 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9044 2003-02-04 Ulrich Drepper <drepper@redhat.com>
9046 * atomic.h: Add a couple more default implementations.
9047 (atomic_compare_and_exchange_acq): Use
9048 __arch_compare_and_exchange_32_acq in return value definition. It
9050 (atomic_bit_set): Renamed from atomic_set_bit.
9051 Add missing atomic_ prefixes.
9053 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9054 thread library is available, use correct value to mark initialized
9057 2003-02-03 Ulrich Drepper <drepper@redhat.com>
9059 * allocatestack.c (allocate_stack): Use __getpagesize instead of
9060 __sysconf to determine pagesize.
9062 * pthread_create.c: Include <atomic.h>.
9063 * allocatestack.c (allocate_stack): Implement coloring of the
9064 allocated stack memory. Rename pagesize to pagesize_m1. It's the
9065 size minus one. Adjust users.
9066 * sysdeps/i386/i686/Makefile: New file.
9068 2003-02-02 Ulrich Drepper <drepper@redhat.com>
9070 * allocatestack.c: Improve comment throughout the file.
9072 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9073 (__lll_lock_wait): Add branch prediction.
9074 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9075 (__lll_lock_wait): Likewise.
9076 (lll_unlock_wake_cb): Removed.
9078 2003-01-31 Ulrich Drepper <drepper@redhat.com>
9080 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9081 _POSIX_THREAD_PRIORITY_SCHEDULING.
9083 2003-01-30 Jakub Jelinek <jakub@redhat.com>
9085 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9086 Fix return type of ptr___pthread_getspecific.
9088 2003-01-29 Ulrich Drepper <drepper@redhat.com>
9090 * Makefile (tests): Add tst-umask1.
9091 (tst-umask1-ARGS): Define.
9092 * tst-umask1.c: New file.
9094 2003-01-28 Ulrich Drepper <drepper@redhat.com>
9096 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
9097 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9098 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9099 pthread_rwlock_unlock.
9100 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9101 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9102 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9103 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9104 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9106 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9107 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9109 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9110 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9111 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9113 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9114 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9116 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9117 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9118 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9120 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9121 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9123 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9125 * Makefile (libpthread-routines): Remove lowlevelcond and
9126 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9127 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9128 and pthread_cond_broadcast.
9129 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9130 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9131 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9132 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9133 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9134 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9135 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9136 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9137 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9138 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9139 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9140 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9141 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9142 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9143 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9144 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9145 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9146 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9147 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9148 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9149 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9150 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9151 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9152 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9153 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9154 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9155 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9156 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9157 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9158 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9159 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9161 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9162 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
9163 of the code is moved to ...
9164 * sysdeps/pthread/createthread.c: ...here. New file.
9166 2003-01-27 Ulrich Drepper <drepper@redhat.com>
9168 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9169 (__new_sem_post): Clear %eax before returning.
9170 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9172 * Makefile (tests): Add tst-cleanup2.
9173 * tst-cleanup2.c: New file.
9175 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9176 Interpret first parameter correctly.
9178 2003-01-17 Ulrich Drepper <drepper@redhat.com>
9180 * Makefile (headers): Add bits/semaphore.h.
9182 2003-01-16 Jakub Jelinek <jakub@redhat.com>
9184 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9187 2003-01-14 Ulrich Drepper <drepper@redhat.com>
9189 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9190 must be used and mapping failed.
9191 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9193 * Makefile (CFLAGS-pthread_self.os): Define this, not
9194 CFLAGS-pthread_self.c.
9196 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9198 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9201 * Makefile (libpthread-routines): Add version. Add rules to build
9202 version.os and banner.h.
9203 * version.c: New file.
9205 2003-01-13 Jakub Jelinek <jakub@redhat.com>
9207 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9208 the alias unconditional.
9209 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
9211 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9213 * Makefile (CFLAGS-pthread_self.c): New definition.
9215 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9217 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9218 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9219 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9220 * init.c (__pthread_initialize_minimal_internal): Likewise.
9222 2003-01-07 Jakub Jelinek <jakub@redhat.com>
9224 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9226 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9227 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9228 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9229 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9230 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9231 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9233 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9235 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9236 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9237 * tst-cancel-wrappers.sh: Remove all exceptions.
9239 2003-01-05 Ulrich Drepper <drepper@redhat.com>
9241 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9242 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
9244 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9245 Use __libc_pthread_functions array if SHARED.
9247 * pthreadP.h: Move pthread_cond_2_0_t definition to...
9248 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9250 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9251 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9252 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9253 __libc_ptf_call instead of __libc_maybe_call.
9255 (__libc_cleanup_region_start): Wrap function name with PTF call.
9256 (__libc_cleanup_region_end): Likewise.
9257 (__libc_cleanup_end): Likewise.
9259 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9260 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9261 * pthread_key_create.c: Add __pthread_key_create_internal alias.
9262 * pthreadP.h: Add prototypes.
9264 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9265 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9266 __pthread_rwlock_unlock aliases.
9267 * pthreadP.h: Add prototypes for new aliases.
9269 * pthreadP.h (struct pthead_functions): Moved to...
9270 * sysdeps/pthread/pthread-functions.h: ...here. New file.
9271 * init.c (pthread_functions): Add initializers for new elements.
9273 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9274 __pthread_cleanup_pop_restore aliases.
9275 * pthreadP.h: Add prototypes.
9277 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9278 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9279 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9280 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9281 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9282 * pthreadP.h: Adjust prototypes and callers.
9284 2003-01-04 Ulrich Drepper <drepper@redhat.com>
9286 * Makefile (tests): Add tst-cancel7.
9287 (tst-cancel7-ARGS): New variable.
9288 * tst-cancel7.c: New file.
9290 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9291 around gcc defficiencies.
9292 * old_pthread_cond_signal.c: Likewise.
9293 * old_pthread_cond_timedwait.c: Likewise.
9294 * old_pthread_cond_wait.c: Likewise.
9296 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9298 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9300 * Makefile (tests): Add tst-cond7.
9301 * tst-cond7.c: New file.
9303 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9304 (condvar_cleanup): Get condvar address from the right place.
9306 * atomic.h: Correct definitions of atomic_full_barrier,
9307 atomic_read_barrier, atomic_write_barrier.
9309 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9311 * old_pthread_cond_signal.c: Likewise.
9312 * old_pthread_cond_timedwait.c: Likewise.
9313 * old_pthread_cond_wait.c: Likewise.
9315 2003-01-03 Jakub Jelinek <jakub@redhat.com>
9317 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9319 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9321 * pthreadP.h (pthread_cond_2_0_t): New type.
9322 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9323 Use new type for the 2.0 condvar function prototypes.
9324 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9325 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9327 * old_pthread_cond_destroy.c: Likewise.
9328 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
9329 * old_pthread_cond_signal.c: Likewise.
9330 * old_pthread_cond_timedwait.c: Likewise.
9331 * old_pthread_cond_wait.c: Likewise.
9333 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9334 (__pthread_cond_wait): Don't save cancellation mode and seq value
9337 * herrno.c (__h_errno_location): Don't define as weak.
9339 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9341 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9342 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9343 and pthread_cond_wait.
9344 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9346 (__pthread_cond_broadcast_2_0): ... this.
9347 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9349 (__pthread_cond_destroy_2_0): ... this.
9350 * old_pthread_cond_init.c (__old_pthread_cond_init):
9352 (__pthread_cond_init_2_0): ... this.
9353 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9355 (__pthread_cond_signal_2_0): ... this.
9356 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9358 (__pthread_cond_wait_2_0): ... this.
9359 * pthread_cond_destroy.c: Include shlib-compat.h.
9360 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9361 * pthread_cond_init.c: Include shlib-compat.h.
9362 (pthread_cond_init): Change strong_alias into versioned_symbol.
9363 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9364 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9366 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9367 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9368 __pthread_cond_wait_2_0): New prototypes.
9369 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9370 __old_pthread_cond_init, __old_pthread_cond_signal,
9371 __old_pthread_cond_wait): Removed.
9372 * init.c: Include shlib-compat.h.
9373 (pthread_functions): Guard ptr___pthread_attr_init_2_0
9374 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9375 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9376 ptr___pthread_cond_*_2_0 fields.
9377 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9378 pthread_cond_*@GLIBC_2.0 compatibility symbols.
9380 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9381 LIBC_SIGACTION was not yet defined.
9382 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9383 [!defined LIBC_SIGACTION] (__sigaction): New function and
9385 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9386 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9388 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9390 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9392 2003-01-02 Ulrich Drepper <drepper@redhat.com>
9394 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9395 New, larger type definition.
9396 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9398 * Versions [libpthread]: Add definitions for new pthread_cond_*
9399 interfaces for version GLIBC_2.3.2.
9400 * pthread_cond_init.c: Update initialization for new type definition.
9401 * Makefile (libpthread-routines): Remove pthread_cond_wait,
9402 pthread_cond_timedwait, pthread_cond_signal, and
9403 pthread_cond_broadcast. Add old_pthread_cond_init,
9404 old_pthread_cond_destroy, old_pthread_cond_wait,
9405 old_pthread_cond_timedwait, old_pthread_cond_signal, and
9406 old_pthread_cond_broadcast.
9407 * old_pthread_cond_broadcast.c: New file.
9408 * old_pthread_cond_destroy.c: New file.
9409 * old_pthread_cond_init.c: New file.
9410 * old_pthread_cond_signal.c: New file.
9411 * old_pthread_cond_timedwait.c: New file.
9412 * old_pthread_cond_wait.c: New file.
9413 * pthreadP.h: Add prototypes for the compatibility interfaces.
9415 * pthread_cond_destroy.c: Don't include <errno.h>.
9417 2003-01-01 Ulrich Drepper <drepper@redhat.com>
9419 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9420 unnecessary zero offset when addressing MUTEX.
9422 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9424 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9426 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9427 for __register_atfork.
9429 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9431 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9432 instead of ASSEMBLER test macro.
9434 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9435 __libc_current_sigrtmax): Add libc_hidden_def.
9437 * sysdeps/pthread/list.h: Remove assert.h include.
9439 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9441 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9442 __pthread_initialize_minimal_internal not
9443 __pthread_initialize_minimal.
9445 2002-12-30 Ulrich Drepper <drepper@redhat.com>
9447 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9448 __pthread_initialize_minimal as hidden.
9450 * init.c (__pthread_initialize_minimal_internal): Don't mark as
9453 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9455 * Makefile ($(inst_libdir)/libpthread.so): Depend on
9456 $(common-objpfx)format.lds, include that into the output script.
9458 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9460 2002-12-28 Andreas Jaeger <aj@suse.de>
9462 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9463 nsec resolution changes.
9464 (xstat64_conv): Likewise.
9465 (xstat32_conv): Likewise.
9466 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9468 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9469 structs stat and stat64.
9470 * time/time.h (__timespec_defined): Define for __USE_MISC.
9471 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9473 2002-12-30 Jakub Jelinek <jakub@redhat.com>
9475 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
9477 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9478 (pthread_exit): Use strong_alias to avoid warnings.
9479 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9480 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9481 ptr___pthread_attr_init_2_*.
9482 * init.c (pthread_functions): Adjust.
9484 2002-12-29 Ulrich Drepper <drepper@redhat.com>
9486 * forward.c: Make all functions available by default again. It
9487 caused too much trouble.
9489 * pt-siglongjmp.c: Removed.
9491 2002-12-28 Jakub Jelinek <jakub@redhat.com>
9493 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9494 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9495 * sysdeps/i386/Makefile: New file.
9496 * sysdeps/i386/tcb-offsets.sym: New file.
9497 * sysdeps/pthread/tcb-offsets.h: New file.
9498 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9499 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9501 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9502 __register_atfork...
9503 (GLIBC_2.3.2): ...here.
9505 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9507 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9508 pthread_attr_setstackaddr with __attribute_deprecated__.
9510 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9512 * pt-system.c (system): Remove cancellation handling.
9513 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9514 cancellation routines.
9516 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9518 * descr.h: Include <dl-sysdep.h>.
9519 (struct pthread): Move header.data.list to the back of the struct.
9520 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9521 (MULTIPLE_THREADS_OFFSET): Adjust offset.
9522 (SYSINFO_OFFSEET): Likewise.
9524 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9526 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9528 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9529 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9530 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9531 (USE_DL_SYSINFO): Undef.
9533 2002-12-22 Jakub Jelinek <jakub@redhat.com>
9535 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9536 $(common-objpfx)libc.so.
9537 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9538 it is bigger than pipe buffer size even on arches with bigger
9540 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9542 2002-12-25 Ulrich Drepper <drepper@redhat.com>
9544 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9545 correct errno access for case that USE___THREAD is not defined.
9547 2002-12-24 Ulrich Drepper <drepper@redhat.com>
9549 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9550 Patch by Marijn Ros <marijn@mad.scientist.com>.
9552 2002-12-22 Roland McGrath <roland@redhat.com>
9554 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9556 2002-12-20 Ulrich Drepper <drepper@redhat.com>
9558 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9560 2002-12-19 Ulrich Drepper <drepper@redhat.com>
9562 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9563 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9564 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9566 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9568 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9569 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9570 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9571 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9572 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9573 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9574 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9575 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9577 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9579 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9581 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9583 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9585 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9586 that sysinfo is properly initialized.
9587 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9588 to 1 only for ld.so.
9590 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9591 RTLD_CORRECT_DYNAMIC_WEAK.
9593 2002-12-19 Jakub Jelinek <jakub@redhat.com>
9595 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9596 Use return 0 as 6th argument to FORWARD4.
9597 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9599 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9601 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9602 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9603 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9604 (INIT_SYSINFO): New #define.
9605 (TLS_TP_INIT): Use INIT_SYSINFO.
9606 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9607 At test to make sure SYSINFO_OFFSET value is correct.
9608 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9610 2002-12-18 Jakub Jelinek <jakub@redhat.com>
9612 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9613 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9614 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9615 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9616 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9617 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9618 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9620 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9622 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9623 macro instead of using int $0x80 directly.
9625 * sysdeps/pthread/bits/stdio-lock.h: New file.
9626 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9627 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9628 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9629 * Makefile (routines): Add libc-lowlevelmutex.
9631 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9632 __i686.get_pc_thunk.dx.
9634 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9636 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9637 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9638 ($(objpfx)tst-cancel-wrappers.out): New rule.
9639 * tst-cancel-wrappers.sh: New test.
9640 * tst-locale1.c: Include signal.h.
9641 (uselocale): Test static linking of __libc_current_sigrt*.
9643 2002-12-17 Ulrich Drepper <drepper@redhat.com>
9645 * Makefile (tests): Add tst-cancel6.
9646 * tst-cancel6.c: New file
9648 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9650 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9651 Define meaningfully for assembler as well.
9652 * pthreadP.h (struct pthread_functions): Remove
9653 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
9654 and ptr_pthread_attr_init_2_1 fields.
9655 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9656 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9657 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9658 (FORWARD3): Define using FORWARD4.
9659 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9661 * pt-system.c: Remove duplicate stdlib.h include.
9663 2002-12-16 Ulrich Drepper <drepper@redhat.com>
9665 * sem_init.c: Define sem_init@GLIBC_2.0.
9666 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9667 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9669 * flockfile.c: Moved to...
9670 * sysdeps/pthread/flockfile.c: ...here. New file.
9671 * funlockfile.c: Moved to...
9672 * sysdeps/pthread/funlockfile.c: ...here. New file.
9673 * ftrylockfile.c: Moved to...
9674 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
9676 2002-12-16 Jakub Jelinek <jakub@redhat.com>
9678 * libc-cancellation.c: Guard both function with
9679 #if !defined NOT_IN_libc.
9680 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9681 automatically provided pthread wrappers.
9682 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9683 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9685 * pt-open.c: Removed.
9686 * pt-fcntl.c: Removed.
9687 * pt-fsync.c: Removed.
9688 * pt-lseek.c: Removed.
9689 * pt-msgrcv.c: Removed.
9690 * pt-msgsnd.c: Removed.
9691 * pt-msync.c: Removed.
9692 * pt-nanosleep.c: Removed.
9693 * pt-open64.c: Removed.
9694 * pt-pause.c: Removed.
9695 * pt-pread.c: Removed.
9696 * pt-pread64.c: Removed.
9697 * pt-pwrite.c: Removed.
9698 * pt-pwrite64.c: Removed.
9699 * pt-read.c: Removed.
9700 * pt-recv.c: Removed.
9701 * pt-recvfrom.c: Removed.
9702 * pt-recvmsg.c: Removed.
9703 * pt-send.c: Removed.
9704 * pt-sendto.c: Removed.
9705 * pt-sigtimedwait.c: Removed.
9706 * pt-sigwait.c: Removed.
9707 * pt-wait.c: Removed.
9708 * pt-waitpid.c: Removed.
9709 * pt-write.c: Removed.
9710 * pt-accept.c: Removed.
9711 * pt-close.c: Removed.
9712 * pt-connect.c: Removed.
9713 * pt-lseek64.c: Removed.
9714 * pt-sendmsg.c: Removed.
9715 * pt-tcdrain.c: Removed.
9717 2002-12-15 Ulrich Drepper <drepper@redhat.com>
9719 * init.c (__pthread_initialize_minimal_internal): Renamed from
9720 __pthread_initialize_minimal. Make old name an alias. This
9721 converts a normal relocation into a relative relocation.
9723 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9725 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9726 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9727 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9728 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9729 pt-sigwaitinfo, pt-waitid, and pt-writev.
9730 * pt-creat.c: Removed.
9731 * pt-poll.c: Removed.
9732 * pt-pselect.c: Removed.
9733 * pt-readv.c: Removed.
9734 * pt-select.c: Removed.
9735 * pt-sigpause.c: Removed.
9736 * pt-sigsuspend.c: Removed.
9737 * pt-sigwaitinfo.c: Removed.
9738 * pt-waitid.c: Removed.
9739 * pt-writev.c: Removed.
9741 * init.c (pthread_functions): New variable.
9742 (__pthread_initialize_minimal): Pass pointer to pthread_functions
9743 (or NULL) to __libc_pthread_init.
9744 * forward.c: Rewrite to use __libc:pthread_functions array to get
9746 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9748 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9749 Take new parameter. Copy content of variable pointed to by it
9750 to __libc_pthread_init.
9752 * pthreadP.h (struct pthread_functions): New type.
9753 (__libc_pthread_init): Declare.
9755 * pthread_attr_destroy.c: Add namespace protected alias.
9756 * pthread_attr_getdetachstate.c: Likewise.
9757 * pthread_attr_getinheritsched.c: Likewise.
9758 * pthread_attr_getschedparam.c: Likewise.
9759 * pthread_attr_getschedpolicy.c: Likewise.
9760 * pthread_attr_getscope.c: Likewise.
9761 * pthread_attr_setdetachstate.c: Likewise.
9762 * pthread_attr_setinheritsched.c: Likewise.
9763 * pthread_attr_setschedparam.c: Likewise.
9764 * pthread_attr_setschedpolicy.c: Likewise.
9765 * pthread_attr_setscope.c: Likewise.
9766 * pthread_cond_broadcast.c: Likewise.
9767 * pthread_cond_destroy.c: Likewise.
9768 * pthread_cond_init.c: Likewise.
9769 * pthread_cond_signal.c: Likewise.
9770 * pthread_cond_wait.c: Likewise.
9771 * pthread_condattr_destroy.c: Likewise.
9772 * pthread_condattr_init.c: Likewise.
9773 * pthread_equal.c: Likewise.
9774 * pthread_exit.c: Likewise.
9775 * pthread_getschedparam.c: Likewise.
9776 * pthread_self.c: Likewise.
9777 * pthread_setcancelstate.c: Likewise.
9778 * pthread_setschedparam.c: Likewise.
9779 * pthread_mutex_destroy.c: Likewise.
9780 * pthread_mutex_init.c: Likewise.
9781 * pthreadP.h: Add prototypes for the aliases.
9783 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9784 multiple_threads member in correct TCB to 1.
9786 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9787 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
9788 member of thread decriptor, otherwise return unconditionally 1.
9790 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9792 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9793 regular Linux version. Remove file.
9794 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
9795 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
9796 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
9797 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
9798 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
9799 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
9800 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
9801 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
9802 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
9803 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
9804 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
9805 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
9806 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
9807 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
9808 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
9809 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
9810 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
9811 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
9812 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
9813 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
9814 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
9815 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
9816 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
9817 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
9818 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
9819 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
9820 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
9821 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
9822 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
9823 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
9825 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9827 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9828 * sysdeps/unix/sysv/linux/open.c: Removed.
9829 * sysdeps/unix/sysv/linux/fsync.c: Removed.
9830 * sysdeps/unix/sysv/linux/lseek.c: Removed.
9831 * sysdeps/unix/sysv/linux/msync.c: Removed.
9832 * sysdeps/unix/sysv/linux/read.c: Removed.
9833 * sysdeps/unix/sysv/linux/close.c: Removed.
9834 * sysdeps/unix/sysv/linux/creat.c: Removed.
9835 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9836 * sysdeps/unix/sysv/linux/pause.c: Removed.
9837 * sysdeps/unix/sysv/linux/select.c: Removed.
9838 * sysdeps/unix/sysv/linux/write.c: Removed.
9840 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9842 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9843 element in TCB to see whether locking is needed.
9845 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9846 MULTIPLE_THREADS_OFFSET value is correct.
9848 * sysdeps/unix/sysv/linux/close.c: New file.
9849 * sysdeps/unix/sysv/linux/connect.S: New file.
9850 * sysdeps/unix/sysv/linux/creat.c: New file.
9851 * sysdeps/unix/sysv/linux/fsync.c: New file.
9852 * sysdeps/unix/sysv/linux/llseek.c: New file.
9853 * sysdeps/unix/sysv/linux/lseek.c: New file.
9854 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9855 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9856 * sysdeps/unix/sysv/linux/msync.c: New file.
9857 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9858 * sysdeps/unix/sysv/linux/open.c: New file.
9859 * sysdeps/unix/sysv/linux/open64.c: New file.
9860 * sysdeps/unix/sysv/linux/pause.c: New file.
9861 * sysdeps/unix/sysv/linux/poll.c: New file.
9862 * sysdeps/unix/sysv/linux/pread.c: New file.
9863 * sysdeps/unix/sysv/linux/pread64.c: New file.
9864 * sysdeps/unix/sysv/linux/pselect.c: New file.
9865 * sysdeps/unix/sysv/linux/pwrite.c: New file.
9866 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9867 * sysdeps/unix/sysv/linux/readv.c: New file.
9868 * sysdeps/unix/sysv/linux/recv.S: New file.
9869 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9870 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9871 * sysdeps/unix/sysv/linux/select.c: New file.
9872 * sysdeps/unix/sysv/linux/send.S: New file.
9873 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9874 * sysdeps/unix/sysv/linux/sendto.S: New file.
9875 * sysdeps/unix/sysv/linux/sigpause.c: New file.
9876 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9877 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9878 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9879 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9880 * sysdeps/unix/sysv/linux/system.c: New file.
9881 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9882 * sysdeps/unix/sysv/linux/wait.c: New file.
9883 * sysdeps/unix/sysv/linux/waitid.c: New file.
9884 * sysdeps/unix/sysv/linux/waitpid.c: New file.
9885 * sysdeps/unix/sysv/linux/writev.c: New file.
9886 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9888 * pt-readv.c: Fix comment.
9890 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9892 * tst-cleanup1.c: Include stdlib.h.
9894 * tst-cancel5.c: New test.
9895 * Makefile (tests): Add tst-cancel5.
9896 (tst-cancel5): Link against libc.so libpthread.so in that order.
9898 2002-12-13 Ulrich Drepper <drepper@redhat.com>
9900 * forward.c (test_loaded): Prevent recursive calls.
9902 * Makefile (routines): Add libc-cancellation.
9903 * libc-cancellation.c: New file.
9904 * descr.h (struct pthread): Add multiple_threads field.
9905 * allocatestack.c (allocate_stack): Initialize multiple_header field of
9906 new thread descriptor to 1.
9907 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9908 Initialize multiple_thread field after successful thread creation.
9909 * cancellation.c (__do_cancel): Move to pthreadP.h.
9910 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9911 (__pthread_disable_asynccancel): Add internal_function attribute.
9912 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9913 * pthread_setcancelstate.c: Likewise.
9914 * pthread_setcanceltype.c: Likewise.
9915 * pthread_exit.c: Likewise.
9916 * pthreadP.h (CANCELLATION_P): Likewise.
9917 (__do_cancel): Define as static inline.
9918 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9919 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9921 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9922 fields. Define MULTIPLE_THREADS_OFFSET.
9923 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9925 * sysdeps/unix/sysv/linux/accept.S: New file.
9926 * sysdeps/unix/sysv/linux/read.c: New file.
9927 * sysdeps/unix/sysv/linux/write.c: New file.
9928 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9929 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9930 initialization of __libc_locking_needed.
9931 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9932 __libc_locking_needed, use multiple_threads field in TCB.
9933 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9935 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9937 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9939 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9941 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9942 access to __libc_locking_needed for PIC.
9944 2002-12-12 Jakub Jelinek <jakub@redhat.com>
9946 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9947 declare for libc.so.
9948 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9950 (__libc_lock_lock): Put into statement expression.
9951 (__libc_lock_unlock): Remove trailing semicolon.
9952 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9954 2002-12-12 Roland McGrath <roland@redhat.com>
9956 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9957 "m" constraint to refer to __libc_locking_needed. Declare it here.
9959 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9961 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9962 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9963 Initialize __libc_locking_needed.
9964 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9965 instead of __register_pthread_fork_handler.
9966 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9967 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9968 fork-gen with libc_pthread_init.
9969 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9970 of __register_pthread_fork_handler.
9971 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9972 of __register_pthread_fork_handler.
9973 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9974 __libc_locking_needed to determine whether lock prefix can be avoided.
9975 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9977 2002-12-11 Ulrich Drepper <drepper@redhat.com>
9979 * Makefile (tests): Add tst-cleanup1.
9980 * tst-cleanup1.c: New file.
9981 * cancellation.c (__cleanup_thread): Removed.
9982 (__do_cancel): Remove call to __cleanup_thread.
9983 * pthreadP.h: Remove __cleanup_thread prorotype.
9985 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9986 Remember function and argument even if cancellation handler
9987 function is not available.
9988 (__libc_cleanup_region_end): Execute registered function directly if
9989 pthread functions are not available.
9990 (__libc_cleanup_end): Likewise.
9992 * init.c (__pthread_initialize_minimal): Fix initialization in
9993 static lib by preventing gcc from being too clever.
9995 2002-12-10 Ulrich Drepper <drepper@redhat.com>
9997 * init.c (__pthread_initialize_minimal): Remove unneccesary
10000 * Makefile (tests): We can run tst-locale2 now.
10002 2002-12-09 Ulrich Drepper <drepper@redhat.com>
10004 * Versions: Remove duplicated sigwait entry.
10006 2002-12-08 Ulrich Drepper <drepper@redhat.com>
10008 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10011 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10013 * pthreadP.h: Declare __pthread_enable_asynccancel and
10014 __pthread_disable_asynccancel.
10015 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10016 (CANCEL_RESET): Use __pthread_disable_asynccancel.
10017 * cancellation.c (__pthread_enable_asynccancel): New function.
10018 (__pthread_disable_asynccancel): New function.
10019 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10020 * pt-close.c: Likewise.
10021 * pt-connect.c: Likewise.
10022 * pt-creat.c: Likewise.
10023 * pt-fcntl.c: Likewise.
10024 * pt-fsync.c: Likewise.
10025 * pt-lseek.c: Likewise.
10026 * pt-lseek64.c: Likewise.
10027 * pt-msgrcv.c: Likewise.
10028 * pt-msgsnd.c: Likewise.
10029 * pt-msync.c: Likewise.
10030 * pt-nanosleep.c: Likewise.
10031 * pt-open.c: Likewise.
10032 * pt-open64.c: Likewise.
10033 * pt-pause.c: Likewise.
10034 * pt-poll.c: Likewise.
10035 * pt-pread.c: Likewise.
10036 * pt-pread64.c: Likewise.
10037 * pt-pselect.c: Likewise.
10038 * pt-pwrite.c: Likewise.
10039 * pt-pwrite64.c: Likewise.
10040 * pt-read.c: Likewise.
10041 * pt-readv.c: Likewise.
10042 * pt-recv.c: Likewise.
10043 * pt-recvfrom.c: Likewise.
10044 * pt-recvmsg.c: Likewise.
10045 * pt-select.c: Likewise.
10046 * pt-send.c: Likewise.
10047 * pt-sendmsg.c: Likewise.
10048 * pt-sendto.c: Likewise.
10049 * pt-sigpause.c: Likewise.
10050 * pt-sigsuspend.c: Likewise.
10051 * pt-sigtimedwait.c: Likewise.
10052 * pt-sigwait.c: Likewise.
10053 * pt-sigwaitinfo.c: Likewise.
10054 * pt-system.c: Likewise.
10055 * pt-tcdrain.c: Likewise.
10056 * pt-wait.c: Likewise.
10057 * pt-waitid.c: Likewise.
10058 * pt-waitpid.c: Likewise.
10059 * pt-write.c: Likewise.
10060 * pt-writev.c: Likewise.
10061 * pthread_join.c: Likewise.
10062 * pthread_timedjoin.c: Likewise.
10064 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10065 (__xpg_sigpause): New function.
10066 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10068 2002-12-07 Ulrich Drepper <drepper@redhat.com>
10070 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10072 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10073 _GI_pthread_cleanup_pop to pthreadP.h.
10075 * ftrylockfile.c: Use _IO_lock_trylock instead of
10076 pthread_mutex_trylock.
10078 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10079 (CANCEL_RESET): Likewise.
10080 (__pthread_setcanceltype_): Declare.
10081 (__pthread_mutex_lock_internal): Declare.
10082 (__pthread_mutex_unlock_internal): Declare.
10083 (__pthread_once_internal): Declare.
10084 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10085 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10087 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10088 and pthread_mutex_unlock.
10089 * pthread_cond_wait.c: Likewise.
10090 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10091 * pthread_mutex_unlock.c: Likewise.
10093 * pthread_setcanceltype.c: Add additional alias
10094 __pthread_setcanceltype.
10096 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10097 * sem_open.c (sem_open): Likewise.
10098 Use __libc_open, __libc_write, and __libc_close instead of
10099 open, write, and close respectively.
10101 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10102 Rewrite as statement expression since it must return a value.
10104 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10105 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10108 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10109 alias __pthread_once_internal.
10111 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10113 2002-12-06 Ulrich Drepper <drepper@redhat.com>
10115 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10116 * tst-stdio1.c: New file.
10117 * tst-stdio2.c: New file.
10119 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10121 * Makefile (tests): Comment out tst-locale2 for now.
10122 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10124 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10126 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10127 Use _IO_lock_init instead of explicit assignment.
10129 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10130 Define __libc_lock_* and __libc_lock_recursive macros with
10131 lowlevellock macros, not pthread mutexes.
10133 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
10134 of pthread_mutex_lock.
10135 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
10136 instead of pthread_mutex_unlock.
10138 2002-12-06 Roland McGrath <roland@redhat.com>
10140 * allocatestack.c (__stack_user): Use uninitialized defn.
10141 * init.c (__pthread_initialize_minimal): Initialize it here.
10143 2002-12-05 Roland McGrath <roland@redhat.com>
10145 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10147 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10149 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10150 missing & here too.
10152 2002-12-05 Ulrich Drepper <drepper@redhat.com>
10154 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10156 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10157 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10158 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10159 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10160 for __libc_lock_* macros.
10161 * Makefile (routines): Add libc-lowlevellock.
10163 2002-10-09 Roland McGrath <roland@redhat.com>
10165 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10166 Under [__PIC__], call the function via the pointer fetched for
10167 comparison rather than a call by name that uses the PLT.
10168 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10169 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10170 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10171 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10172 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10174 2002-12-04 Roland McGrath <roland@redhat.com>
10176 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10178 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10179 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10181 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10183 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10185 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10186 a completely opaque, non-integer type.
10187 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10189 2002-12-05 Jakub Jelinek <jakub@redhat.com>
10191 * sysdeps/i386/tls.h: Include stdlib.h.
10192 * sysdeps/x86_64/tls.h: Likewise.
10194 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10196 * Makefile (tests): Add tst-locale2.
10197 (tests-static): Likewise.
10198 * tst-locale2.c: New file.
10200 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10201 volatile and add memory clobbers to lock operations.
10203 2002-12-03 Ulrich Drepper <drepper@redhat.com>
10205 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10206 * sysdeps/i386/i486/bits/atomic.h: New file.
10207 * sysdeps/i386/i586/bits/atomic.h: New file.
10208 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10209 include i486 version.
10210 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10211 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10212 Patch by Marijn Ros <marijn@mad.scientist.com>.
10214 * allocatestack.c (get_cached_stack): Don't crash if we first
10215 found a stack with a larger size then needed.
10216 Reported by Hui Huang <hui.huang@sun.com>.
10218 * Makefile (tests): Add tst-sysconf.
10219 * tst-sysconf.c: New file.
10221 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10222 PTHREAD_THREADS_MAX.
10224 2002-12-02 Roland McGrath <roland@redhat.com>
10226 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10227 Declare using hidden_proto instead of attribute_hidden, so there are
10228 non-.hidden static symbols for gdb to find.
10229 (__pthread_keys): Likewise.
10230 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10231 * allocatestack.c (__stack_user): Likewise.
10232 * pthread_create.c (__pthread_keys): Likewise.
10233 (__nptl_threads_events, __nptl_last_event): Make these static instead
10235 * pthread_key_create.c (__pthread_pthread_keys_max,
10236 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10238 2002-12-02 Ulrich Drepper <drepper@redhat.com>
10240 * Makefile (tests): Add tst-locale1. If buid-static is yes link
10242 * tst-locale1.c: New file.
10244 * pthread_cond_timedwait.c: Include <stdlib.h>.
10246 * Makefile (tests): Add tst-fork2 and tst-fork3.
10247 * tst-fork2.c: New file.
10248 * tst-fork3.c: New file.
10250 2002-11-28 Ulrich Drepper <drepper@redhat.com>
10252 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10254 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10255 require it to 200112L.
10257 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10258 instruction only if HAVE_CMOV is defined.
10259 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10261 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10263 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10265 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10267 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10269 2002-11-27 Ulrich Drepper <drepper@redhat.com>
10271 * sysdeps/x86_64/bits/atomic.h: New file.
10273 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10276 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10277 possible since gettid cannot fail.
10279 * sysdeps/x86_64/pthreaddef.h: New file.
10281 * sysdeps/i386/pthreaddef.h (gettid): Removed.
10283 * sysdeps/x86_64/pthread_spin_init.c: New file.
10284 * sysdeps/x86_64/pthread_spin_lock.c: New file.
10285 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10286 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10288 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10289 Add missing lock prefix. Minute optimization.
10291 * tst-spin2.c (main): Also check successful trylock call.
10293 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10294 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
10296 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10297 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
10299 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
10300 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10301 value in case of an error. Add support for INTERNAL_SYSCALL.
10303 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10304 value in case of an error.
10306 * sysdeps/x86_64/tls.h: New file.
10308 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10310 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
10311 takes the array member name and the index as parameters.
10312 (THREAD_SETMEM_NC): Likewise.
10313 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10314 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10317 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10318 to decide which code to use.
10319 (THREAD_SETMEM_NC): Likewise.
10321 * allocatestack.c (queue_stack): Don't remove stack from list here.
10322 Do it in the caller. Correct condition to prematurely terminate
10323 loop to free stacks.
10324 (__deallocate_stack): Remove stack from list here.
10326 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10328 * Makefile (tests): Add tst-stack1.
10329 * tst-stack1.c: New file.
10331 * allocatestack.c (allocate_stack): Initialize the TCB on a user
10334 * pthread_attr_getstack.c: Return bottom of the thread area.
10336 2002-11-25 Ulrich Drepper <drepper@redhat.com>
10338 * Makefile (libpthread-routines): Add pt-allocrtsig and
10339 pthread_kill_other_threads.
10340 * pt-allocrtsig.c: New file.
10341 * pthread_kill_other_threads.c: New file.
10342 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10343 all three functions.
10344 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10346 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10347 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10348 and __libc_allocate_rtsig_private.
10349 * Versions (libpthread): Export pthread_kill_other_threads_np,
10350 __libc_current_sigrtmin, and __libc_current_sigrtmax.
10352 2002-11-24 Ulrich Drepper <drepper@redhat.com>
10354 * allocatestack.c (allocate_stack): stackaddr in attribute points to
10355 the end of the stack. Adjust computations.
10356 When mprotect call fails dequeue stack and free it.
10357 * pthread_attr_setstack.c: Store top of the stack in stackaddr
10359 * pthread_getattr_np.c: Likewise.
10361 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10364 2002-11-23 Ulrich Drepper <drepper@redhat.com>
10366 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10367 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10369 2002-11-22 Ulrich Drepper <drepper@redhat.com>
10371 * pthread_getspecific.c: Optimize access to first 2nd-level array.
10372 * pthread_setspecific.c: Likewise.
10374 2002-11-21 Ulrich Drepper <drepper@redhat.com>
10376 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10377 definitions. Get them from the official place.
10378 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10380 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10381 Use new CLONE_ flags in clone() calls.
10383 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10384 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10386 * Versions: Add pthread_* functions for libc.
10387 * forward.c: New file.
10389 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10391 * herrno.c: New file.
10394 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10395 sem_trywait, and sem_timedwait. Add herrno and res.
10396 * sem_init.c: Don't initialize lock and waiters members.
10397 * sem_open.c: Likewise.
10398 * sem_post.c: Removed.
10399 * sem_wait.c: Removed.
10400 * sem_trywait.c: Removed.
10401 * sem_timedwait.c: Removed.
10402 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10403 Includes full implementations of sem_post, sem_wait, sem_trywait,
10405 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10406 for new implementation.
10407 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10408 and waiters fields.
10410 * tst-sem3.c: Improve error message.
10411 * tst-signal3.c: Likewise.
10413 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10414 to tell the kernel about the termination futex and to initialize tid
10415 member. Don't initialize main_thread.
10416 * descr.h (struct pthread): Remove main_thread member.
10417 * cancelllation.c (__do_cancel): Remove code handling main thread.
10418 The main thread is not special anymore.
10420 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
10421 size of the stacks to stack_cache_actsize.
10423 * pt-readv.c: Add missing "defined".
10424 * pt-sigwait.c: Likewise.
10425 * pt-writev.c: Likewise.
10427 2002-11-09 Ulrich Drepper <drepper@redhat.com>
10429 * Versions: Export __connect from libpthread.
10430 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10432 * Makefile (libpthread-routines): Add pt-raise.
10433 * sysdeps/unix/sysv/linux/raise.c: New file.
10434 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10435 * sysdeps/generic/pt-raise.c: New file.
10437 * pthread_cond_init.c: Initialize all data elements of the condvar
10438 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10440 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10441 * pthread_create.c: Likewise.
10443 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10444 * tst-key1.c: New file.
10445 * tst-key2.c: New file.
10446 * tst-key3.c: New file.
10448 * Versions: Export pthread_detach for version GLIBC_2.0.
10449 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10451 2002-11-08 Ulrich Drepper <drepper@redhat.com>
10453 * pthread_key_create.c: Terminate search after an unused key was found.
10454 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10456 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10457 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10459 2002-10-10 Ulrich Drepper <drepper@redhat.com>
10461 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10462 dynamic lookup for errno in PIC.
10464 * allocatestack.c (get_cached_stack): Rearrange code slightly to
10465 release the stack lock as soon as possible.
10466 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10467 the static TLS block.
10468 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10470 * cancellation.c: Renamed from cancelation.c.
10471 * Makefile: Adjust accordingly.
10472 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10473 * cleanup_defer.c: Use CANCELLATION_P.
10474 * pthread_testcancel.c: Likewise.
10475 * descr.h: Fix spelling in comments.
10476 * init.c: Likewise.
10477 * pthread_getattr_np.c: Likewise.
10478 * pthread_getschedparam.c: Likewise.
10479 * pthread_setschedparam.c: Likewise.
10480 * Versions: Likewise.
10482 * pt-pselect.c: New file.
10483 * Makefile (libpthread-routines): Add pt-pselect.
10484 * Versions: Add pselect.
10486 * tst-cancel4.c: New file.
10487 * Makefile (tests): Add tst-cancel4.
10489 2002-10-09 Ulrich Drepper <drepper@redhat.com>
10491 * pthread_mutex_lock.c: Always record lock ownership.
10492 * pthread_mutex_timedlock.c: Likewise.
10493 * pthread_mutex_trylock.c: Likewise.
10495 * pt-readv.c: New file.
10496 * pt-writev.c: New file.
10497 * pt-creat.c: New file.
10498 * pt-msgrcv.c: New file.
10499 * pt-msgsnd.c: New file.
10500 * pt-poll.c: New file.
10501 * pt-select.c: New file.
10502 * pt-sigpause.c: New file.
10503 * pt-sigsuspend.c: New file.
10504 * pt-sigwait.c: New file.
10505 * pt-sigwaitinfo.c: New file.
10506 * pt-waitid.c: New file.
10507 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10508 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10509 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10510 * Versions: Add all the new functions.
10512 * tst-exit1.c: New file.
10513 * Makefile (tests): Add tst-exit1.
10515 * sem_timedwait.c: Minor optimization for more optimal fastpath.
10517 2002-10-08 Ulrich Drepper <drepper@redhat.com>
10519 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10521 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10522 call. pthread_join is an official cancellation point.
10523 * pthread_timedjoin.c: Likewise.
10525 * pthread_cond_wait.c: Revert order in which internal lock are dropped
10526 and the condvar's mutex are retrieved.
10527 * pthread_cond_timedwait.c: Likewise.
10528 Reported by dice@saros.East.Sun.COM.
10530 2002-10-07 Ulrich Drepper <drepper@redhat.com>
10532 * pthreadP.h: Cut out all type definitions and move them...
10533 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
10534 * pthreadP.h: Include <internaltypes.h>.
10536 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10537 performance tweaks.
10539 * sem_trywait.c: Shuffle #includes around to get right order.
10540 * sem_timedwait.c: Likewise.
10541 * sem_post.c: Likewise.
10542 * sem_wait.c: Likewise.
10544 * nptl 0.3 released.
10546 * Makefile (tests): Add tst-signal3.
10547 * tst-signal3.c: New file.
10549 2002-10-05 Ulrich Drepper <drepper@redhat.com>
10551 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10552 the asms modify the sem object.
10553 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10555 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10556 the actual members.
10557 * pthreadP.h (struct sem): New type. Actual semaphore type.
10558 * semaphoreP.h: Include pthreadP.h.
10559 * sem_getvalue.c: Adjust to sem_t change.
10560 * sem_init.c: Likewise.
10561 * sem_open.c: Likewise.
10562 * sem_post.c: Likewise.
10563 * sem_timedwait.c: Likewise.
10564 * sem_trywait.c: Likewise.
10565 * sem_wait.c: Likewise.
10567 2002-10-04 Ulrich Drepper <drepper@redhat.com>
10569 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10570 * tst-basic2.c: New file.
10571 * tst-exec1.c: New file.
10572 * tst-exec2.c: New file.
10573 * tst-exec3.c: New file.
10575 * tst-fork1.c: Remove extra */.
10577 * nptl 0.2 released. The API for IA-32 is complete.