1 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
3 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
4 to force runp->refcntr to be read from memory.
6 2008-09-08 Richard Guenther <rguenther@suse.de>
8 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
9 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
10 lll_timedlock, lll_robust_timedlock, lll_unlock,
11 lll_robust_unlock): Promote private to int.
13 2008-08-15 Ulrich Drepper <drepper@redhat.com>
15 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
16 ARCH_RETRY_MMAP definitions.
17 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
18 Define MAP_STACK when not defined.
19 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
20 handling of ARCH_RETRY_MMAP.
22 2008-07-30 Ulrich Drepper <drepper@redhat.com>
24 * tst-align2.c (f): Print message that f is reached.
26 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
29 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
30 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
32 2008-07-25 Ulrich Drepper <drepper@redhat.com>
34 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
35 SOCK_CLOEXEC if possible.
37 2008-05-29 Ulrich Drepper <drepper@redhat.com>
39 * Makefile (tests): Add tst-rwlock2a.
40 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
41 * tst-rwlock2a.c: New file.
43 2008-06-12 Ulrich Drepper <drepper@redhat.com>
45 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
47 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
49 * sysdeps/pthread/pthread.h: Fix typo in comment.
51 2008-05-28 Ulrich Drepper <drepper@redhat.com>
53 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
54 of CPU set to the kernel.
56 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
58 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
60 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
61 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
62 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
63 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
64 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
65 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
67 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
69 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
71 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
73 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
75 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
78 2008-05-26 Ulrich Drepper <drepper@redhat.com>
80 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
82 2008-05-20 Jakub Jelinek <jakub@redhat.com>
84 David S. Miller <davem@davemloft.net>
86 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
88 2008-05-10 Ulrich Drepper <drepper@redhat.com>
90 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
92 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
94 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
96 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
98 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
100 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
102 2008-04-14 David S. Miller <davem@davemloft.net>
104 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
105 (__old_sem_wait): Fix argument to lll_futex_wait().
107 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
109 * pthread_create.c: Require pthread_mutex_trylock and
110 pthread_key_delete for libgcc.
112 2008-04-08 Jakub Jelinek <jakub@redhat.com>
115 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
116 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
117 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
119 2008-03-27 Ulrich Drepper <drepper@redhat.com>
121 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
122 <linux/limits.h> has defined it.
123 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
124 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
125 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
126 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
128 2008-03-18 Jakub Jelinek <jakub@redhat.com>
130 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
132 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
133 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
135 2008-03-14 Ulrich Drepper <drepper@redhat.com>
137 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
138 HAVE_DL_DISCOVER_OSVERSION.
139 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
140 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
142 2008-03-07 Ulrich Drepper <drepper@redhat.com>
145 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
146 _POSIX_CHOWN_RESTRICTED value to zero.
148 2008-01-31 Roland McGrath <roland@redhat.com>
150 * Makefile (omit-deps): Variable removed.
152 2008-01-30 Ulrich Drepper <drepper@redhat.com>
154 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
155 unnecessary addr32 prefix.
157 2008-01-29 Roland McGrath <roland@redhat.com>
159 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
161 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
163 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
165 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
167 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
169 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
170 (__lll_lock_wait_private): Fix typo.
171 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
172 (pthread_barrier_wait): Likewise. Adjust XADD use.
173 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
175 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
176 (pthread_rwlock_timedrdlock): Return correct return value.
177 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
178 (pthread_rwlock_timedwrlock): Likewise.
180 2008-01-15 Ulrich Drepper <drepper@redhat.com>
182 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
183 thread returns the program exits with an error code.
185 2008-01-10 Ulrich Drepper <drepper@redhat.com>
187 * pthread-errnos.sym: Add EOVERFLOW.
188 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
189 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
190 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
191 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
193 2007-12-14 Ulrich Drepper <drepper@redhat.com>
195 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
196 parameter. Passed it as permission to mmap.
197 * allocatestack.c (allocate_stack): Pass prot as second parameter
200 2007-12-12 Ulrich Drepper <drepper@redhat.com>
202 * tst-basic7.c: Allocate memory for the stack.
205 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
206 (__pthread_cond_timedwait): Don't use VDSO.
207 Patch by Michal Januszewski.
209 2007-12-07 Ulrich Drepper <drepper@redhat.com>
212 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
213 Allow label before pthread_cleanup_pop.
214 (pthread_cleanup_pop_restore_np): Likewise.
216 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
218 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
219 Store 2 before returning ETIMEDOUT.
221 2007-11-23 Ulrich Drepper <drepper@redhat.com>
223 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
224 Store 2 before returning ETIMEDOUT.
225 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
226 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
227 (__lll_lock_wait_private): Optimize.
228 (__lll_lock_wait): Likewise.
230 2007-11-20 Jakub Jelinek <jakub@redhat.com>
232 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
233 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
234 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
236 2007-11-08 Ulrich Drepper <drepper@redhat.com>
239 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
240 If we time out, try one last time to lock the futex to avoid
241 losing a wakeup signal.
242 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
243 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
246 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
249 2007-11-07 Ulrich Drepper <drepper@redhat.com>
252 * allocatestack.c (allocate_stack): Change ENOMEM error in case
253 mmap failed to EAGAIN.
254 * Makefile (tests): Add tst-basic7.
255 * tst-basic7.c: New file.
257 2007-11-05 Ulrich Drepper <drepper@redhat.com>
259 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
262 2007-11-03 Mike Frysinger <vapier@gentoo.org>
264 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
265 missing line continuations.
266 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
267 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
269 2007-10-28 Ulrich Drepper <drepper@redhat.com>
272 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
273 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
274 (struct timer): Add next element.
275 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
276 enqueue timer structure into __active_timer_sigev_thread list.
277 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
278 remove timer struct from __active_timer_sigev_thread.
279 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
280 Before using timer structure make sure it is still on the
281 __active_timer_sigev_thread list. Keep lock until done.
282 Define __active_timer_sigev_thread and
283 __active_timer_sigev_thread_lock.
285 2007-10-27 Ulrich Drepper <drepper@redhat.com>
287 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
288 Redefine thread_atfork for use of ATFORK_MEM.
289 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
290 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
292 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
293 Use atomic operation when removing first element of list.
295 2007-10-17 Jakub Jelinek <jakub@redhat.com>
297 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
298 routine instead of an alias to __new_sem_post.
300 2007-10-15 Jakub Jelinek <jakub@redhat.com>
302 * init.c (__pthread_initialize_minimal): Initialize word to appease
305 2007-10-10 Jakub Jelinek <jakub@redhat.com>
307 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
308 libc.so just clear NAME.
309 (__libc_rwlock_fini): Nop inside of libc.so.
310 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
313 2007-09-02 Ulrich Drepper <drepper@redhat.com>
315 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
316 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
318 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
320 2007-08-21 Ulrich Drepper <drepper@redhat.com>
323 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
324 reclaimed stack if necessary.
325 * Makefile (tests): Add tst-tsd6.
326 * tst-tsd6.c: New file.
328 2007-08-21 Jakub Jelinek <jakub@redhat.com>
330 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
331 Add private argument.
333 2007-08-20 Ulrich Drepper <drepper@redhat.com>
335 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
336 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
338 2007-08-16 Jakub Jelinek <jakub@redhat.com>
340 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
341 (__lll_robust_timedlock): Pass private as last argument to
342 __lll_robust_timedlock_wait.
343 (__lll_unlock): Fix a pasto.
345 2007-08-15 Jakub Jelinek <jakub@redhat.com>
347 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
348 sparc_old_sem): New structs.
349 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
350 (__sem_wait_cleanup): New function.
351 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
352 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
353 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
355 (__old_sem_wait): New function.
356 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
357 nptl/sysdeps/unix/sysv/linux/sparc version.
358 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
360 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
361 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
362 (__new_sem_trywait): Use sparc_old_sem structure.
363 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
364 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
365 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
366 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
367 lll_futex_timed_wait.
368 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
369 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
370 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
372 (__old_sem_post): New function.
373 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
374 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
375 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
376 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
377 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
378 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
380 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
382 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
383 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
384 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
385 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
386 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
387 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
388 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
390 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
391 kernel-features.h and tcb-offsets.h.
392 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
393 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
395 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
397 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
398 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
400 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
401 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
402 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
403 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
404 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
405 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
406 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
408 2007-08-14 Jakub Jelinek <jakub@redhat.com>
410 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
411 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
412 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
413 lll_futex_timed_wait.
415 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
416 __lll_robust_unlock): Rewrite as macros instead of inline functions.
417 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
418 __lll_robust_unlock, __lll_wait_tid): Likewise.
420 2007-08-13 Jakub Jelinek <jakub@redhat.com>
422 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
424 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
425 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
426 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
427 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
428 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
429 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
430 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
431 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
433 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
434 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
435 process private. Switch DW_CFA_advance_loc1 and some
436 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
437 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
438 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
439 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
440 process private. Switch DW_CFA_advance_loc{1,2} and some
441 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
442 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
443 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
444 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
446 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
447 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
448 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
450 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
451 (__pthread_cond_broadcast): Compare %r8 instead of
452 dep_mutex-cond_*(%rdi) with $-1.
453 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
454 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
457 2007-08-13 Ulrich Drepper <drepper@redhat.com>
459 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
461 2007-08-13 Jakub Jelinek <jakub@redhat.com>
463 * allocatestack.c: Include kernel-features.h.
464 * pthread_create.c: Likewise.
465 * pthread_mutex_init.c: Likewise.
467 * pthread_cond_timedwait.c: Likewise.
468 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
469 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
470 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
471 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
472 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
473 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
474 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
476 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
478 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
479 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
480 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
481 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
483 2007-08-12 Jakub Jelinek <jakub@redhat.com>
485 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
486 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
487 byte elements. One of them is the new __shared element.
488 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
489 adjust names of other padding elements.
490 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
491 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
492 byte elements. One of them is the new __shared element.
493 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
494 adjust names of other padding elements.
495 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
496 Renamed __pad1 element to __shared, adjust names of other padding
498 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
499 (pthread_rwlock_t): Likewise.
500 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
503 2007-08-09 Anton Blanchard <anton@samba.org>
505 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
507 2007-08-12 Ulrich Drepper <drepper@redhat.com>
509 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
511 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
513 2007-08-11 Ulrich Drepper <drepper@redhat.com>
515 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
516 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
517 dealing with robust mutexes.
518 * pthread_mutex_timedlock.c: Likewise.
519 * pthread_mutex_trylock.c: Likewise.
520 * pthread_mutex_unlock.c: Likewise.
521 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
523 2007-08-06 Jakub Jelinek <jakub@redhat.com>
525 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
526 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
527 (PTHREAD_MUTEX_PSHARED): Define.
528 * pthread_mutex_init.c (__pthread_mutex_init): Set
529 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
531 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
532 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
533 as second argument to lll_lock.
534 (LLL_MUTEX_TRYLOCK): Take mutex as argument
535 instead of its __data.__lock field.
536 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
537 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
539 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
540 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
541 instead of mutex->__data.__kind directly, pass
542 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
543 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
544 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
545 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
546 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
547 to lll_timedlock, lll_robust_timedlock, lll_unlock and
548 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
549 of mutex->__data.__kind directly.
550 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
551 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
552 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
553 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
554 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
555 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
557 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
558 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
559 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
561 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
562 Take mutex as argument instead of its __data.__lock field, pass
563 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
564 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
566 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
567 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
568 to lll_robust_cond_lock.
569 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
570 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
571 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
572 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
573 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
574 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
576 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
577 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
579 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
580 pshared variable, pass it to lll_lock, lll_unlock,
581 lll_futex_timedwait and lll_futex_wake.
582 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
583 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
585 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
586 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
588 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
589 lll_futex_wake_unlock): Likewise.
590 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
592 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
593 lll_futex_wake_unlock): Likewise.
594 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
596 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
597 lll_futex_wake_unlock): Likewise.
598 (lll_futex_wake): Fix a typo.
599 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
600 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
601 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
602 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
603 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
604 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
605 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
606 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
607 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
608 (__pthread_cond_timedwait): Likewise.
609 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
610 (__condvar_cleanup, __pthread_cond_wait): Likewise.
612 2007-08-05 Jakub Jelinek <jakub@redhat.com>
614 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
615 Don't use CGOTSETUP and CGOTRESTORE macros.
616 (CGOTSETUP, CGOTRESTORE): Remove.
617 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
620 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
622 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
623 definitions for private futexes.
624 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
625 kernel-features.h and lowlevellock.h. Use private futexes if
627 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
628 (__lll_mutex_lock_wait): Rename to
629 (__lll_lock_wait): ... this. Don't compile in for libc.so.
630 (__lll_mutex_timedlock_wait): Rename to ...
631 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
632 Don't compile in for libc.so.
633 (__lll_mutex_unlock_wake): Rename to ...
634 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
635 (__lll_timedwait_tid): Use __NR_gettimeofday.
636 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
637 the header from assembler. Renamed all lll_mutex_* resp.
638 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
639 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
640 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
642 (__lll_lock_wait_private): Add prototype.
643 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
644 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
645 __lll_unlock_wake): Likewise.
646 (lll_lock): Add private argument. Call __lll_lock_wait_private
647 if private is constant LLL_PRIVATE.
648 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
649 lll_timedlock, lll_robust_timedlock): Add private argument.
650 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
651 if private is constant LLL_PRIVATE.
652 (lll_robust_unlock, lll_robust_dead): Add private argument.
653 (lll_lock_t): Remove.
654 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
655 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
656 lll_cond_wake, lll_cond_broadcast): Remove.
657 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
658 kernel-features.h and lowlevellock.h.
659 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
660 (LOAD_FUTEX_WAIT): Define.
661 (__lll_robust_mutex_lock_wait): Rename to ...
662 (__lll_robust_lock_wait): ... this. Add private argument.
663 Use LOAD_FUTEX_WAIT macro.
664 (__lll_robust_mutex_timedlock_wait): Rename to ...
665 (__lll_robust_timedlock_wait): ... this. Add private argument.
666 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
667 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
669 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
670 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
671 __lll_mutex_{lock,unlock}_*.
672 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
673 lowlevellock.h and pthread-errnos.h.
674 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
675 FUTEX_CMP_REQUEUE, EINVAL): Remove.
676 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
677 __lll_mutex_{lock,unlock}_*.
678 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
679 lowlevellock.h and pthread-errnos.h.
680 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
681 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
682 __lll_mutex_{lock,unlock}_*.
683 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
685 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
686 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
687 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
688 (__condvar_tw_cleanup): Likewise.
689 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
691 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
692 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
693 __lll_mutex_{lock,unlock}_*.
694 ( __condvar_w_cleanup): Likewise.
695 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
696 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
697 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
699 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
700 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
701 __lll_mutex_{lock,unlock}_*.
702 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
704 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
705 FUTEX_PRIVATE_FLAG): Remove.
706 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
707 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
708 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
710 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
711 FUTEX_PRIVATE_FLAG): Remove.
712 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
713 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
714 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
716 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
717 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
718 __lll_mutex_{lock,unlock}_*.
719 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
721 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
722 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
723 __lll_mutex_{lock,unlock}_*.
724 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
725 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
726 (__new_sem_post): Use standard initial exec code sequences.
727 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
729 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
730 FUTEX_PRIVATE_FLAG): Remove.
731 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
733 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
734 (__new_sem_trywait): Use standard initial exec code sequences.
735 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
736 (__new_sem_wait): Use standard initial exec code sequences.
738 2007-07-31 Anton Blanchard <anton@samba.org>
740 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
741 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
744 2007-07-31 Jakub Jelinek <jakub@redhat.com>
746 * allocatestack.c (stack_cache_lock): Change type to int.
747 (get_cached_stack, allocate_stack, __deallocate_stack,
748 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
749 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
750 as second argument to lll_lock and lll_unlock macros on
752 * pthread_create.c (__find_in_stack_list): Likewise.
753 (start_thread): Similarly with pd->lock. Use lll_robust_dead
754 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
756 * descr.h (struct pthread): Change lock and setxid_futex field
758 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
759 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
760 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
761 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
763 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
764 * pthread_cond_init.c (__pthread_cond_init): Likewise.
765 * pthreadP.h (__attr_list_lock): Change type to int.
766 * pthread_attr_init.c (__attr_list_lock): Likewise.
767 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
768 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
770 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
771 also for lll_futex_{wake,wait}.
772 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
774 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
775 LLL_SHARED as second argument to lll_{,un}lock.
776 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
777 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
778 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
779 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
781 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
782 as second argument to lll_{,un}lock macros on pd->lock.
783 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
784 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
785 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
786 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
788 * sysdeps/pthread/createthread.c (do_clone, create_thread):
790 * pthread_once.c (once_lock): Change type to int.
791 (__pthread_once): Pass LLL_PRIVATE as second argument to
792 lll_{,un}lock macros on once_lock.
793 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
794 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
795 rwlock->__data.__shared as second argument to them and similarly
797 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
799 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
801 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
802 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
803 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
804 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
805 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
806 to lll_{,un}lock macros on __sem_mappings_lock.
807 * sem_open.c (check_add_mapping): Likewise.
808 (__sem_mappings_lock): Change type to int.
809 * semaphoreP.h (__sem_mappings_lock): Likewise.
810 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
811 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
812 instead of lll_*mutex_*, pass LLL_SHARED as last
814 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
815 pass LLL_SHARED as last argument.
816 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
817 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
818 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
819 pass LLL_SHARED as last argument.
820 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
821 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
822 LLL_SHARED as last argument.
823 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
824 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
826 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
827 __libc_lock_lock_recursive, __libc_lock_unlock,
828 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
829 argument to lll_{,un}lock.
830 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
831 _IO_lock_unlock): Likewise.
832 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
834 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
835 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
837 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
839 (__fork_lock): Change type to int.
840 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
841 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
842 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
844 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
845 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
846 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
848 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
849 pass it through to lll_futex_*wait, only compile in when
851 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
852 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
853 argument and pass it through to lll_futex_*wait.
854 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
855 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
856 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
857 inline functions to __lll_* resp. __lll_robust_*.
858 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
859 (lll_mutex_dead): Add private argument.
860 (__lll_lock_wait_private): New prototype.
861 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
862 __lll_robust_lock_timedwait): Add private argument to prototypes.
863 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
864 call __lll_lock_wait_private, otherwise pass private to
866 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
867 __lll_robust_timedlock): Add private argument, pass it to
868 __lll_*wait functions.
869 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
870 call __lll_unlock_wake_private, otherwise pass private to
872 (__lll_robust_unlock): Add private argument, pass it to
873 __lll_robust_unlock_wake.
874 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
875 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
876 argument, pass it through to __lll_* inline function.
877 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
878 (lll_lock_t): Remove.
879 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
880 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
881 lll_cond_wake, lll_cond_broadcast): Remove.
882 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
883 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
884 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
885 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
886 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
887 the header from assembler. Renamed all lll_mutex_* resp.
888 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
889 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
890 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
891 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
892 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
893 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
894 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
896 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
897 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
898 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
899 (lll_trylock): Likewise, use __lll_trylock_asm, pass
900 MULTIPLE_THREADS_OFFSET as another asm operand.
901 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
902 MULTIPLE_THREADS_OFFSET as last asm operand, call
903 __lll_lock_wait_private if private is constant LLL_PRIVATE,
904 otherwise pass private as another argument to __lll_lock_wait.
905 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
906 lll_timedlock, lll_robust_timedlock): Add private argument, pass
907 private as another argument to __lll_*lock_wait call.
908 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
909 MULTIPLE_THREADS_OFFSET as another asm operand, call
910 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
911 otherwise pass private as another argument to __lll_unlock_wake.
912 (lll_robust_unlock): Add private argument, pass private as another
913 argument to __lll_unlock_wake.
914 (lll_robust_dead): Add private argument, use __lll_private_flag
916 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
917 LLL_MUTEX_LOCK_INITIALIZER.
918 (lll_lock_t): Remove.
919 (LLL_LOCK_INITIALIZER_WAITERS): Define.
920 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
921 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
922 lll_cond_wake, lll_cond_broadcast): Remove.
923 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
924 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
925 2007-05-2{3,9} changes.
926 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
927 kernel-features.h and lowlevellock.h.
928 (LOAD_PRIVATE_FUTEX_WAIT): Define.
929 (LOAD_FUTEX_WAIT): Rewritten.
930 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
932 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
933 (__lll_mutex_lock_wait): Rename to ...
934 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
935 %ecx, %ecx is now private argument. Don't compile in for libc.so.
936 (__lll_mutex_timedlock_wait): Rename to ...
937 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
938 contains private argument. Don't compile in for libc.so.
939 (__lll_mutex_unlock_wake): Rename to ...
940 (__lll_unlock_wake): ... this. %ecx contains private argument.
941 Don't compile in for libc.so.
942 (__lll_timedwait_tid): Use __NR_gettimeofday.
943 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
944 kernel-features.h and lowlevellock.h.
945 (LOAD_FUTEX_WAIT): Define.
946 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
948 (__lll_robust_mutex_lock_wait): Rename to ...
949 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
950 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
952 (__lll_robust_mutex_timedlock_wait): Rename to ...
953 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
954 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
955 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
957 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
958 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
959 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
960 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
961 to __lll_lock_wait in %edx.
962 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
963 Include lowlevellock.h and pthread-errnos.h.
964 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
965 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
966 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
967 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
968 pass LLL_SHARED in %ecx to both __lll_lock_wait and
970 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
971 Include lowlevellock.h and pthread-errnos.h.
972 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
973 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
974 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
975 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
976 pass LLL_SHARED in %ecx to both __lll_lock_wait and
978 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
979 Include lowlevellock.h.
980 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
982 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
983 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
984 pass LLL_SHARED in %ecx to both __lll_lock_wait and
985 __lll_unlock_wake. Use __NR_gettimeofday.
986 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
987 Include lowlevellock.h.
988 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
989 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
990 to __lll_*, pass cond_lock address in %edx rather than %ecx to
991 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
992 and __lll_unlock_wake.
993 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
994 Include lowlevellock.h.
995 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
996 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
997 MUTEX(%ebx) address in %edx rather than %ecx to
998 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
999 and __lll_unlock_wake. Move return value from %ecx to %edx
1001 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1002 Include lowlevellock.h.
1003 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1005 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1006 MUTEX(%ebp) address in %edx rather than %ecx to
1007 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1008 and __lll_unlock_wake. Move return value from %ecx to %edx
1009 register. Use __NR_gettimeofday.
1010 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1011 Include lowlevellock.h.
1012 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1014 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1015 MUTEX(%ebp) address in %edx rather than %ecx to
1016 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1017 and __lll_unlock_wake. Move return value from %ecx to %edx
1018 register. Use __NR_gettimeofday.
1019 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1020 Include lowlevellock.h.
1021 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1022 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1023 MUTEX(%edi) address in %edx rather than %ecx to
1024 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1025 and __lll_unlock_wake.
1026 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1027 Include lowlevellock.h.
1028 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1029 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1030 MUTEX(%ebx) address in %edx rather than %ecx to
1031 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1032 and __lll_unlock_wake. Move return value from %ecx to %edx
1034 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1036 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1038 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1039 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1040 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1042 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1043 (sem_timedwait): Use __NR_gettimeofday.
1044 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1046 (LOCK): Don't define.
1047 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1049 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1050 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1052 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1053 2007-05-2{3,9} changes.
1054 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1055 kernel-features.h and lowlevellock.h.
1056 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1057 (LOAD_FUTEX_WAIT): Rewritten.
1058 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1059 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1060 (__lll_mutex_lock_wait): Rename to ...
1061 (__lll_lock_wait): ... this. %esi is now private argument.
1062 Don't compile in for libc.so.
1063 (__lll_mutex_timedlock_wait): Rename to ...
1064 (__lll_timedlock_wait): ... this. %esi contains private argument.
1065 Don't compile in for libc.so.
1066 (__lll_mutex_unlock_wake): Rename to ...
1067 (__lll_unlock_wake): ... this. %esi contains private argument.
1068 Don't compile in for libc.so.
1069 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1070 kernel-features.h and lowlevellock.h.
1071 (LOAD_FUTEX_WAIT): Define.
1072 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1073 (__lll_robust_mutex_lock_wait): Rename to ...
1074 (__lll_robust_lock_wait): ... this. %esi argument contains private.
1075 Use LOAD_FUTEX_WAIT macro.
1076 (__lll_robust_mutex_timedlock_wait): Rename to ...
1077 (__lll_robust_timedlock_wait): ... this. %esi argument contains
1078 private, use LOAD_FUTEX_WAIT macro.
1079 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1081 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1082 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1083 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1084 __lll_lock_wait and __lll_unlock_wake.
1085 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1086 Include lowlevellock.h and pthread-errnos.h.
1087 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1088 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1089 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1090 pass LLL_SHARED in %esi to both __lll_lock_wait and
1092 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1093 Include lowlevellock.h and pthread-errnos.h.
1094 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1095 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1096 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1097 pass LLL_SHARED in %esi to both __lll_lock_wait and
1099 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1100 Include lowlevellock.h.
1101 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1102 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1103 pass LLL_SHARED in %esi to both __lll_lock_wait and
1105 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1106 Include lowlevellock.h.
1107 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1108 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1109 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1110 and __lll_unlock_wake.
1111 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1112 Include lowlevellock.h.
1113 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1115 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1116 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1117 and __lll_unlock_wake.
1118 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1119 Include lowlevellock.h.
1120 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1122 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1123 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1124 and __lll_unlock_wake.
1125 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1126 Include lowlevellock.h.
1127 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1129 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1130 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1131 and __lll_unlock_wake.
1132 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1133 Include lowlevellock.h.
1134 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1136 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1137 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1138 and __lll_unlock_wake.
1139 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1140 Include lowlevellock.h.
1141 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1143 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1144 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1145 and __lll_unlock_wake.
1146 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1148 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1150 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1151 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1152 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1154 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1155 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1157 (LOCK): Don't define.
1158 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1160 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1161 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1162 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1163 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1164 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1165 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1166 (__lll_lock_wait_private): New function.
1167 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1168 it to lll_futex_*wait. Don't compile in for libc.so.
1169 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1171 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1172 (struct sparc_pthread_barrier): Remove.
1173 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1174 struct sparc_pthread_barrier. Pass
1175 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1176 and lll_futex_wait macros.
1177 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1179 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1180 Include sparc pthread_barrier_wait.c instead of generic one.
1182 2007-07-30 Jakub Jelinek <jakub@redhat.com>
1184 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1186 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1187 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1189 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1190 (pthread_rwlock_timedwrlock): Likewise.
1191 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1192 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1194 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1196 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1198 2007-07-26 Jakub Jelinek <jakub@redhat.com>
1200 * tst-locale2.c (useless): Add return statement.
1202 2007-07-24 Jakub Jelinek <jakub@redhat.com>
1204 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1205 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1206 * pthread_create.c (start_thread): Likewise.
1207 * init.c (sighandler_setxid): Likewise.
1208 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1209 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1210 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1211 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1212 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1213 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1214 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1215 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1216 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1218 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1220 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1222 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1223 __rtld_notify): Likewise.
1224 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1225 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1226 __pthread_once): Likewise.
1227 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1228 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1229 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1230 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1231 (lll_futex_wait): Add private argument, define as wrapper around
1232 lll_futex_timed_wait.
1233 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1234 use __lll_private_flag macro.
1235 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1236 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1237 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1238 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1239 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1240 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1241 (lll_futex_wait): Add private argument, define as wrapper around
1242 lll_futex_timed_wait.
1243 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1244 use __lll_private_flag macro.
1245 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1246 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1247 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1249 (lll_futex_timed_wait, lll_futex_wake): Use it.
1250 (lll_private_futex_wait, lll_private_futex_timed_wait,
1251 lll_private_futex_wake): Removed.
1252 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1253 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1254 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1255 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1256 (lll_futex_wait): Add private argument, define as wrapper around
1257 lll_futex_timed_wait.
1258 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1259 use __lll_private_flag macro.
1260 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1261 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1263 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1264 (lll_private_futex_wait, lll_private_futex_timed_wait,
1265 lll_private_futex_wake): Removed.
1266 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1267 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1268 (lll_private_futex_wait, lll_private_futex_timed_wait,
1269 lll_private_futex_wake): Removed.
1270 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1271 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1272 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1273 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1274 (lll_futex_wait): Add private argument, define as wrapper around
1275 lll_futex_timed_wait.
1276 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1277 use __lll_private_flag macro.
1278 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1279 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1281 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1283 (lll_futex_timed_wait, lll_futex_wake): Use it.
1284 (lll_private_futex_wait, lll_private_futex_timed_wait,
1285 lll_private_futex_wake): Removed.
1287 2007-07-27 Jakub Jelinek <jakub@redhat.com>
1289 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1290 of the structure for sparc32.
1292 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
1294 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1296 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1298 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1299 code used when private futexes are assumed.
1300 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1303 2007-07-23 Jakub Jelinek <jakub@redhat.com>
1305 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1306 (__lll_private_flag): Define.
1307 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1308 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1310 (lll_private_futex_wait, lll_private_futex_timedwait,
1311 lll_private_futex_wake): Define as wrapper around non-_private
1313 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1314 (__lll_private_flag): Define.
1315 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1316 (lll_private_futex_wait, lll_private_futex_timedwait,
1317 lll_private_futex_wake): Define as wrapper around non-_private
1320 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
1322 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1323 parameter to lll_futex_wait call.
1324 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1326 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1327 Replace lll_futex_wait with lll_private_futex_wait.
1328 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1329 Add LLL_SHARED parameter to lll_futex_wake().
1331 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1332 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1333 lll_private_futex_wake.
1334 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1335 bit from private parm before syscall.
1336 (lll_futex_timed_wait): Likewise.
1337 (lll_futex_wake): Likewise.
1338 (lll_futex_wake_unlock): Likewise.
1339 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1340 (lll_robust_mutex_unlock): Likewise.
1341 (lll_mutex_unlock_force): Likewise.
1342 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1344 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1346 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1347 compilation when unconditionally using private futexes.
1348 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1349 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1351 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1352 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1354 2007-07-17 Jakub Jelinek <jakub@redhat.com>
1356 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1359 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1361 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1364 2007-05-16 Roland McGrath <roland@redhat.com>
1366 * init.c (__nptl_initial_report_events): New variable.
1367 (__pthread_initialize_minimal_internal): Initialize pd->report_events
1370 2007-06-22 Jakub Jelinek <jakub@redhat.com>
1372 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1373 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1375 2007-06-19 Ulrich Drepper <drepper@redhat.com>
1377 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1380 2007-06-18 Ulrich Drepper <drepper@redhat.com>
1382 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1383 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1384 * pthread_mutex_timedlock.c: Likewise.
1385 * pthread_mutex_trylock.c: Likewise.
1386 * pthread_mutex_unlock.c: Likewise.
1388 2007-06-17 Andreas Schwab <schwab@suse.de>
1390 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1393 2007-06-17 Ulrich Drepper <drepper@redhat.com>
1395 * allocatestack.c (allocate_stack): Make code compile if
1396 __ASSUME_PRIVATE_FUTEX is set.
1398 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1400 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1401 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1402 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1403 (__pthread_rwlock_wrlock): Likewise.
1404 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1405 (pthread_rwlock_timedrdlock): Likewise.
1406 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1407 (pthread_rwlock_timedwrlock): Likewise.
1408 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1409 (__pthread_rwlock_unlock): Likewise.
1411 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1413 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1414 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1415 Split __flags into __flags, __shared, __pad1 and __pad2.
1416 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1417 futexes if they are available.
1418 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1419 in libc-lowlevellock.S allow using private futexes.
1420 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1421 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
1422 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
1423 to call lll_futex_timed_wait. Add lll_private_futex_wait,
1424 lll_private_futex_timed_wait and lll_private_futex_wake.
1425 (lll_robust_mutex_unlock): Fix typo.
1426 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1427 field in futex command setup.
1428 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1429 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1430 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1431 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1432 if they are available. Remove clear_once_control.
1433 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1434 futexes if they are available.
1435 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1436 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1437 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1438 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1439 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1440 Wake only when there are waiters.
1441 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1442 support. Indicate that there are waiters. Remove unnecessary
1443 extra cancellation test.
1444 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
1445 left-over duplication of __sem_wait_cleanup.
1447 2007-06-07 Ulrich Drepper <drepper@redhat.com>
1449 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1450 parameter to lll_futex_wait, lll_futex_timed_wait, and
1451 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
1452 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1453 lll_private_futex_wake.
1454 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1455 * allocatestack.c: Adjust use of lll_futex_* macros.
1457 * lowlevellock.h: Likewise.
1458 * pthread_barrier_wait.c: Likewise.
1459 * pthread_cond_broadcast.c: Likewise.
1460 * pthread_cond_destroy.c: Likewise.
1461 * pthread_cond_signal.c: Likewise.
1462 * pthread_cond_timedwait.c: Likewise.
1463 * pthread_cond_wait.c: Likewise.
1464 * pthread_create.c: Likewise.
1465 * pthread_mutex_lock.c: Likewise.
1466 * pthread_mutex_setprioceiling.c: Likewise.
1467 * pthread_mutex_timedlock.c: Likewise.
1468 * pthread_mutex_unlock.c: Likewise.
1469 * pthread_rwlock_timedrdlock.c: Likewise.
1470 * pthread_rwlock_timedwrlock.c: Likewise.
1471 * pthread_rwlock_unlock.c: Likewise.
1472 * sysdeps/alpha/tls.h: Likewise.
1473 * sysdeps/i386/tls.h: Likewise.
1474 * sysdeps/ia64/tls.h: Likewise.
1475 * sysdeps/powerpc/tls.h: Likewise.
1476 * sysdeps/pthread/aio_misc.h: Likewise.
1477 * sysdeps/pthread/gai_misc.h: Likewise.
1478 * sysdeps/s390/tls.h: Likewise.
1479 * sysdeps/sh/tls.h: Likewise.
1480 * sysdeps/sparc/tls.h: Likewise.
1481 * sysdeps/unix/sysv/linux/fork.c: Likewise.
1482 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1483 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1484 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1485 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1486 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1487 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1488 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1489 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1490 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1492 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1493 * sysdeps/x86_64/tls.h: Likewise.
1495 2007-05-29 Ulrich Drepper <drepper@redhat.com>
1497 * pthread_getattr_np.c: No need to install a cancellation handler,
1498 this is no cancellation point.
1499 * pthread_getschedparam.c: Likewise.
1500 * pthread_setschedparam.c: Likewise.
1501 * pthread_setschedprio.c: Likewise.
1502 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1504 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1505 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1506 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1507 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1508 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1509 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1510 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1511 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1512 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1513 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1514 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1515 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1517 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1518 whether there are more than one thread makes no sense here since
1519 we only call the slow path if the locks are taken.
1520 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1522 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1523 COND_NWAITERS_SHIFT.
1524 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1526 * pthread_cond_init.c: Likewise.
1527 * pthread_cond_timedwait.c: Likewise.
1528 * pthread_cond_wait.c: Likewise.
1529 * pthread_condattr_getclock.c: Likewise.
1530 * pthread_condattr_setclock.c: Likewise.
1531 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1532 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1533 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1534 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1535 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1537 2007-05-28 Jakub Jelinek <jakub@redhat.com>
1539 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1542 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1544 (THREAD_GSCOPE_GET_FLAG): Remove.
1545 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1546 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1548 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1549 (THREAD_GSCOPE_GET_FLAG): Remove.
1550 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1551 instead of THREAD_GSCOPE_GET_FLAG.
1552 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
1554 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1555 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1556 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1557 THREAD_GSCOPE_WAIT): Define.
1558 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1559 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1560 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1561 THREAD_GSCOPE_WAIT): Define.
1562 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1563 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1564 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1565 THREAD_GSCOPE_WAIT): Define.
1566 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1567 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1568 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1569 THREAD_GSCOPE_WAIT): Define.
1571 2007-05-24 Richard Henderson <rth@redhat.com>
1573 * descr.h (struct pthread): Add header.gscope_flag.
1574 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1575 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1576 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1577 THREAD_GSCOPE_WAIT): Define.
1579 2007-05-27 Ulrich Drepper <drepper@redhat.com>
1581 * init.c: Make it compile with older kernel headers.
1583 * tst-initializers1.c: Show through exit code which test failed.
1585 * pthread_rwlock_init.c: Also initialize __shared field.
1586 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1587 element in rwlock structure into four byte elements. One of them is
1588 the new __shared element.
1589 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1591 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1592 __shared, adjust names of other padding elements.
1593 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1594 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1595 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1596 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1598 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1599 futex to use private operations if possible.
1600 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1602 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1604 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1605 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1606 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1607 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1609 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1611 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1612 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1614 2007-05-26 Ulrich Drepper <drepper@redhat.com>
1616 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1617 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1618 * pthread_rwlock_timedrdlock.c: Likewise.
1619 * pthread_rwlock_tryrdlock.c: Likewise.
1621 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1624 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1625 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1626 duplication of __sem_wait_cleanup.
1628 * allocatestack.c: Revert last change.
1630 * sysdeps/i386/tls.h: Likewise.
1631 * sysdeps/x86_64/tls.h: Likewise.
1632 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1634 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1636 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1638 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1639 * pthread_barrier_init.c: Set private flag if pshared and private
1640 futexes are supported.
1641 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1642 private field in futex command setup.
1643 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1645 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1647 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1649 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1650 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1651 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1652 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1653 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1655 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1656 * sem_init.c (__new_sem_init): Rewrite to initialize all three
1657 fields in the structure.
1658 (__old_sem_init): New function.
1659 * sem_open.c: Initialize all fields of the structure.
1660 * sem_getvalue.c: Adjust for renamed element.
1661 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1662 (gen-as-const-headers): Add structsem.sym.
1663 * sysdeps/unix/sysv/linux/structsem.sym: New file.
1664 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1665 struct new_sem. Add struct old_sem.
1666 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1667 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1668 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1669 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1670 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1671 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1672 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1673 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1674 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1675 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1676 * tst-sem10.c: New file.
1677 * tst-sem11.c: New file.
1678 * tst-sem12.c: New file.
1679 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1682 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1683 Jakub Jelinek <jakub@redhat.com>
1685 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1686 Move __pthread_enable_asynccancel right before futex syscall.
1687 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1690 2007-05-24 Jakub Jelinek <jakub@redhat.com>
1692 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1693 THREAD_COPY_PRIVATE_FUTEX): Define.
1694 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1695 THREAD_COPY_PRIVATE_FUTEX): Define.
1696 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1697 * init.c (__pthread_initialize_minimal_internal): Use
1698 THREAD_SET_PRIVATE_FUTEX.
1700 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1701 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1702 THREAD_GSCOPE_FLAG_WAIT): Define.
1703 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1704 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1705 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1707 (THREAD_GSCOPE_GET_FLAG): Define.
1708 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1709 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1710 instead of ->header.gscope_flag directly.
1712 2007-05-23 Ulrich Drepper <drepper@redhat.com>
1714 * init.c (__pthread_initialize_minimal_internal): Check whether
1715 private futexes are available.
1716 * allocatestack.c (allocate_stack): Copy private_futex field from
1717 current thread into the new stack.
1718 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1719 futexes if they are available.
1720 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1721 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1722 in libc-lowlevellock.S allow using private futexes.
1723 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1724 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1726 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1727 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1728 if they are available.
1729 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1730 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1731 * sysdeps/i386/tcb-offsets.sym: Likewise.
1732 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1733 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1735 2007-05-21 Ulrich Drepper <drepper@redhat.com>
1737 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1738 Remove ptr_wait_lookup_done again.
1739 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1740 (__pthread_initialize_minimal_internal): Initialize
1741 _dl_wait_lookup_done pointer in _rtld_global directly.
1742 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1743 Remove code to code _dl_wait_lookup_done.
1744 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1747 2007-05-21 Jakub Jelinek <jakub@redhat.com>
1749 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1750 pthread_mutex_init failed with ENOTSUP.
1752 2007-05-19 Ulrich Drepper <drepper@redhat.com>
1754 * allocatestack.c (__wait_lookup_done): New function.
1755 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1756 Add ptr_wait_lookup_done.
1757 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1758 * pthreadP.h: Declare __wait_lookup_done.
1759 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1760 Define macros to implement reference handling of global scope.
1761 * sysdeps/x86_64/tls.h: Likewise.
1762 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1763 Initialize GL(dl_wait_lookup_done).
1765 2007-05-17 Ulrich Drepper <drepper@redhat.com>
1768 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1770 * pthread_mutex_timedlock.c: Likewise.
1771 * pthread_mutex_trylock.c: Likewise.
1772 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1774 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1775 * tst-robust9.c: New file.
1776 * tst-robustpi9.c: New file.
1778 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1779 unnecessary extra cancellation test.
1781 2007-05-14 Ulrich Drepper <drepper@redhat.com>
1783 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1784 extra cancellation test.
1785 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1787 2007-05-10 Ulrich Drepper <drepper@redhat.com>
1789 * descr.h (struct pthread): Rearrange members to fill hole in
1792 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1793 (__pthread_setaffinity_new): If syscall was successful and
1794 RESET_VGETCPU_CACHE is defined, use it before returning.
1795 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1797 2007-05-10 Jakub Jelinek <jakub@redhat.com>
1800 * tst-align2.c: Include stackinfo.h.
1801 * tst-getpid1.c: Likewise.
1803 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
1806 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1807 * tst-getpid1.c (do_test): Likewise.
1810 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1811 (allocate_stack): Likewise.
1813 2007-05-07 Ulrich Drepper <drepper@redhat.com>
1815 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1816 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1817 (__lll_robust_timedlock_wait): Likewise.
1818 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1820 2007-05-06 Mike Frysinger <vapier@gentoo.org>
1823 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1824 * tst-cancel4.c (tf_fdatasync): New test.
1826 2007-04-27 Ulrich Drepper <drepper@redhat.com>
1829 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1830 check mutexes like normal mutexes.
1833 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1834 Initialize the whole sigevent structure to appease valgrind.
1836 2007-04-25 Ulrich Drepper <drepper@redhat.com>
1838 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1839 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1841 2007-04-06 Ulrich Drepper <drepper@redhat.com>
1843 * tst-locale1.c: Avoid warnings.
1844 * tst-locale2.c: Likewise.
1846 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
1848 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1849 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1851 2007-03-16 Jakub Jelinek <jakub@redhat.com>
1853 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1854 __extern_always_inline where appropriate.
1855 * sysdeps/pthread/pthread.h: Likewise.
1857 2007-03-13 Richard Henderson <rth@redhat.com>
1859 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1860 separate cfi regions for the two subsections.
1862 2007-02-25 Ulrich Drepper <drepper@redhat.com>
1864 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1865 new thread, don't just decrement it.
1866 Patch by Suzuki K P <suzuki@in.ibm.com>.
1868 2007-02-21 Ulrich Drepper <drepper@redhat.com>
1870 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1871 PTHFCT_CALL definition.
1873 2007-02-18 Ulrich Drepper <drepper@redhat.com>
1875 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1876 available, don't use it.
1878 2007-02-09 Jakub Jelinek <jakub@redhat.com>
1880 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1881 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1882 call into the kernel to delay.
1884 2007-01-18 Ulrich Drepper <drepper@redhat.com>
1886 * tst-initializers1.c: We want to test the initializers as seen
1887 outside of libc, so undefined _LIBC.
1889 * pthread_join.c (cleanup): Avoid warning.
1891 2007-01-17 Ulrich Drepper <drepper@redhat.com>
1893 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1894 (__lll_timedwait_tid): Add unwind info.
1896 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1897 function table, mangle the pointers.
1898 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1899 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1900 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1901 demangle pointers before use.
1902 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1904 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1905 * sysdeps/pthread/setxid.h: Likewise.
1907 2007-01-12 Ulrich Drepper <drepper@redhat.com>
1909 * tst-rwlock7.c: Show some more information in case of correct
1912 2007-01-11 Ulrich Drepper <drepper@redhat.com>
1914 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1915 (lll_futex_timed_wait): Undo part of last change, don't negate
1918 2007-01-10 Ulrich Drepper <drepper@redhat.com>
1920 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
1921 FUTEX_CMP_REQUEUE and lll_futex_requeue.
1923 2006-12-28 David S. Miller <davem@davemloft.net>
1925 * shlib-versions: Fix sparc64 linux target specification.
1927 2007-01-10 Jakub Jelinek <jakub@redhat.com>
1929 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1930 Adjust include path for pthread_barrier_wait.c move.
1932 2006-12-21 Jakub Jelinek <jakub@redhat.com>
1934 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1935 tid isn't reread from pd->tid in between ESRCH test and the syscall.
1937 2006-12-06 Jakub Jelinek <jakub@redhat.com>
1939 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1940 6 argument cancellable syscalls.
1941 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1942 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1943 6 argument cancellable syscalls.
1944 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1946 2006-12-09 Ulrich Drepper <drepper@redhat.com>
1948 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1949 (__rtld_mrlock_initialize): Add missing closing parenthesis.
1951 2006-10-30 Jakub Jelinek <jakub@redhat.com>
1953 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1954 __sync_lock_release instead of __sync_lock_release_si.
1956 2006-10-29 Jakub Jelinek <jakub@redhat.com>
1958 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1960 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1961 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1962 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1963 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1964 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1965 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1966 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1967 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1968 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1969 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1970 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1972 2006-10-27 Ulrich Drepper <drepper@redhat.com>
1974 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1975 * pthread_barrier_wait.c: ...here.
1976 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1977 * pthread_cond_broadcast.c: ...here.
1978 * sysdeps/pthread/pthread_cond_signal.c: Move to...
1979 * pthread_cond_signal.c: ...here.
1980 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1981 * pthread_cond_timedwait.c: ...here.
1982 * sysdeps/pthread/pthread_cond_wait.c: Move to...
1983 * pthread_cond_wait.c: ...here.
1984 * sysdeps/pthread/pthread_once.c: Move to...
1985 * pthread_once.c: ...here.
1986 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1987 * pthread_rwlock_rdlock.c: ...here.
1988 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1989 * pthread_rwlock_timedrdlock.c: ...here.
1990 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1991 * pthread_rwlock_timedwrlock.c: ...here.
1992 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1993 * pthread_rwlock_unlock.c: ...here.
1994 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1995 * pthread_rwlock_wrlock.c: ...here.
1996 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1997 * pthread_spin_destroy.c: ...here.
1998 * sysdeps/pthread/pthread_spin_init.c: Move to...
1999 * pthread_spin_init.c: ...here.
2000 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2001 * pthread_spin_unlock.c: ...here.
2002 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2003 * pthread_getcpuclockid.c: ...here.
2005 * init.c: USE_TLS support is now always enabled.
2006 * tst-tls5.h: Likewise.
2007 * sysdeps/alpha/tls.h: Likewise.
2008 * sysdeps/i386/tls.h: Likewise.
2009 * sysdeps/ia64/tls.h: Likewise.
2010 * sysdeps/powerpc/tls.h: Likewise.
2011 * sysdeps/s390/tls.h: Likewise.
2012 * sysdeps/sh/tls.h: Likewise.
2013 * sysdeps/sparc/tls.h: Likewise.
2014 * sysdeps/x86_64/tls.h: Likewise.
2016 2006-10-27 Jakub Jelinek <jakub@redhat.com>
2018 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2019 __rtld_mrlock_change): Update oldval if atomic compare and exchange
2022 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2023 Define to THREAD_SELF->header.multiple_threads.
2024 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2026 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2028 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2029 (SINGLE_THREAD_P): Likewise.
2030 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2031 (SINGLE_THREAD_P): Likewise.
2032 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2033 (SINGLE_THREAD_P): Likewise.
2034 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2035 (SINGLE_THREAD_P): Likewise.
2036 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2038 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2039 (SINGLE_THREAD_P): Likewise.
2040 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2041 (SINGLE_THREAD_P): Likewise.
2042 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2045 2006-10-26 Jakub Jelinek <jakub@redhat.com>
2047 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2048 by default rather than 2_3_3.
2050 2006-10-17 Jakub Jelinek <jakub@redhat.com>
2052 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2053 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2054 atomic_* instead of catomic_* macros.
2056 2006-10-12 Ulrich Drepper <drepper@redhat.com>
2059 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2060 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2061 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2062 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2063 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2064 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2065 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2066 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2067 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2068 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2069 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2070 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2071 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2073 2006-10-11 Ulrich Drepper <drepper@redhat.com>
2075 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2076 cancelable syscalls with six parameters.
2078 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2079 operations instead of atomic_*.
2081 2006-10-09 Ulrich Drepper <drepper@redhat.com>
2083 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2085 2006-10-07 Ulrich Drepper <drepper@redhat.com>
2087 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2088 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2089 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2091 * pthread_attr_setstack.c: Allow overwriting the version number of the
2093 * pthread_attr_setstacksize.c: Likewise.
2094 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2096 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2097 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2099 2006-09-24 Ulrich Drepper <drepper@redhat.com>
2102 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2103 Patch by Petr Baudis.
2105 2006-09-18 Jakub Jelinek <jakub@redhat.com>
2107 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2109 * tst-cancel2.c (tf): Loop as long as something was written.
2111 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2113 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2114 mutexes wake all mutexes.
2115 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2116 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2117 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2119 2006-09-12 Ulrich Drepper <drepper@redhat.com>
2121 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2122 to guarantee the thread is always canceled.
2124 2006-09-08 Jakub Jelinek <jakub@redhat.com>
2126 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2128 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2129 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
2130 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2131 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2132 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2134 2006-09-08 Ulrich Drepper <drepper@redhat.com>
2137 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2138 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2139 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2140 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2141 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2142 * Makefile (tests): Add tst-cond22.
2143 * tst-cond22.c: New file.
2145 2006-09-05 Ulrich Drepper <drepper@redhat.com>
2148 * descr.h (struct pthread): Add parent_cancelhandling.
2149 * sysdeps/pthread/createthread.c (create_thread): Pass parent
2150 cancelhandling value to child.
2151 * pthread_create.c (start_thread): If parent thread was canceled
2152 reset the SIGCANCEL mask.
2153 * Makefile (tests): Add tst-cancel25.
2154 * tst-cancel25.c: New file.
2156 2006-09-05 Jakub Jelinek <jakub@redhat.com>
2157 Ulrich Drepper <drepper@redhat.com>
2159 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2160 counterp if it is already zero.
2161 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2163 2006-03-04 Jakub Jelinek <jakub@redhat.com>
2164 Roland McGrath <roland@redhat.com>
2166 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2167 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2168 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2169 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2170 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2171 lll_robust_mutex_timedlock, lll_mutex_unlock,
2172 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2173 Add _L_*_ symbols around the subsection.
2174 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2175 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2177 2006-03-03 Jakub Jelinek <jakub@redhat.com>
2178 Roland McGrath <roland@redhat.com>
2180 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2181 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2182 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2183 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2184 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2185 lll_robust_mutex_timedlock, lll_mutex_unlock,
2186 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2187 Add _L_*_ symbols around the subsection.
2188 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2189 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2191 2006-08-31 Ulrich Drepper <drepper@redhat.com>
2193 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2194 change because it can disturb too much existing code. If real hard
2195 reader preference is needed we'll introduce another type.
2196 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2197 (pthread_rwlock_timedwrlock): Likewise.
2198 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2201 2006-08-30 Ulrich Drepper <drepper@redhat.com>
2203 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2205 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2206 (pthread_rwlock_timedwrlock): Likewise.
2207 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2210 2006-08-25 Jakub Jelinek <jakub@redhat.com>
2212 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2213 Only define ifdef SHARED.
2215 2006-08-23 Ulrich Drepper <drepper@redhat.com>
2217 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2218 (free_stacks): ...here.
2219 (__free_stack_cache): New function.
2220 * pthreadP.h: Declare __free_stack_cache.
2221 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2223 * init.c (pthread_functions): Initialize ptr_freeres.
2224 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2225 New freeres function.
2227 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
2230 * Makefile (extra-objs): Add modules to extra-test-objs instead.
2232 2006-08-20 Ulrich Drepper <drepper@redhat.com>
2234 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2235 _XOPEN_REALTIME_THREADS.
2237 2006-08-15 Jakub Jelinek <jakub@redhat.com>
2239 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2240 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2241 HAVE_CLOCK_GETTIME_VSYSCALL.
2242 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2244 2006-08-14 Jakub Jelinek <jakub@redhat.com>
2246 * sysdeps/unix/sysv/linux/bits/posix_opt.h
2247 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2248 * descr.h (struct priority_protection_data): New type.
2249 (struct pthread): Add tpp field.
2250 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2251 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2252 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2253 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2255 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2256 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2257 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2258 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2260 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2262 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2263 * pthread_mutexattr_getprioceiling.c
2264 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2265 in the SCHED_FIFO priority range.
2266 * pthread_mutexattr_setprioceiling.c
2267 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2268 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2269 if mutex is not TPP. Ceiling is now in __data.__lock.
2270 * pthread_mutex_setprioceiling.c: Include stdbool.h.
2271 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
2272 is now in __data.__lock. Add locking.
2273 * pthread_create.c (__free_tcb): Free pd->tpp structure.
2274 * Makefile (libpthread-routines): Add tpp.
2275 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2276 * tst-tpp.h: New file.
2277 * tst-mutexpp1.c: New file.
2278 * tst-mutexpp6.c: New file.
2279 * tst-mutexpp10.c: New file.
2280 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2281 * tst-mutex6.c (TEST_FUNCTION): Likewise.
2283 2006-08-12 Ulrich Drepper <drepper@redhat.com>
2286 * pthread_join.c (pthread_join): Account for self being canceled
2287 when checking for deadlocks.
2288 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
2289 (tf1): Don't print anything after pthread_join returns, this would be
2290 another cancellation point.
2292 * tst-join6.c: New file.
2293 * Makefile (tests): Add tst-join6.
2295 2006-08-03 Ulrich Drepper <drepper@redhat.com>
2298 * pthread_setspecific.c (__pthread_setspecific): Check
2299 out-of-range index before checking for unused key.
2301 * sysdeps/pthread/gai_misc.h: New file.
2303 2006-08-01 Ulrich Drepper <drepper@redhat.com>
2305 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
2306 file. Don't use sysctl.
2307 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
2308 overwrite the file if this is likely not true.
2310 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
2312 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2313 * Makefile (tests): Add tst-getpid3.
2314 * tst-getpid3.c: New file.
2316 2006-07-30 Roland McGrath <roland@redhat.com>
2318 * Makefile (libpthread-routines): Add ptw-sigsuspend.
2320 * sysdeps/unix/sysv/linux/i386/not-cancel.h
2321 (pause_not_cancel): New macro.
2322 (nanosleep_not_cancel): New macro.
2323 (sigsuspend_not_cancel): New macro.
2324 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2325 nanosleep_not_cancel macro from <not-cancel.h>.
2326 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2327 macro from <not-cancel.h>.
2329 2006-07-28 Ulrich Drepper <drepper@redhat.com>
2330 Jakub Jelinek <jakub@redhat.com>
2332 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2333 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
2334 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2335 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2336 * pthread_mutex_init.c: Add support for priority inheritance mutex.
2337 * pthread_mutex_lock.c: Likewise.
2338 * pthread_mutex_timedlock.c: Likewise.
2339 * pthread_mutex_trylock.c: Likewise.
2340 * pthread_mutex_unlock.c: Likewise.
2341 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2343 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2344 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2345 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2346 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2347 pthread-pi-defines.sym.
2348 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2349 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2350 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2351 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2352 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2353 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2354 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2355 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2356 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2357 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2358 _POSIX_THREAD_PRIO_INHERIT to 200112L.
2359 * tst-mutex1.c: Adjust to allow use in PI mutex test.
2360 * tst-mutex2.c: Likewise.
2361 * tst-mutex3.c: Likewise.
2362 * tst-mutex4.c: Likewise.
2363 * tst-mutex5.c: Likewise.
2364 * tst-mutex6.c: Likewise.
2365 * tst-mutex7.c: Likewise.
2366 * tst-mutex7a.c: Likewise.
2367 * tst-mutex8.c: Likewise.
2368 * tst-mutex9.c: Likewise.
2369 * tst-robust1.c: Likewise.
2370 * tst-robust7.c: Likewise.
2371 * tst-robust8.c: Likewise.
2372 * tst-mutexpi1.c: New file.
2373 * tst-mutexpi2.c: New file.
2374 * tst-mutexpi3.c: New file.
2375 * tst-mutexpi4.c: New file.
2376 * tst-mutexpi5.c: New file.
2377 * tst-mutexpi6.c: New file.
2378 * tst-mutexpi7.c: New file.
2379 * tst-mutexpi7a.c: New file.
2380 * tst-mutexpi8.c: New file.
2381 * tst-mutexpi9.c: New file.
2382 * tst-robust1.c: New file.
2383 * tst-robust2.c: New file.
2384 * tst-robust3.c: New file.
2385 * tst-robust4.c: New file.
2386 * tst-robust5.c: New file.
2387 * tst-robust6.c: New file.
2388 * tst-robust7.c: New file.
2389 * tst-robust8.c: New file.
2390 * Makefile (tests): Add the new tests.
2392 * pthread_create.c (start_thread): Add some casts to avoid warnings.
2393 * pthread_mutex_destroy.c: Remove unneeded label.
2395 2006-07-01 Ulrich Drepper <drepper@redhat.com>
2397 * pthread_mutex_init.c (__pthread_mutex_init): Move some
2398 computations to compile time.
2400 2006-06-04 Ulrich Drepper <drepper@redhat.com>
2402 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2404 2006-05-15 Ulrich Drepper <drepper@redhat.com>
2406 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2408 2006-05-11 Ulrich Drepper <drepper@redhat.com>
2410 * pthread_key_create.c (__pthread_key_create): Do away with
2411 __pthread_keys_lock.
2413 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2414 (__kernel_cpumask_size): Mark as hidden.
2415 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2417 * sem_open.c (__sem_mappings_lock): Mark as hidden.
2418 * semaphoreP.h (__sem_mappings_lock): Likewise.
2420 2006-05-10 Ulrich Drepper <drepper@redhat.com>
2422 * pthread_atfork.c: Mark __dso_handle as hidden.
2424 2006-05-09 Ulrich Drepper <drepper@redhat.com>
2427 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2428 the reload problem. Change the one path in pthread_cancel_init
2429 which causes the problem. Force gcc to reload. Simplify callers.
2430 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2431 (_Unwind_GetBSP): Undo last patch.
2433 2006-05-07 Ulrich Drepper <drepper@redhat.com>
2435 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2436 function pointer is reloaded after pthread_cancel_init calls.
2439 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2440 pointers are reloaded after pthread_cancel_init calls.
2442 2006-05-01 Ulrich Drepper <drepper@redhat.com>
2444 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2447 2006-04-27 Ulrich Drepper <drepper@redhat.com>
2449 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2450 Allocate new object which is passed to timer_sigev_thread so that
2451 the timer can be deleted before the new thread is scheduled.
2453 2006-04-26 Roland McGrath <roland@redhat.com>
2455 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2457 2006-04-08 Ulrich Drepper <drepper@redhat.com>
2459 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2460 suffix for conditional jumps.
2461 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2462 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2463 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2464 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2465 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2466 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2468 * init.c (sigcancel_handler): Compare with correct PID even if the
2469 thread is in the middle of a fork call.
2470 (sighandler_setxid): Likewise.
2471 Reported by Suzuki K P <suzuki@in.ibm.com> .
2473 2006-04-07 Jakub Jelinek <jakub@redhat.com>
2475 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2477 2006-04-06 Ulrich Drepper <drepper@redhat.com>
2479 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2480 fails [Coverity CID 105].
2482 2006-04-05 Ulrich Drepper <drepper@redhat.com>
2484 * sysdeps/pthread/pthread.h: Add nonnull attributes.
2486 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
2489 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2490 Define __lll_rel_instr using lwsync.
2492 2006-03-27 Ulrich Drepper <drepper@redhat.com>
2494 * allocatestack.c (allocate_stack): Always initialize robust_head.
2495 * descr.h: Define struct robust_list_head.
2496 (struct pthread): Use robust_list_head in robust mutex list definition.
2497 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2498 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2499 (__pthread_initialize_minimal_internal): Register robust_list with
2501 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2502 Declare __set_robust_list_avail.
2503 * pthread_create.c (start_thread): Register robust_list of new thread.
2504 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2506 * pthread_mutex_destroy.c: For robust mutexes don't look at the
2507 number of users, it's unreliable.
2508 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2509 set_robust_list syscall is available.
2510 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2511 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2512 Set robust_head.list_op_pending before trying to lock a robust mutex.
2513 * pthread_mutex_timedlock.c: Likewise.
2514 * pthread_mutex_trylock.c: Likewise.
2515 * pthread_mutex_unlock.c: Likewise for unlocking.
2516 * Makefile (tests): Add tst-robust8.
2517 * tst-robust8.c: New file.
2519 2006-03-08 Andreas Schwab <schwab@suse.de>
2521 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2522 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2524 2006-03-05 Roland McGrath <roland@redhat.com>
2526 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2527 and $config_os doesn't match *linux*.
2529 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
2531 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2532 Use __syscall_error.
2533 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2534 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2535 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2536 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2537 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2538 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2540 2006-03-02 Ulrich Drepper <drepper@redhat.com>
2542 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2544 2006-03-01 Ulrich Drepper <drepper@redhat.com>
2546 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2547 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2549 (__lll_robust_timedlock_wait): Likewise.
2550 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2551 (__lll_robust_lock_wait): Likewise.
2552 (__lll_robust_timedlock_wait): Likewise.
2553 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2554 (__lll_robust_lock_wait): Likewise.
2555 (__lll_robust_timedlock_wait): Likewise.
2557 2006-03-01 Jakub Jelinek <jakub@redhat.com>
2559 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2560 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2561 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2562 lll_robust_mutex_unlock): Define.
2563 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2565 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
2567 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2568 instead of <clone.S>.
2570 2006-02-27 Jakub Jelinek <jakub@redhat.com>
2572 * Makefile (libpthread-routines): Add
2573 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2574 and pthread_mutex_[sg]etprioceiling.
2575 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2576 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2577 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2578 pthread_mutex_setprioceiling.
2579 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2580 PTHREAD_PRIO_PROTECT): New enum values.
2581 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2582 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2583 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2585 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2586 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2587 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2589 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2590 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2591 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2592 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2593 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2594 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2595 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2597 * pthread_mutex_getprioceiling.c: New file.
2598 * pthread_mutex_setprioceiling.c: New file.
2599 * pthread_mutexattr_getprioceiling.c: New file.
2600 * pthread_mutexattr_setprioceiling.c: New file.
2601 * pthread_mutexattr_getprotocol.c: New file.
2602 * pthread_mutexattr_setprotocol.c: New file.
2604 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2606 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2608 2006-02-27 Roland McGrath <roland@redhat.com>
2610 * sysdeps/pthread/Subdirs: List nptl here too.
2611 * configure (libc_add_on_canonical): New variable.
2613 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2615 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2616 self to get main source tree's file.
2617 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2618 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2619 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2620 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2621 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2622 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2623 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2624 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2625 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2626 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2627 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2628 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2629 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2631 * Makefile: Use $(sysdirs) in vpath directive.
2633 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2634 (CPPFLAGS-timer_routines.c): Likewise.
2636 * Makeconfig (includes): Variable removed.
2638 2006-02-26 Roland McGrath <roland@redhat.com>
2640 * sysdeps/generic/pt-raise.c: Moved to ...
2641 * pt-raise.c: ... here.
2642 * sysdeps/generic/lowlevellock.h: Moved to ...
2643 * lowlevellock.h: ... here.
2645 2006-02-23 Roland McGrath <roland@redhat.com>
2647 * descr.h (struct pthread): Add final member `end_padding'.
2648 (PTHREAD_STRUCT_END_PADDING): Use it.
2650 2006-02-20 Roland McGrath <roland@redhat.com>
2652 * sysdeps/mips: Directory removed, saved in ports repository.
2653 * sysdeps/unix/sysv/linux/mips: Likewise.
2655 2006-02-18 Ulrich Drepper <drepper@redhat.com>
2657 * tst-robust1.c: Add second mutex to check that the mutex list is
2660 2006-02-17 Jakub Jelinek <jakub@redhat.com>
2662 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2663 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2664 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2665 lll_robust_mutex_unlock): New macros.
2666 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2667 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2668 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2669 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2670 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2672 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2674 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2676 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2678 2006-02-17 Ulrich Drepper <drepper@redhat.com>
2680 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2681 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2682 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2683 (lll_robust_mutex_unlock): Likewise.
2685 2006-02-13 Jakub Jelinek <jakub@redhat.com>
2687 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2688 Set robust_list.__next rather than robust_list.
2689 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2690 (__pthread_list_t): New typedef.
2691 (pthread_mutex_t): Replace __next and __prev fields with __list.
2692 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2693 (__pthread_list_t): New typedef.
2694 (pthread_mutex_t): Replace __next and __prev fields with __list.
2695 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2696 (__pthread_list_t, __pthread_slist_t): New typedefs.
2697 (pthread_mutex_t): Replace __next and __prev fields with __list.
2698 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2699 (__pthread_list_t, __pthread_slist_t): New typedefs.
2700 (pthread_mutex_t): Replace __next and __prev fields with __list.
2701 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2702 (__pthread_list_t, __pthread_slist_t): New typedefs.
2703 (pthread_mutex_t): Replace __next and __prev fields with __list.
2704 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2705 (__pthread_slist_t): New typedef.
2706 (pthread_mutex_t): Replace __next field with __list.
2708 2006-02-15 Ulrich Drepper <drepper@redhat.com>
2710 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2711 PTHREAD_MUTEX_OWNERDEAD.
2712 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2713 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2714 * Makefile (libpthread-routines): Add lowlevelrobustlock.
2715 * pthread_create.c (start_thread): Very much simplify robust_list loop.
2716 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2717 to PTHREAD_MUTEX_INCONSISTENT.
2718 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2719 * pthread_mutex_lock.c: Reimplement robust mutex handling.
2720 * pthread_mutex_trylock.c: Likewise.
2721 * pthread_mutex_timedlock.c: Likewise.
2722 * pthread_mutex_unlock.c: Likewise.
2723 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2724 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2725 lowlevelrobustlock.sym.
2726 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2727 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2729 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2730 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2731 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2732 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2733 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2735 2006-02-12 Ulrich Drepper <drepper@redhat.com>
2737 * allocatestack.c (allocate_stack): Initialize robust_list.
2738 * init.c (__pthread_initialize_minimal_internal): Likewise.
2739 * descr.h (struct xid_command): Pretty printing.
2740 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2741 robust_list. Adjust macros.
2742 * pthread_create.c (start_thread): Adjust robust_list handling.
2743 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2744 but the owner for all robust mutex types.
2745 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2746 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
2747 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2748 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2750 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2751 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2753 2006-02-08 Jakub Jelinek <jakub@redhat.com>
2755 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2756 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2758 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2760 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2762 (lll_futex_timed_wait): Define.
2764 2006-01-19 Ulrich Drepper <drepper@redhat.com>
2766 * tst-cancel4.c: Test ppoll.
2768 2006-01-18 Andreas Jaeger <aj@suse.de>
2771 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2772 (pthread_mutex_t): Follow changes for other archs. Based on patch
2773 by Jim Gifford <patches@jg555.com>.
2775 2006-01-13 Richard Henderson <rth@redhat.com>
2777 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2779 2006-01-10 Roland McGrath <roland@redhat.com>
2781 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2782 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2783 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2784 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2785 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2786 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2787 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2788 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2789 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2790 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2792 2006-01-09 Roland McGrath <roland@redhat.com>
2794 * tst-initializers1-c89.c: New file.
2795 * tst-initializers1-c99.c: New file.
2796 * tst-initializers1-gnu89.c: New file.
2797 * tst-initializers1-gnu99.c: New file.
2798 * Makefile (tests): Add them.
2799 (CFLAGS-tst-initializers1-c89.c): New variable.
2800 (CFLAGS-tst-initializers1-c99.c): New variable.
2801 (CFLAGS-tst-initializers1-gnu89.c): New variable.
2802 (CFLAGS-tst-initializers1-gnu99.c): New variable.
2804 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2805 Use __extension__ on anonymous union definition.
2806 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2807 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2808 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2809 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2810 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2812 2006-01-08 Jakub Jelinek <jakub@redhat.com>
2814 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2815 Don't give the union a name because it changes the mangled name.
2816 Instead name the struct for __data.
2817 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2819 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2822 2006-01-09 Jakub Jelinek <jakub@redhat.com>
2824 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2825 stack bias to mc_ftp field.
2827 2006-01-07 Ulrich Drepper <drepper@redhat.com>
2829 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2830 being too clever and reloading the futex value where it shouldn't.
2832 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2834 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2837 2006-01-06 Jakub Jelinek <jakub@redhat.com>
2839 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2842 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2844 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2845 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2846 rename in tcbhead_t.
2848 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2849 Don't give the union a name because it changes the mangled name.
2850 Instead name the struct for __data.
2851 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2852 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2853 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2854 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2855 * pthread_create.c (start_thread): Adjust robust mutex free loop.
2856 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2858 2006-01-05 Ulrich Drepper <drepper@redhat.com>
2860 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2862 (lll_futex_timed_wait): Define.
2863 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2864 * sysdeps/pthread/aio_misc.h: New file.
2866 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
2868 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2870 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
2872 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2873 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2874 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2876 2006-01-04 Ulrich Drepper <drepper@redhat.com>
2878 * tst-cancel24.cc: Use C headers instead of C++ headers.
2880 2006-01-03 Jakub Jelinek <jakub@redhat.com>
2882 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2883 sparc-linux configured glibc.
2884 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2885 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2886 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2887 atomic_compare_and_exchange_val_24_acq instead of
2888 atomic_compare_and_exchange_val_acq.
2889 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2890 instead of atomic_exchange_rel.
2891 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2892 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2894 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2896 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2897 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2898 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2899 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2900 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2901 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2903 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2905 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2906 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2907 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2909 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2911 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2913 2006-01-03 Ulrich Drepper <drepper@redhat.com>
2915 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2918 2006-01-02 Jakub Jelinek <jakub@redhat.com>
2920 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2921 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2922 THREAD_COPY_POINTER_GUARD): Define.
2923 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2924 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2926 2006-01-01 Ulrich Drepper <drepper@redhat.com>
2928 * version.c: Update copyright year.
2930 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2932 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2933 .eh_frame section, use cfi_* directives.
2934 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2936 2005-12-30 Ulrich Drepper <drepper@redhat.com>
2938 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2941 2005-12-29 Ulrich Drepper <drepper@redhat.com>
2943 * sysdeps/pthread/sigaction.c: Removed.
2944 * sigaction.c: New file.
2945 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2947 2005-12-28 Ulrich Drepper <drepper@redhat.com>
2949 * Makefile (tests): Add tst-signal7.
2950 * tst-signal7.c: New file.
2952 2005-12-27 Roland McGrath <roland@redhat.com>
2954 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2955 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2956 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2957 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2958 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2959 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2960 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2961 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2962 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2963 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2964 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2966 2005-12-27 Jakub Jelinek <jakub@redhat.com>
2968 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2969 and __prev field to pthread_mutex_t.
2970 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2971 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2972 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2973 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2974 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2977 2005-12-26 Ulrich Drepper <drepper@redhat.com>
2979 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2980 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2981 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2982 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2983 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2984 and PTHREAD_MUTEXATTR_FLAG_BITS.
2985 * descr.h (struct pthread): Add robust_list field and define
2986 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2987 * pthread_mutexattr_getrobust.c: New file.
2988 * pthread_mutexattr_setrobust.c: New file.
2989 * pthread_mutex_consistent.c: New file.
2990 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2991 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2992 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2993 Adjust pthread_mutex_t initializers.
2994 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2995 field to pthread_mutex_t.
2996 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2997 and __prev field to pthread_mutex_t.
2998 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2999 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3000 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3001 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3002 * pthread_mutexattr_gettype.c: Likewise.
3003 * pthread_mutexattr_setpshared.c: Likewise.
3004 * pthread_mutexattr_settype.c: Likewise.
3005 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3006 Initialize mutex kind according to robust flag.
3007 * pthread_mutex_lock.c: Implement local robust mutex.
3008 * pthread_mutex_timedlock.c: Likewise.
3009 * pthread_mutex_trylock.c: Likewise.
3010 * pthread_mutex_unlock.c: Likewise.
3011 * pthread_create.c (start_thread): Mark robust mutexes which remained
3013 * tst-robust1.c: New file.
3014 * tst-robust2.c: New file.
3015 * tst-robust3.c: New file.
3016 * tst-robust4.c: New file.
3017 * tst-robust5.c: New file.
3018 * tst-robust6.c: New file.
3019 * tst-robust7.c: New file.
3020 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3021 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3022 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3023 tst-robust5, tst-robust6, and tst-robust7.
3025 * tst-typesizes.c: New file.
3026 * Makefile (tests): Add tst-typesizes.
3028 * tst-once3.c: More debug output.
3030 2005-12-24 Ulrich Drepper <drepper@redhat.com>
3032 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3033 missing after last change.
3035 * version.c: Update copyright year.
3037 2005-12-23 Ulrich Drepper <drepper@redhat.com>
3039 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3040 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3041 * pthread_mutex_trylock.c: Likewise.
3042 * pthread_mutex_timedlock.c: Likewise.
3043 * pthread_mutex_unlock.c: Likewise.
3045 2005-12-22 Roland McGrath <roland@redhat.com>
3047 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3048 so that #include_next's search location is not reset to the -I..
3049 directory where <nptl/...> can be found.
3051 2005-12-22 Ulrich Drepper <drepper@redhat.com>
3054 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3055 Fix unwind info. Remove useless branch prediction prefix.
3056 * tst-cancel24.cc: New file.
3057 * Makefile: Add rules to build and run tst-cancel24.
3059 2005-12-21 Roland McGrath <roland@redhat.com>
3061 * libc-cancellation.c: Use <> rather than "" #includes.
3062 * pt-cleanup.c: Likewise.
3063 * pthread_create.c: Likewise.
3064 * pthread_join.c: Likewise.
3065 * pthread_timedjoin.c: Likewise.
3066 * pthread_tryjoin.c: Likewise.
3067 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3068 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3069 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3070 * unwind.c: Likewise.
3072 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3074 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3075 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3076 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3077 THREAD_COPY_POINTER_GUARD): Define.
3079 2005-12-19 Jakub Jelinek <jakub@redhat.com>
3081 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3083 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3084 THREAD_COPY_POINTER_GUARD): Define.
3085 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3086 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3087 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3088 THREAD_COPY_POINTER_GUARD): Define.
3089 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3090 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3091 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3092 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3093 Use PTR_DEMANGLE for B0 if defined.
3095 2005-12-17 Ulrich Drepper <drepper@redhat.com>
3097 * pthread_create.c (__pthread_create_2_1): Use
3098 THREAD_COPY_POINTER_GUARD if available.
3099 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3100 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3101 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3102 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3103 * sysdeps/x86_64/tls.h: Likewise.
3105 2005-12-15 Roland McGrath <roland@redhat.com>
3107 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3109 2005-12-13 Ulrich Drepper <drepper@redhat.com>
3111 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3113 * errno-loc.c: New file.
3115 2005-12-12 Roland McGrath <roland@redhat.com>
3117 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3118 adjustments before choosing stack size. Update minimum stack size
3119 calculation to match allocate_stack change.
3121 2005-12-12 Ulrich Drepper <drepper@redhat.com>
3123 * allocatestack.c (allocate_stack): Don't demand that there is an
3124 additional full page available on the stack beside guard, TLS, the
3127 2005-11-24 Ulrich Drepper <drepper@redhat.com>
3129 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3130 (__cleanup_fct_attribute): Use __regparm__ not regparm.
3132 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3133 compiling 32-bit code we must define __cleanup_fct_attribute.
3135 005-11-24 Jakub Jelinek <jakub@redhat.com>
3138 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3139 __attribute__ instead of __attribute.
3140 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3141 (__cleanup_fct_attribute): Likewise.
3143 2005-11-17 Jakub Jelinek <jakub@redhat.com>
3145 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3146 a write barrier before writing libgcc_s_getcfa.
3148 2005-11-06 Ulrich Drepper <drepper@redhat.com>
3150 * sysdeps/unix/sysv/linux/configure: Removed.
3152 2005-11-05 Ulrich Drepper <drepper@redhat.com>
3154 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3155 optional init_array/fini_array support.
3157 2005-10-24 Roland McGrath <roland@redhat.com>
3159 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3160 versioned_symbol use.
3162 2005-10-16 Roland McGrath <roland@redhat.com>
3164 * init.c (__pthread_initialize_minimal_internal): Even when using a
3165 compile-time default stack size, apply the minimum that allocate_stack
3166 will require, and round up to page size.
3168 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
3170 * Makefile ($(test-modules)): Remove static pattern rule.
3172 2005-10-14 Jakub Jelinek <jakub@redhat.com>
3173 Ulrich Drepper <drepper@redhat.com>
3175 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3176 alignment in callback function.
3177 * Makefile: Add rules to build and run tst-align3.
3178 * tst-align3.c: New file.
3180 2005-10-03 Jakub Jelinek <jakub@redhat.com>
3182 * allocatestack.c (setxid_signal_thread): Add
3183 INTERNAL_SYSCALL_DECL (err).
3185 2005-10-02 Jakub Jelinek <jakub@redhat.com>
3187 * allocatestack.c (setxid_signal_thread): Need to use
3188 atomic_compare_and_exchange_bool_acq.
3190 2005-10-01 Ulrich Drepper <drepper@redhat.com>
3191 Jakub Jelinek <jakub@redhat.com>
3193 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
3195 (struct pthread): Move specific_used field to avoid padding.
3196 Add setxid_futex field.
3197 * init.c (sighandler_setxid): Reset setxid flag and release the
3199 * allocatestack.c (setxid_signal_thread): New function. Broken
3200 out of the bodies of the two loops in __nptl_setxid. For undetached
3201 threads check whether they are exiting and if yes, don't send a signal.
3202 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3203 * pthread_create.c (start_thread): For undetached threads, check
3204 whether setxid bit is set. If yes, wait until signal has been
3207 * allocatestack.c (STACK_VARIABLES): Initialize them.
3208 * pthread_create.c (__pthread_create_2_1): Initialize pd.
3210 2004-09-02 Jakub Jelinek <jakub@redhat.com>
3212 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3213 waiters, awake all waiters on the associated mutex.
3215 2005-09-22 Roland McGrath <roland@redhat.com>
3217 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3218 ../sysdeps/x86_64/hp-timing.h).
3220 2005-08-29 Jakub Jelinek <jakub@redhat.com>
3222 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3223 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3224 (lll_futex_wake_unlock): Define.
3225 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3226 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3227 (lll_futex_wake_unlock): Define.
3228 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3229 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3230 (lll_futex_wake_unlock): Define.
3231 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3232 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3233 (lll_futex_wake_unlock): Define.
3234 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3235 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3236 (lll_futex_wake_unlock): Define.
3237 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3238 lll_futex_wake_unlock.
3239 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3240 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3241 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3242 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3243 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3244 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3246 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3248 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3249 Fix typo in register name.
3251 2005-08-23 Ulrich Drepper <drepper@redhat.com>
3253 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3254 Use __sigfillset. Document that sigfillset does the right thing wrt
3257 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3260 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3261 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3262 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3263 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3264 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3265 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3267 * Makefile (tests): Add tst-initializers1.
3268 (CFLAGS-tst-initializers1.c): Set.
3269 * tst-initializers1.c: New test.
3271 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3273 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3274 Make sure __flags are located at offset 48 from the start of the
3277 2005-07-02 Roland McGrath <roland@redhat.com>
3279 * Makeconfig: Comment fix.
3281 2005-07-05 Jakub Jelinek <jakub@redhat.com>
3283 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3284 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3285 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3286 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3287 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3288 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3289 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3290 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3291 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3292 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3294 2005-06-25 Jakub Jelinek <jakub@redhat.com>
3296 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3297 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3298 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3300 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3301 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3302 field. Put in sysinfo field unconditionally.
3303 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3304 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3305 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3306 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3308 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3309 * pthread_create.c (__pthread_create_2_1): Use
3310 THREAD_COPY_STACK_GUARD macro.
3311 * Makefile: Add rules to build and run tst-stackguard1{,-static}
3313 * tst-stackguard1.c: New file.
3314 * tst-stackguard1-static.c: New file.
3316 2005-06-14 Alan Modra <amodra@bigpond.net.au>
3318 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3319 Invoke CGOTSETUP and CGOTRESTORE.
3320 (CGOTSETUP, CGOTRESTORE): Define.
3322 2005-05-29 Richard Henderson <rth@redhat.com>
3324 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3325 (tf_write, tf_writev): Use it.
3326 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
3329 2005-05-23 Jakub Jelinek <jakub@redhat.com>
3331 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3332 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3333 __librt_*_asynccancel@local.
3335 2005-05-17 Alan Modra <amodra@bigpond.net.au>
3337 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3338 all occurrences of JUMPTARGET. Instead append @local to labels.
3340 2005-05-20 Jakub Jelinek <jakub@redhat.com>
3342 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3343 size/alignment of struct pthread rather than tcbhead_t.
3344 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3346 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3348 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3351 2005-05-19 Richard Henderson <rth@redhat.com>
3353 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3354 __sync_val_compare_and_swap, not explicit _si variant.
3355 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3357 2005-05-03 Ulrich Drepper <drepper@redhat.com>
3360 * sysdeps/pthread/pthread.h: Avoid empty initializers.
3362 2005-05-03 Jakub Jelinek <jakub@redhat.com>
3364 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3365 .eh_frame section, use cfi_* directives.
3367 2005-04-27 Jakub Jelinek <jakub@redhat.com>
3369 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3372 2005-04-27 Ulrich Drepper <drepper@redhat.com>
3375 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3378 2005-04-27 Roland McGrath <roland@redhat.com>
3380 * Makefile (tests): Remove tst-clock2.
3382 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3383 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3384 translating to the kernel clockid_t for our own process/thread clock.
3386 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3388 2005-04-15 Jakub Jelinek <jakub@redhat.com>
3390 * old_pthread_cond_init.c: Include <errno.h>.
3391 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3392 process shared or uses clock other than CLOCK_REALTIME.
3393 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3395 2005-04-13 David S. Miller <davem@davemloft.net>
3397 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3398 * sysdeps/sparc/sparc64/clone.S: New file.
3400 2005-04-05 Jakub Jelinek <jakub@redhat.com>
3403 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3404 __inline instead of inline.
3405 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3407 2005-03-31 Jakub Jelinek <jakub@redhat.com>
3409 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3410 functionally equivalent, but shorter instructions.
3411 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3412 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3413 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3415 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3416 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3417 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3418 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3419 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3420 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3421 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3423 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3424 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3425 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3426 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3427 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3429 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
3431 * sysdeps/mips/Makefile: New file.
3432 * sysdeps/mips/nptl-sysdep.S: New file.
3433 * sysdeps/mips/tcb-offsets.sym: New file.
3434 * sysdeps/mips/pthread_spin_lock.S: New file.
3435 * sysdeps/mips/pthread_spin_trylock.S: New file.
3436 * sysdeps/mips/pthreaddef.h: New file.
3437 * sysdeps/mips/tls.h: New file.
3438 * sysdeps/mips/jmpbuf-unwind.h: New file.
3439 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3440 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3441 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3442 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3443 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3444 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3445 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3446 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3447 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3448 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3450 2005-03-23 Ulrich Drepper <drepper@redhat.com>
3453 * pthread_create.c (__pthread_create_2_1): Rename syscall error
3456 2005-03-10 Jakub Jelinek <jakub@redhat.com>
3458 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3460 2005-02-25 Roland McGrath <roland@redhat.com>
3462 * alloca_cutoff.c: Correct license text.
3463 * tst-unload.c: Likewise.
3464 * sysdeps/pthread/allocalim.h: Likewise.
3465 * sysdeps/pthread/pt-initfini.c: Likewise.
3466 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3467 * sysdeps/pthread/bits/sigthread.h: Likewise.
3468 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3469 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3471 2005-02-16 Roland McGrath <roland@redhat.com>
3473 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3474 Use unsigned int * for ptr_nthreads.
3476 2005-02-14 Alan Modra <amodra@bigpond.net.au>
3479 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3482 2005-02-07 Richard Henderson <rth@redhat.com>
3485 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3488 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
3490 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3491 order of arguments in invocation of atomic_add_zero.
3493 2005-01-26 Jakub Jelinek <jakub@redhat.com>
3496 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3497 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3498 at least gotntpoff relocation and addition.
3499 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3501 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3503 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3506 2005-01-06 Ulrich Drepper <drepper@redhat.com>
3508 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3509 entry for static tls deallocation fix.
3510 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3511 also contains information whether the memory pointed to is static
3513 * sysdeps/i386/tls.h: Likewise.
3514 * sysdeps/ia64/tls.h: Likewise.
3515 * sysdeps/powerpc/tls.h: Likewise.
3516 * sysdeps/s390/tls.h: Likewise.
3517 * sysdeps/sh/tls.h: Likewise.
3518 * sysdeps/sparc/tls.h: Likewise.
3519 * sysdeps/x86_64/tls.h: Likewise.
3521 2004-12-27 Ulrich Drepper <drepper@redhat.com>
3523 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3525 2004-12-21 Jakub Jelinek <jakub@redhat.com>
3527 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3529 * Makefile (tests): Add tst-align2.
3530 * tst-align2.c: New test.
3531 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3532 -mpreferred-stack-boundary=4.
3534 2004-12-18 Roland McGrath <roland@redhat.com>
3536 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3537 New file removed withdrawn for the moment.
3539 2004-12-17 Richard Henderson <rth@redhat.com>
3541 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3542 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3544 2004-12-16 Ulrich Drepper <drepper@redhat.com>
3546 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3547 Increased PTHREAD_STACK_MIN.
3549 * tst-context1.c (stacks): Use bigger stack size.
3551 2004-12-16 Jakub Jelinek <jakub@redhat.com>
3553 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3554 * sysdeps/sparc/tcb-offsets.sym: Add TID.
3556 2004-12-15 Jakub Jelinek <jakub@redhat.com>
3558 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3559 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3560 * sysdeps/s390/tcb-offsets.sym (TID): Add.
3562 2004-12-15 Ulrich Drepper <drepper@redhat.com>
3564 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3566 2004-12-14 Ulrich Drepper <drepper@redhat.com>
3568 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3569 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3571 * tst-getpid1.c: If child crashes, report this first. Print which
3574 2004-12-09 Ulrich Drepper <drepper@redhat.com>
3576 * init.c (__pthread_initialize_minimal_internal): Also unblock
3579 2004-12-01 Jakub Jelinek <jakub@redhat.com>
3581 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3582 _POSIX_THREAD_CPUTIME): Define to 0.
3583 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3584 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3585 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3586 __timer_signal_thread_tclk): Remove.
3587 (init_module): Remove their initialization.
3588 (thread_cleanup): Remove their cleanup assertions.
3589 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3590 __timer_signal_thread_tclk): Remove.
3591 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3592 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3593 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3595 2004-12-07 Jakub Jelinek <jakub@redhat.com>
3597 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3598 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3600 * Makefile (tests): Add tst-getpid2.
3601 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3602 (do_test): Use it. Use __clone2 instead of clone on ia64.
3603 * tst-getpid2.c: New test.
3605 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3607 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3609 2004-12-04 Ulrich Drepper <drepper@redhat.com>
3611 * Makefile (tests): Add tst-getpid1.
3612 * tst-getpid1.c: New file.
3613 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3614 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3616 2004-12-02 Roland McGrath <roland@redhat.com>
3618 * Makefile (libpthread-nonshared): Variable removed.
3619 ($(objpfx)libpthread_nonshared.a): Target removed.
3620 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3621 These are now handled by generic magic from
3622 libpthread-static-only-routines being set.
3624 2004-11-27 Ulrich Drepper <drepper@redhat.com>
3626 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3627 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3628 _POSIX_THREAD_PRIO_PROTECT): Define.
3629 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3630 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3631 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3633 2004-11-26 Jakub Jelinek <jakub@redhat.com>
3635 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3636 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3637 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3638 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3639 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3640 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3641 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3643 2004-11-24 Ulrich Drepper <drepper@redhat.com>
3645 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3647 * Makefile (libpthread-routines): Add pthread_setschedprio.
3648 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3649 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3650 * pthread_setschedprio.c: New file.
3652 2004-11-20 Jakub Jelinek <jakub@redhat.com>
3654 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3655 * pthread_cancel.c (pthread_create): Likewise.
3657 * Makefile (libpthread-routines): Add vars.
3658 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3659 * init.c (__default_stacksize, __is_smp): Remove.
3661 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3662 and define a wrapper macro.
3663 (PTHREAD_STATIC_FN_REQUIRE): Define.
3664 * allocatestack.c (__find_thread_by_id): Undefine.
3665 * pthread_create (__pthread_keys): Remove.
3666 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3667 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3668 PTHREAD_STATIC_FN_REQUIRE.
3670 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3672 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3673 parameter to REGISTER macro.
3675 2004-11-17 Roland McGrath <roland@redhat.com>
3677 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3678 Make sure SIGCANCEL is blocked as well.
3680 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3682 * sysdeps/pthread/setxid.h: New file.
3683 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3684 (struct xid_command): Add forward decl.
3685 (struct pthread_functions): Change return type of __nptl_setxid hook
3687 * pthreadP.h (__nptl_setxid): Change return type to int.
3688 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3689 calling thread, return its return value and set errno on failure.
3690 * descr.h (struct xid_command): Change id type to long array.
3692 * Makefile: Add rules to build and test tst-setuid1 and
3694 * tst-setuid1.c: New test.
3695 * tst-setuid1-static.c: New test.
3697 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3699 * Makefile (tests): Add tst-exit3.
3700 * tst-exit3.c: New test.
3702 2004-11-09 Ulrich Drepper <drepper@redhat.com>
3704 * Makefile (tests): Add tst-exit2.
3705 * tst-exit2.c: New file.
3707 2004-11-09 Roland McGrath <roland@redhat.com>
3710 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3711 here, before calling clone.
3712 * pthread_create.c (start_thread): Don't do it here.
3714 2004-11-02 Jakub Jelinek <jakub@redhat.com>
3716 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3718 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3720 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3721 Set ETIMEDOUT to errno when time is up. Tweak to avoid
3724 2004-10-28 Jakub Jelinek <jakub@redhat.com>
3726 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3727 if sched_priority is not between minprio and maxprio.
3729 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3731 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3732 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3734 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3735 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3737 2004-10-24 Ulrich Drepper <drepper@redhat.com>
3739 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3740 not-cancelable I/O functions.
3742 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3744 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3745 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3746 make sure 2 is stored in the futex and we looked at the old value.
3747 Fix a few other problems to return the correct value.
3749 2004-10-14 Richard Henderson <rth@redhat.com>
3751 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3754 2004-10-06 Jakub Jelinek <jakub@redhat.com>
3756 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3757 of pthread-functions.h and pthreaddef.h.
3758 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3760 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3761 Change __data.__nwaiters from int to unsigned int.
3763 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3764 sysconf (_SC_THREAD_CPUTIME) returns negative value.
3766 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3769 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3770 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3772 2004-10-06 Ulrich Drepper <drepper@redhat.com>
3774 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
3775 test fails, remove message queue.
3776 (tf_msgsnd): Likewise.
3778 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3780 * tst-clock1.c: Change #ifdef to #if defined.
3781 * tst-clock2.c: Likewise.
3782 * tst-cond11.c: Likewise.
3784 * sysdeps/pthread/timer_create.c (timer_create): Use
3785 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3786 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3789 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3791 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3792 _POSIX_THREAD_CPUTIME): Define to 0.
3794 2004-10-04 Ulrich Drepper <drepper@redhat.com>
3796 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3797 and _POSIX_THREAD_CPUTIME to zero.
3798 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3799 * tst-barrier2.c: Fix testing for POSIX feature.
3800 * tst-clock1.c: Likewise.
3801 * tst-clock2.c: Likewise.
3802 * tst-cond11.c: Likewise.
3803 * tst-cond4.c: Likewise.
3804 * tst-cond6.c: Likewise.
3805 * tst-flock2.c: Likewise.
3806 * tst-mutex4.c: Likewise.
3807 * tst-mutex9.c: Likewise.
3808 * tst-rwlock12.c: Likewise.
3809 * tst-rwlock4.c: Likewise.
3810 * tst-signal1.c: Likewise.
3811 * tst-spin2.c: Likewise.
3812 * sysdeps/pthread/posix-timer.h: Likewise.
3813 * sysdeps/pthread/timer_create.c: Likewise.
3814 * sysdeps/pthread/timer_routines.c: Likewise.
3816 2004-10-01 Ulrich Drepper <drepper@redhat.com>
3818 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3819 (__lll_mutex_timedlock_wait): Address futex correctly.
3821 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3822 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3823 make sure 2 is stored in the futex and we looked at the old value.
3824 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3825 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
3826 which might very well made the code not working at all before.
3829 2004-09-28 Ulrich Drepper <drepper@redhat.com>
3831 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3832 allow SIGSETXID to be sent.
3833 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3834 for SIGSETXID to be defined.
3835 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3836 SIGSETXID cannot be blocked.
3838 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3839 Add __extension__ to long long types.
3840 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3841 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3842 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3843 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3844 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3845 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3846 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3848 2004-09-25 Ulrich Drepper <drepper@redhat.com>
3850 * descr.h (struct pthread): Add stopped_start field.
3851 * sysdeps/pthread/createthread.c (create_thread): Set
3852 start_stopped flag in descriptor for new thread appropriately.
3853 * pthread_create.c (start_thread): Only take lock to be stopped on
3854 startup if stopped_start flag says so.
3856 2004-09-24 Ulrich Drepper <drepper@redhat.com>
3858 * pthread_create.c (__pthread_create_2_1): Remember whether thread
3859 is created detached and if yes, do not try to free the stack in case
3860 the thread creation failed.
3861 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3862 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3863 case there has been no error. [BZ #405]
3865 * pthread_create.c (start_thread): Don't wait for scheduler data
3866 etc to be set at the beginning of the function. The cancellation
3867 infrastructure must have been set up. And enable async
3868 cancellation before potentially going to sleep. [BZ #401]
3870 2004-09-20 Ulrich Drepper <drepper@redhat.com>
3872 * Versions: Remove exports for pthread_set*id_np functions.
3873 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3875 * Makefile: Don't build pthread_set*id code for now.
3877 2004-09-19 Ulrich Drepper <drepper@redhat.com>
3879 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3881 * allocatestack.c (__nptl_setxid): New function.
3882 * descr.h (struct xid_command): Define type.
3883 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3884 (sighandler_setxid): New function.
3885 (__pthread_initialize_minimal): Register sighandler_setxid for
3887 * pt-allocrtsig.c: Update comment.
3888 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
3889 Declare __nptl_setxid.
3890 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3891 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3892 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3893 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3894 and pthread_setresuid_np.
3895 * pthread_setgid_np.c: New file.
3896 * pthread_setuid_np.c: New file.
3897 * pthread_setegid_np.c: New file.
3898 * pthread_seteuid_np.c: New file.
3899 * pthread_setregid_np.c: New file.
3900 * pthread_setreuid_np.c: New file.
3901 * pthread_setresgid_np.c: New file.
3902 * pthread_setresuid_np.c: New file.
3903 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3904 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3905 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3906 and pthread_setresuid_np.
3907 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3908 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3909 pthread_setregid, and pthread_setresgid.
3911 2004-09-18 Ulrich Drepper <drepper@redhat.com>
3913 * allocatestack.c (allocate_stack): Return EAGAIN instead of
3914 ENOMEM when out of memory.
3916 2004-09-10 Roland McGrath <roland@redhat.com>
3919 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3920 code, since we don't try to use the broken CLONE_STOPPED any more.
3921 * pthread_create.c (start_thread): Likewise.
3923 2004-09-15 Richard Henderson <rth@redhat.com>
3925 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3927 2004-09-01 David Mosberger <davidm@hpl.hp.com>
3929 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3930 (__libc_unwind_longjmp): Delete macro and declare as function.
3931 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3932 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3934 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3935 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3936 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3938 2004-09-12 Ulrich Drepper <drepper@redhat.com>
3940 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3942 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3943 types also for __USE_XOPEN2K.
3944 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3945 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3946 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3947 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3948 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3949 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3950 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3953 2004-09-08 Ulrich Drepper <drepper@redhat.com>
3955 * sysdeps/pthread/pthread.h
3956 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3957 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3958 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3959 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3962 2004-09-07 Ulrich Drepper <drepper@redhat.com>
3964 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3965 PSEUDO to be used with . prefix.
3967 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3968 Use atomic_increment instead of atomic_exchange_and_add.
3969 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3971 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3973 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3976 * allocatestack.c (allocate_stack): Use atomic_increment_val
3977 instead of atomic_exchange_and_add.
3978 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3979 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3981 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3984 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3985 the initialization function might throw.
3987 2005-09-05 Richard Henderson <rth@redhat.com>
3989 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3990 Move definition inside libpthread, libc, librt check. Provide
3991 definition for rtld.
3993 2004-09-02 Ulrich Drepper <drepper@redhat.com>
3995 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3996 * sysdeps/i386/jmpbuf-unwind.h: Likewise
3997 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3998 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3999 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4000 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4001 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4002 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4005 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4006 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4007 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4009 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4010 Decrement __nwaiters. If pthread_cond_destroy has been called and
4011 this is the last waiter, signal pthread_cond_destroy caller and
4012 avoid using the pthread_cond_t structure after unlock.
4013 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4014 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4015 Read clock type from the least significant bits of __nwaiters instead
4017 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4018 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4020 2004-08-31 Jakub Jelinek <jakub@redhat.com>
4023 * Makefile (tests): Add tst-cond20 and tst-cond21.
4024 * tst-cond20.c: New test.
4025 * tst-cond21.c: New test.
4026 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4027 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4029 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4031 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4032 (pthread_cond_t): Likewise.
4033 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4035 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4037 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4039 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4040 (cond_nwaiters): New.
4042 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4043 if there are waiters not signalled yet.
4044 Wait until all already signalled waiters wake up.
4045 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4046 __nwaiters. If pthread_cond_destroy has been called and this is the
4047 last waiter, signal pthread_cond_destroy caller and avoid using
4048 the pthread_cond_t structure after unlock.
4049 (__pthread_cond_wait): Increment __nwaiters in the beginning,
4050 decrement it when leaving. If pthread_cond_destroy has been called
4051 and this is the last waiter, signal pthread_cond_destroy caller.
4052 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4053 Likewise. Read clock type from the least significant bits of
4054 __nwaiters instead of __clock.
4055 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4056 whether clock ID can be encoded in COND_CLOCK_BITS bits.
4057 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4058 clock type just from the last COND_CLOCK_BITS bits of value.
4059 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4060 instead of __clock, just from second bit of condattr's value.
4062 2004-08-30 Jakub Jelinek <jakub@redhat.com>
4064 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4065 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
4067 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4069 2004-08-15 Roland McGrath <roland@frob.com>
4071 * pthread_atfork.c: Update copyright terms including special exception
4072 for these trivial files, which are statically linked into executables
4073 that use dynamic linking for the significant library code.
4075 2004-08-09 Jakub Jelinek <jakub@redhat.com>
4077 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4078 pthread_rwlock_rdlock.
4079 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4080 Decrease __nr_readers_queued after reacquiring lock.
4081 * sysdeps/pthread/pthread_rwlock_timedrdlock
4082 (pthread_rwlock_timedrdlock): Likewise.
4083 Reported by Bob Cook <bobcook47@hotmail.com>.
4085 2004-08-11 Jakub Jelinek <jakub@redhat.com>
4087 * tst-rwlock14.c (tf): Read main thread handle from *ARG
4088 before pthread_barrier_wait.
4090 2004-08-07 Ulrich Drepper <drepper@redhat.com>
4092 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4093 Remove unnecessary exception handling data.
4095 2004-07-23 Jakub Jelinek <jakub@redhat.com>
4098 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4099 instead of clockid_t.
4101 2004-07-21 Roland McGrath <roland@redhat.com>
4103 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4105 2004-07-19 Roland McGrath <roland@redhat.com>
4107 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4109 2004-07-02 Roland McGrath <roland@redhat.com>
4111 * configure: Don't exit.
4113 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4115 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4116 (__pthread_cond_timedwait): Check for invalid nanosecond in
4119 2004-07-07 Ulrich Drepper <drepper@redhat.com>
4121 * Makefile: Add rules to build and run tst-fini1.
4122 * tst-fini1.c: New file.
4123 * tst-fini1mod.c: New file.
4125 2004-07-05 Ulrich Drepper <drepper@redhat.com>
4127 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4128 if no cancellation support is needed.
4129 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4130 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4131 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4132 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4133 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4134 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4135 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4136 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4137 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4139 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4140 only if not already defined.
4142 2004-07-05 Jakub Jelinek <jakub@redhat.com>
4144 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4145 constraint "m" instead of "0" for futex.
4147 * shlib-versions: Add powerpc64-.*-linux.*.
4149 2004-07-04 Jakub Jelinek <jakub@redhat.com>
4151 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4152 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4154 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4155 1 billion and 64-bit tv_nsec which is valid when truncated to 32
4158 2004-06-29 Roland McGrath <roland@redhat.com>
4160 * Banner: NPTL no longer has its own version number.
4161 * Makefile (nptl-version): Variable removed.
4162 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4163 using $(version), the glibc version number.
4165 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4167 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4168 Fix branch offset for a PLT entry.
4169 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4171 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4173 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4175 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4178 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4180 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4183 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4185 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4186 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4188 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4189 (pthread_rwlock_timedrdlock): Likewise.
4191 2004-06-22 Jakub Jelinek <jakub@redhat.com>
4193 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4194 Set __r7 to val, not mutex.
4196 2004-06-27 Ulrich Drepper <drepper@redhat.com>
4198 * Makefile: Add rules to build tst-rwlock14.
4199 * tst-rwlock14.c: New file.
4201 2004-06-24 Boris Hu <boris.hu@intel.com>
4203 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4205 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4207 2004-06-19 Andreas Jaeger <aj@suse.de>
4209 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4210 assembler in last patch.
4212 2004-06-17 Ulrich Drepper <drepper@redhat.com>
4214 * sysdeps/pthread/pthread_cond_timedwait.c
4215 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4216 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4217 (__pthread_cond_timedwait): Check for invalid nanosecond in
4219 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4220 * tst-cond19.c: New file.
4221 * Makefile: Add rules to build and run tst-cond19.
4223 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
4225 * tst-context1.c (GUARD_PATTERN): Defined.
4226 (tst_context_t): Define struct containing ucontext_t & guard words.
4227 (ctx): Declare as an array of tst_context_t.
4228 (fct): Verify uc_link & guard words are still valid.
4229 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
4231 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4233 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4234 Add __data.__futex field, reshuffle __data.__clock.
4235 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4236 (__pthread_cond_signal): Increment __futex at the same time as
4237 __wakeup_seq or __total_seq. Pass address of __futex instead of
4238 address of low 32-bits of __wakeup_seq to futex syscall.
4239 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4240 (__pthread_cond_wait): Likewise. Pass __futex value from before
4241 releasing internal lock to FUTEX_WAIT.
4242 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4243 (__pthread_cond_timedwait): Likewise.
4244 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4245 (FUTEX_CMP_REQUEUE): Define.
4246 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4247 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4248 Pass __futex value from before the unlock and __futex address instead
4249 of address of low 32-bits of __wakeup_seq to futex syscall.
4250 Fallback to FUTEX_WAKE all on any errors.
4252 2004-06-08 Jakub Jelinek <jakub@redhat.com>
4254 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4256 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4257 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4258 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4259 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4260 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
4262 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
4264 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4265 Add memory clobber to inline assembly.
4266 (__lll_mutex_trylock): Likewise.
4267 (__lll_mutex_cond_trylock): Likewise.
4269 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
4271 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4272 Pass val argument as 6th system call argument in %r7.
4274 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4276 * Makefile (tests): Add tst-cond16.
4277 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4278 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4279 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4280 Add __data.__futex field, reshuffle __data.__clock.
4281 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4282 (__pthread_cond_signal): Increment __futex at the same time as
4283 __wakeup_seq or __total_seq. Pass address of __futex instead of
4284 address of low 32-bits of __wakeup_seq to futex syscall.
4285 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4286 (__pthread_cond_wait): Likewise. Pass __futex value from before
4287 releasing internal lock to FUTEX_WAIT.
4288 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4289 (__pthread_cond_timedwait): Likewise.
4290 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4291 (FUTEX_CMP_REQUEUE): Define.
4292 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4293 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4294 Pass __futex value from before the unlock and __futex address instead
4295 of address of low 32-bits of __wakeup_seq to futex syscall.
4296 Fallback to FUTEX_WAKE all on any errors.
4297 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4299 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4300 internally. Return non-zero if error, zero if success.
4301 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4302 Add __data.__futex field, reshuffle __data.__clock.
4303 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4305 (lll_futex_requeue): Add val argument, return 1 unconditionally
4307 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4308 Add __data.__futex field, reshuffle __data.__clock.
4309 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4311 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4312 internally. Return non-zero if error, zero if success.
4313 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4314 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4315 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4317 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4318 internally. Return non-zero if error, zero if success.
4319 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4320 Add __data.__futex field, reshuffle __data.__clock.
4321 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4323 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4324 internally. Return non-zero if error, zero if success.
4325 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4326 Add __data.__futex field, reshuffle __data.__clock.
4327 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4328 Add __data.__futex field, reshuffle __data.__clock.
4329 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4330 Increment __futex at the same time as __wakeup_seq or __total_seq.
4331 Pass address of __futex instead of address of low 32-bits of
4332 __wakeup_seq to futex syscall.
4333 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4334 Pass __futex value from before releasing internal lock
4336 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4337 Likewise. Avoid unnecessary shadowing of variables.
4338 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4339 Set __futex to 2 * __total_seq. Pass __futex value from before the
4340 unlock and __futex address instead of address of low 32-bits of
4341 __wakeup_seq to futex_requeue macro, adjust for new return value
4343 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4344 (__pthread_cond_signal): Increment __futex at the same time as
4345 __wakeup_seq or __total_seq. Pass address of __futex instead of
4346 address of low 32-bits of __wakeup_seq to futex syscall.
4347 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4348 (__pthread_cond_wait): Likewise. Pass __futex value from before
4349 releasing internal lock to FUTEX_WAIT.
4350 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4351 (__pthread_cond_timedwait): Likewise.
4352 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4353 (FUTEX_CMP_REQUEUE): Define.
4354 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4355 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4356 Pass __futex value from before the unlock and __futex address instead
4357 of address of low 32-bits of __wakeup_seq to futex syscall.
4358 Fallback to FUTEX_WAKE all on any errors.
4360 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4362 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4363 Add nop to align the end of critical section.
4364 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4366 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4368 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4369 Add __broadcast_seq field.
4370 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4371 all waiters as woken with woken_seq and bump broadcast counter.
4372 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4373 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
4374 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4375 Comment typo fixes. Avoid returning -ETIMEDOUT.
4377 2004-06-01 Ulrich Drepper <drepper@redhat.com>
4379 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4380 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4381 Reported by Kaz Kojima.
4383 2004-05-25 Jakub Jelinek <jakub@redhat.com>
4385 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4387 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4389 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4390 __broadcast_seq with bc_seq after acquiring internal lock instead of
4393 2004-05-18 Jakub Jelinek <jakub@redhat.com>
4395 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4397 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4398 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4399 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4400 (pthread_cond_t): Add __data.__broadcast_seq field.
4401 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4402 (FRAME_SIZE): Define.
4403 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
4405 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4407 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
4409 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4410 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
4413 2004-05-18 Ulrich Drepper <drepper@redhat.com>
4415 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4416 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4417 Add __broadcast_seq field.
4418 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4419 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4420 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4421 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4422 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4423 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4424 all waiters as woken with woken_seq and bump broadcast counter.
4425 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4426 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4427 __broadcast_seq field.
4428 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4429 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4430 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4431 * pthread_cond_init.c: Initialize __broadcast_seq field.
4432 * Makefile (tests): Add tst-cond17 and tst-cond18.
4433 Add .NOTPARALLEL goal.
4434 * tst-cond16.c: New file. From Jakub.
4435 * tst-cond17.c: New file. From Jakub.
4436 * tst-cond18.c: New file. From Jakub.
4438 2004-05-16 Ulrich Drepper <drepper@redhat.com>
4440 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4443 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4444 Parametrize frame size. Correct some unwind info.
4445 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4447 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4449 * tst-stack3.c: Note testing functionality beyond POSIX.
4451 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4453 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4454 Change conditional from ifdef to if.
4456 2004-04-23 Jakub Jelinek <jakub@redhat.com>
4458 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4459 SYSDEP_CANCEL_ERROR): Define.
4462 2004-05-01 Jakub Jelinek <jakub@redhat.com>
4464 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4466 2004-04-20 Jakub Jelinek <jakub@redhat.com>
4468 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4470 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4472 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4473 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4474 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4475 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4477 2004-04-19 Ulrich Drepper <drepper@redhat.com>
4479 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4480 thread has all signals blocked.
4482 2004-04-18 Andreas Jaeger <aj@suse.de>
4484 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4485 (SEM_VALUE_MAX): Add missing brace.
4487 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4489 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4491 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4492 * sysdeps/pthread/tst-mqueue8x.c: New test.
4493 * tst-cancel4.c: Update comment about message queues.
4495 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4496 return it_value { 0, 0 }.
4497 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4499 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4500 assertion for SIGEV_NONE.
4501 (thread_attr_compare): Compare all attributes, not just a partial
4504 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4506 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4508 2004-04-17 Ulrich Drepper <drepper@redhat.com>
4510 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4511 Just use a plain number.
4512 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4513 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4514 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4515 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4516 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4517 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4518 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4520 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4522 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4524 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4526 2004-04-15 Jakub Jelinek <jakub@redhat.com>
4528 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4529 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4530 of calling sigwaitinfo.
4532 2004-04-16 Ulrich Drepper <drepper@redhat.com>
4534 * allocatestack.c (allocate_stack): Set reported_guardsize
4536 * pthread_getattr_np.c (pthread_getattr_np): Use
4537 reported_guardsize instead of guardsize.
4538 * descr.h (struct pthread): Add reported_guardsize field.
4540 2004-04-13 Jakub Jelinek <jakub@redhat.com>
4542 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4544 2004-04-12 Ulrich Drepper <drepper@redhat.com>
4546 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4548 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4550 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4551 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4552 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4553 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4554 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4556 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4557 (_POSIX_MESSAGE_PASSING): Define.
4558 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4559 (_POSIX_MESSAGE_PASSING): Define.
4560 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4561 (_POSIX_MESSAGE_PASSING): Define.
4563 2004-04-04 Ulrich Drepper <drepper@redhat.com>
4565 * tst-context1.c (fct): Check whether correct stack is used.
4567 2004-04-03 Ulrich Drepper <drepper@redhat.com>
4569 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4570 matching constraints for asm mem parameters.
4572 * tst-clock2.c (tf): Don't define unless needed.
4574 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
4576 * Makefile (link-libc-static): Use $(static-gnulib) instead of
4579 2004-03-30 Ulrich Drepper <drepper@redhat.com>
4581 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4582 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4583 * pthreadP.h: Declare __nptl_deallocate_tsd.
4584 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4587 * Makefile (tests): Add tst-tsd5.
4588 * tst-tsd5.c: New file.
4590 2004-03-29 Ulrich Drepper <drepper@redhat.com>
4592 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4593 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4594 is SHLIB_COMPAT check.
4595 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4596 (__pthread_attr_getaffinity_old): Likewise.
4597 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4598 (__pthread_getaffinity_old): Likewise.
4599 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4600 (__pthread_setaffinity_old): Likewise.
4602 2004-03-26 Ulrich Drepper <drepper@redhat.com>
4604 * allocatestack.c (_make_stacks_executable): Call
4605 _dl_make_stack_executable first.
4607 2004-03-24 Roland McGrath <roland@redhat.com>
4609 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4610 constraint instead of "0".
4612 2004-03-24 Ulrich Drepper <drepper@redhat.com>
4614 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4615 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4617 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4618 code to avoid warning.
4620 2004-03-24 Andreas Jaeger <aj@suse.de>
4622 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4623 (__pthread_attr_setaffinity_old): Remove const.
4625 2004-03-23 Ulrich Drepper <drepper@redhat.com>
4627 * sysdeps/unix/sysv/linux/smp.h: New file.
4628 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4629 * init.c: Define __is_smp.
4630 (__pthread_initialize_minimal_internal): Call is_smp_system to
4631 initialize __is_smp.
4632 * pthreadP.h: Declare __is_smp.
4633 Define MAX_ADAPTIVE_COUNT is necessary.
4634 * pthread_mutex_init.c: Add comment regarding __spins field.
4635 * pthread_mutex_lock.c: Implement adaptive mutex type.
4636 * pthread_mutex_timedlock.c: Likewise.
4637 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4638 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4640 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4641 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4642 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4643 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4644 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4645 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4646 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4647 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4648 lll_mutex_cond_trylock.
4649 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4650 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4651 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4652 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4653 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4654 Define BUSY_WAIT_NOP.
4655 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4656 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4658 * tst-mutex5.c: Add support for testing adaptive mutexes.
4659 * tst-mutex7.c: Likewise.
4660 * tst-mutex5a.c: New file.
4661 * tst-mutex7a.c: New file.
4662 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4664 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4665 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4666 vgettimeofday call might destroy the content.
4668 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4671 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4672 No need to restrict type of ret. Make it int. Add comment.
4674 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4675 Remove unnecessary setne instruction.
4677 2004-03-22 Jakub Jelinek <jakub@redhat.com>
4679 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4680 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4681 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4682 If realloc fails, break out of the loop.
4684 2004-03-20 Andreas Jaeger <aj@suse.de>
4686 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4687 (__pthread_setaffinity_old): Fix interface.
4688 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4689 (__pthread_getaffinity_old): Likewise.
4691 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4692 (__pthread_setaffinity_new): Remove duplicate declaration.
4694 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4696 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4697 the return value to a safe register.
4698 (CDISABLE): Set the function argument correctly.
4700 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4702 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4703 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4704 Rewrite so that only one locked memory operation per round is needed.
4705 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4706 (pthread_barrier_wait): After wakeup, release lock only when the
4707 last thread stopped using the barrier object.
4708 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4709 (__pthread_cond_wait): Don't store mutex address if the current
4710 value is ~0l. Add correct cleanup support and unwind info.
4711 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4712 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4713 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4714 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4715 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4716 Add correct cleanup support and unwind info.
4717 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4718 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4719 information for syscall wrappers.
4721 2004-03-18 Ulrich Drepper <drepper@redhat.com>
4723 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4724 cpusetsize field, remove next.
4725 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4726 parameter for size of the CPU set.
4727 (pthread_setaffinity_np): Likewise.
4728 (pthread_attr_getaffinity_np): Likewise.
4729 (pthread_attr_setaffinity_np): Likewise.
4730 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4731 interface change, keep compatibility code.
4732 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4733 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4734 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4735 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
4736 __pthread_getaffinity_np.
4737 * Versions: Add version for changed interfaces.
4738 * tst-attr3.c: Adjust test for interface change.
4739 * pthread_getattr_np.c: Query the kernel about the affinity mask with
4740 increasing buffer sizes.
4741 * pthread_attr_destroy.c: Remove unused list handling.
4742 * pthread_attr_init.c: Likewise.
4744 2004-03-17 Roland McGrath <roland@redhat.com>
4746 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4747 first argument to clock_getres so we ever enable kernel timers.
4749 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
4751 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4753 2004-03-12 Richard Henderson <rth@redhat.com>
4755 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4756 oldvalue from CENABLE to CDISABLE.
4758 2004-03-12 Ulrich Drepper <drepper@redhat.com>
4760 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4761 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4762 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4763 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4765 2004-03-11 Richard Henderson <rth@redhat.com>
4767 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4768 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4769 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4771 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4773 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4774 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4775 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4777 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4779 * forward.c (__pthread_cond_broadcast_2_0,
4780 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4781 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4782 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4784 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4786 * sysdeps/sh/tcb-offsets.sym: Add PID.
4787 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4788 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4790 2004-03-10 Ulrich Drepper <drepper@redhat.com>
4792 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4793 include <sysdep-cancel.h>, vfork is no cancellation point.
4794 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4795 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4796 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4798 2004-03-10 Jakub Jelinek <jakub@redhat.com>
4800 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4802 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4803 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4805 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4807 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4808 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4809 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4810 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4811 of DO_CALL_VIA_BREAK. Work around a gas problem.
4813 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4814 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4815 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4816 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4817 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4818 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4820 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4821 a local register for saving old PID. Negate PID in parent upon exit.
4823 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4825 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4826 before syscall, set to the old value in the parent afterwards.
4827 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4828 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4830 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4831 before syscall, set to the old value in the parent afterwards.
4832 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4833 * sysdeps/s390/tcb-offsets.sym: Add PID.
4835 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4836 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4837 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4838 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4839 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4840 * sysdeps/sparc/tcb-offsets.sym: Add PID.
4842 2004-03-10 Andreas Schwab <schwab@suse.de>
4844 * sysdeps/ia64/tcb-offsets.sym: Add PID.
4845 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4846 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4848 2004-03-09 Jakub Jelinek <jakub@redhat.com>
4850 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4851 * tst-cancel21.c (do_one_test): Likewise.
4852 Reported by Gordon Jin <gordon.jin@intel.com>.
4854 2004-02-09 Jakub Jelinek <jakub@redhat.com>
4856 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4857 if non-zero and set to INT_MIN if zero.
4858 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4859 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4860 (SAVE_PID, RESTORE_PID): Define.
4862 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4863 Use relative path to avoid including NPTL i386/vfork.S.
4864 (SAVE_PID, RESTORE_PID): Define.
4865 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4866 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4867 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4869 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4870 * tst-vfork1.c: New test.
4871 * tst-vfork2.c: New test.
4872 * tst-vfork1x.c: New test.
4873 * tst-vfork2x.c: New test.
4875 2004-03-08 Ulrich Drepper <drepper@redhat.com>
4877 * sysdeps/i386/tcb-offsets.sym: Add PID.
4878 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4879 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4880 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4882 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
4884 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4886 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
4888 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4891 2004-03-07 Ulrich Drepper <drepper@redhat.com>
4893 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4896 * tst-once4.c: Remove unnecessary macro definition.
4898 * tst-mutex7.c (do_test): Limit thread stack size.
4899 * tst-once2.c (do_test): Likewise.
4900 * tst-tls3.c (do_test): Likewise.
4901 * tst-tls1.c (do_test): Likewise.
4902 * tst-signal3.c (do_test): Likewise.
4903 * tst-kill6.c (do_test): Likewise.
4904 * tst-key4.c (do_test): Likewise.
4905 * tst-join4.c (do_test): Likewise.
4906 * tst-fork1.c (do_test): Likewise.
4907 * tst-context1.c (do_test): Likewise.
4908 * tst-cond2.c (do_test): Likewise.
4909 * tst-cond10.c (do_test): Likewise.
4910 * tst-clock2.c (do_test): Likewise.
4911 * tst-cancel10.c (do_test): Likewise.
4912 * tst-basic2.c (do_test): Likewise.
4913 * tst-barrier4.c (do_test): Likewise.
4915 2004-03-05 Ulrich Drepper <drepper@redhat.com>
4917 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4919 2004-03-01 Ulrich Drepper <drepper@redhat.com>
4921 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4922 (__pthread_cond_timedwait): Optimize wakeup test.
4923 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4924 (__pthread_cond_wait): Likewise.
4925 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4926 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4929 2004-02-29 Ulrich Drepper <drepper@redhat.com>
4931 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4932 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
4933 the atomic instruction needed.
4934 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4935 (__lll_mutex_lock_wait): Likewise.
4937 2004-02-28 Ulrich Drepper <drepper@redhat.com>
4939 * Makefile (tests): Add tst-cond14 and tst-cond15.
4940 * tst-cond14.c: New file.
4941 * tst-cond15.c: New file.
4943 2004-02-27 Ulrich Drepper <drepper@redhat.com>
4945 * sysdeps/pthread/createthread.c (create_thread): Remove use of
4946 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
4947 needs to be implemented differently to be useful.
4949 2004-02-26 Ulrich Drepper <drepper@redhat.com>
4951 * pthread_attr_setschedparam.c: Don't test priority against limits
4952 here. Set ATTR_FLAG_SCHED_SET flag.
4953 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4954 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4955 from parent thread to child. If attribute is used and scheduling
4956 parameters are not inherited, copy parameters from attribute or
4957 compute them. Check priority value.
4958 * pthread_getschedparam.c: If the parameters aren't known yet get
4959 them from the kernel.
4960 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4961 ATTR_FLAG_POLICY_SET flag for thread.
4962 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4963 and ATTR_FLAG_POLICY_SET.
4965 * sysdeps/pthread/createthread.c: Use tgkill if possible.
4967 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4968 fail if stack address hasn't been set. Just return 0.
4970 2004-02-25 Ulrich Drepper <drepper@redhat.com>
4972 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
4973 libpthread for the files in this list.
4974 (CFLAGS-tst-unload): Removed.
4975 * tst-unload.c (do_test): Don't use complete path for
4978 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4981 2004-02-22 Ulrich Drepper <drepper@redhat.com>
4983 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4984 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4985 operation per round is needed.
4986 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4987 (__lll_mutex_lock_wait): Likewise.
4989 2004-02-20 Ulrich Drepper <drepper@redhat.com>
4991 * tst-cancel9.c (cleanup): Don't print to stderr.
4993 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4995 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4997 2004-02-20 Jakub Jelinek <jakub@redhat.com>
4999 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5000 (__syscall_error_handler2): Call CDISABLE.
5001 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5002 (__syscall_error_handler2): Call CDISABLE.
5004 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5005 Release lock before the loop, don't reacquire it.
5007 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5009 2004-02-19 Andreas Schwab <schwab@suse.de>
5011 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5014 2004-02-18 Ulrich Drepper <drepper@redhat.com>
5016 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5017 (pthread_barrier_wait): After wakeup, release lock only when the
5018 last thread stopped using the barrier object.
5019 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5020 (pthread_barrier_wait): Likewise.
5021 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5023 * Makefile (tests): Add tst-barrier4.
5024 * tst-barrier4.c: New file.
5026 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5027 (__pthread_cond_timedwait): Perform timeout test while holding
5028 internal lock to prevent wakeup race.
5029 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5030 * sysdeps/pthread/pthread_cond_timedwait.c
5031 (__pthread_cond_timedwait): Likewise.
5032 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5033 (__pthread_cond_timedwait): Likewise.
5035 2004-02-18 Jakub Jelinek <jakub@redhat.com>
5037 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5038 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5039 * Makefile (tests): Add tst-rwlock13.
5040 * tst-rwlock13.c: New test.
5042 2004-02-16 Ulrich Drepper <drepper@redhat.com>
5044 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5045 (__condvar_tw_cleanup): Little optimization.
5046 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5048 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
5050 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5051 libpthread as "lib" parameter to SHLIB_COMPAT.
5052 (__novmx_siglongjmp): Fix typo in function name.
5053 (__novmx_longjmp): Fix typo in function name.
5055 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5057 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5060 * sysdeps/generic/pt-longjmp.c: Moved to...
5061 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
5063 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
5065 * Makefile (libpthread-routines): Add pt-cleanup.
5066 * pt-longjmp.c: Removed.
5067 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5068 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5069 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5070 Version longjmp, siglongjmp for GLIBC_2.3.4.
5071 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5073 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5075 * sysdeps/pthread/pthread_cond_timedwait.c
5076 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
5077 Reuse code. Add __builtin_expects.
5079 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5080 (__pthread_cond_timedwait): Get internal lock in case timeout has
5081 passed before the futex syscall.
5082 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5084 2004-01-20 Ulrich Drepper <drepper@redhat.com>
5086 * allocatestack.c: Pretty printing.
5088 * sysdeps/pthread/createthread.c (create_thread): Don't add
5089 CLONE_DETACHED bit if it is not necessary.
5091 2004-01-16 Ulrich Drepper <drepper@redhat.com>
5093 * pthread_getattr_np.c: Include ldsodefs.h.
5095 2004-01-16 Richard Henderson <rth@redhat.com>
5097 * allocatestack.c: Don't declare __libc_stack_end.
5098 * init.c (__pthread_initialize_minimal_internal): Likewise.
5099 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5101 2004-01-15 Richard Henderson <rth@redhat.com>
5103 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5104 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5105 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5106 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5107 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5108 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5109 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5110 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5112 2004-01-14 Ulrich Drepper <drepper@redhat.com>
5114 * init.c (pthread_functions): Make array const.
5116 2004-01-13 Ulrich Drepper <drepper@redhat.com>
5118 * allocatestack.c (__make_stacks_executable): Change interface.
5119 Check parameters. Pass parameter on to libc counterpart.
5120 * pthreadP.h: Change declaration.
5122 2004-01-13 Richard Henderson <rth@redhat.com>
5124 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5126 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5129 * sysdeps/alpha/Makefile: New file.
5130 * sysdeps/alpha/tcb-offsets.sym: New file.
5131 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5132 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5134 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5137 2004-01-08 Jakub Jelinek <jakub@redhat.com>
5139 * Makefile (tests): Add tst-backtrace1.
5140 * tst-backtrace1.c: New test.
5142 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
5144 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5145 register as second parameter to the REGISTER macro.
5146 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5147 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5148 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5149 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5150 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5151 of thread register as second parameter to REGISTER macro in 64 case.
5153 2004-01-03 Ulrich Drepper <drepper@redhat.com>
5155 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5156 (CFLAGS-getpid.o): Defined.
5157 (CFLAGS-getpid.os): Defined.
5159 2003-12-31 Ulrich Drepper <drepper@redhat.com>
5161 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5162 returned for main thread does not overlap with any other VMA.
5163 Patch by Jakub Jelinek.
5165 2003-12-29 Jakub Jelinek <jakub@redhat.com>
5167 * tst-raise1.c: Include stdio.h.
5169 2003-12-23 Jakub Jelinek <jakub@redhat.com>
5171 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5172 setting with __ASSUME_TGKILL || defined __NR_tgkill.
5173 If pid is 0, set it to selftid.
5174 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5175 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
5176 != 0, return self->tid without doing a syscall.
5177 * descr.h (struct pthread): Move pid field after tid.
5179 * Makefile (tests): Add tst-raise1.
5180 * tst-raise1.c: New file.
5182 2003-12-23 Roland McGrath <roland@redhat.com>
5184 * tst-oddstacklimit.c: New file.
5185 * Makefile (tests): Add it.
5186 (tst-oddstacklimit-ENV): New variable.
5188 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5189 value up to page size for __default_stacksize.
5191 2003-12-21 Ulrich Drepper <drepper@redhat.com>
5193 * Makefile (tests): Add tst-eintr5.
5194 * tst-eintr5.c: New file.
5196 * eintr.c (eintr_source): Prevent sending signal to self.
5198 * tst-eintr2.c (tf1): Improve error message.
5200 2003-12-20 Ulrich Drepper <drepper@redhat.com>
5202 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5203 * sysdeps/unix/sysv/linux/getpid.c: New file.
5204 * pthread_cancel.c: Add comment explaining use of PID field.
5205 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5206 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5207 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5208 temporarily to signal the field must not be relied on and updated
5210 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5211 temporarily negative.
5212 * sysdeps/unix/sysv/linux/raise.c: Likewise.
5214 2003-12-19 Ulrich Drepper <drepper@redhat.com>
5216 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
5217 (eintr_source): If ARG != NULL, use pthread_kill.
5218 * tst-eintr1.c: Adjust for this change.
5219 * tst-eintr2.c: Likewise.
5220 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5221 * tst-eintr3.c: New file.
5222 * tst-eintr4.c: New file.
5224 2003-12-19 Jakub Jelinek <jakub@redhat.com>
5226 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5227 if CANCELSTATE_BITMASK is set.
5228 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5231 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5232 (tests-reverse): Add tst-cancel23.
5233 * tst-cancel22.c: New test.
5234 * tst-cancel23.c: New test.
5236 2003-12-18 Ulrich Drepper <drepper@redhat.com>
5238 * tst-eintr1.c: Better error messages.
5240 * Makefile (tests): Add tst-eintr2.
5241 * tst-eintr2.c: New file.
5243 2003-12-18 Jakub Jelinek <jakub@redhat.com>
5245 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5246 (CFLAGS-tst-cancelx21.c): Set.
5247 * tst-cancel21.c: New test.
5248 * tst-cancelx21.c: New test.
5250 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
5252 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5253 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
5254 * pt-longjmp.c: Include jmpbuf-unwind.h.
5255 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5256 _JMPBUF_UNWINDS. Adjust compared pointers.
5257 * init.c (__pthread_initialize_minimal_internal): Initialize
5258 pd->stackblock_size.
5259 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5260 * sysdeps/alpha/jmpbuf-unwind.h: New file.
5261 * sysdeps/i386/jmpbuf-unwind.h: New file.
5262 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5263 * sysdeps/s390/jmpbuf-unwind.h: New file.
5264 * sysdeps/sh/jmpbuf-unwind.h: New file.
5265 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5266 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5267 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5268 (_JMPBUF_CFA_UNWINDS): Remove.
5269 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5271 2003-12-12 Jakub Jelinek <jakub@redhat.com>
5273 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5274 (CFLAGS-tst-cancelx20.c): Set.
5275 * tst-cancel20.c: New test.
5276 * tst-cancelx20.c: New test.
5278 2003-12-17 Ulrich Drepper <drepper@redhat.com>
5280 * init.c (__pthread_initialize_minimal_internal): Don't treat
5281 architectures with separate register stack special here when
5282 computing default stack size.
5284 2003-12-17 Roland McGrath <roland@redhat.com>
5286 * Makefile (tst-cancelx7-ARGS): New variable.
5287 Reportd by Greg Schafer <gschafer@zip.com.au>.
5289 2003-12-17 Jakub Jelinek <jakub@redhat.com>
5291 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
5292 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5293 (tst-stack3-ENV): Set.
5294 ($(objpfx)tst-stack3-mem): New.
5295 * tst-stack3.c: New test.
5297 2003-12-10 David Mosberger <davidm@hpl.hp.com>
5299 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5300 Add unwind directives. Drop unused .regstk directive.
5301 (_fini_EPILOG_BEGINS): Add unwind directives.
5303 2003-12-11 Ulrich Drepper <drepper@redhat.com>
5305 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5306 Assume parameter is a pointer.
5307 (lll_futex_wake): Likewise.
5308 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5310 (lll_futex_wake): Likewise.
5311 Reported by Boris Hu.
5312 * sysdeps/unix/sysv/linux/unregister-atfork.c
5313 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5315 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5317 2003-12-10 Ulrich Drepper <drepper@redhat.com>
5319 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5320 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5321 __rtld_lock_initialize for ld.so lock.
5322 Patch in part by Adam Li <adam.li@intel.com>.
5324 2003-12-02 David Mosberger <davidm@hpl.hp.com>
5326 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5327 in $(gnulib). Also, remove stale comment.
5329 2003-11-12 David Mosberger <davidm@hpl.hp.com>
5331 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5332 advantage of new syscall stub and optimize accordingly.
5334 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5335 from SYS_futex, to match expectations of
5336 sysdep.h:DO_INLINE_SYSCALL.
5337 (lll_futex_clobbers): Remove.
5338 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5339 (lll_futex_wake): Likewise.
5340 (lll_futex_requeue): Likewise.
5341 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5342 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5344 (__lll_mutex_lock): Likewise.
5345 (__lll_mutex_cond_lock): Likewise.
5346 (__lll_mutex_timed_lock): Likewise.
5347 (__lll_mutex_unlock): Likewise.
5348 (__lll_mutex_unlock_force): Likewise.
5350 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5351 comes before the include of <sysdep.h>.
5352 (THREAD_SELF_SYSINFO): New macro.
5353 (THREAD_SYSINFO): Likewise.
5354 (INIT_SYSINFO): New macro.
5355 (TLS_INIT_TP): Call INIT_SYSINFO.
5357 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5359 * sysdeps/pthread/createthread.c (create_thread): Use
5360 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5361 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5362 THREAD_SELF_SYSINFO instead of open code.
5363 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5364 (THREAD_SYSINFO): Likewise.
5366 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5368 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5370 2003-12-06 Ulrich Drepper <drepper@redhat.com>
5372 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5373 instead of .init. Patch by David Mosberger.
5375 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
5377 * sysdeps/pthread/configure.in: Remove broken declaration in C
5378 cleanup handling check.
5380 2003-11-30 Andreas Jaeger <aj@suse.de>
5382 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5383 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5386 2003-11-27 Jakub Jelinek <jakub@redhat.com>
5388 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5389 * pthread_attr_destroy.c: Include shlib-compat.h.
5390 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5391 is set in iattr->flags.
5392 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5394 2003-11-21 Jakub Jelinek <jakub@redhat.com>
5396 * Makefile (distribute): Add tst-cleanup4aux.c.
5398 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
5401 2003-11-21 Ulrich Drepper <drepper@redhat.com>
5403 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5404 pthread_cond_signal.
5406 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5407 store mutex address if the current value is ~0l.
5408 * sysdeps/pthread/pthread_cond_timedwait.c
5409 (__pthread_cond_timedwait): Likewise.
5410 * sysdeps/pthread/pthread_cond_broadcast.c
5411 (__pthread_cond_broadcast): Don't use requeue for pshared
5414 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5415 (__pthread_cond_wait): Don't store mutex address if the current
5417 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5418 (__pthread_cond_timedwait): Likewise.
5419 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5420 (__pthread_cond_broadcast): Don't use requeue for pshared
5423 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5424 element with ~0l for pshared condvars, with NULL otherwise.
5426 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5427 (__pthread_cond_wait): Don't store mutex address if the current
5429 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5430 (__pthread_cond_timedwait): Likewise.
5431 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5432 (__pthread_cond_broadcast): Don't use requeue for pshared
5435 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5436 * tst-cond12.c: New file.
5437 * tst-cond13.c: New file.
5439 2003-11-17 Ulrich Drepper <drepper@redhat.com>
5441 * sysdeps/pthread/configure.in: Make missing forced unwind support
5444 2003-11-11 Ulrich Drepper <drepper@redhat.com>
5446 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5448 2003-11-06 Ulrich Drepper <drepper@redhat.com>
5450 * Makefile: Add magic to clean up correctly.
5452 2003-11-05 Jakub Jelinek <jakub@redhat.com>
5454 * unwind.c (FRAME_LEFT): Define.
5455 (unwind_stop): Handle old style cleanups here.
5456 (__pthread_unwind): Handle old style cleanups only if
5457 !HAVE_FORCED_UNWIND.
5458 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5459 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5460 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5461 ($(objpfx)tst-cleanupx4): Likewise.
5462 * tst-cleanup4.c: New test.
5463 * tst-cleanup4aux.c: New.
5464 * tst-cleanupx4.c: New test.
5466 2003-11-04 Ulrich Drepper <drepper@redhat.com>
5468 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5469 lll_mutex_*lock macros to skip atomic operations on some archs.
5471 2003-11-03 Ulrich Drepper <drepper@redhat.com>
5473 * sysdeps/pthread/tst-timer.c (main): Initialize
5474 sigev2.sigev_value as well.
5476 2003-10-15 Roland McGrath <roland@redhat.com>
5478 * sysdeps/pthread/configure.in: Barf if visibility attribute support
5480 * sysdeps/pthread/configure: Regenerated.
5482 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5484 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5485 locking macros. No distinction between normal and mutex locking
5487 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5488 Merge bits from lowlevelmutex.S we still need.
5489 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5490 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5491 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5492 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5493 new mutex implementation.
5494 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5495 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5496 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5497 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5498 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5499 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5500 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5501 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5502 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5503 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5504 symbol for entry point to avoid cancellation.
5506 2003-10-07 Jakub Jelinek <jakub@redhat.com>
5508 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5510 (SAVE_OLDTYPE_0): Fix a typo.
5512 2003-10-03 Ulrich Drepper <drepper@redhat.com>
5514 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5515 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
5517 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5519 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5522 2003-10-02 Jakub Jelinek <jakub@redhat.com>
5524 * Makefile (tests): Add tst-cancel19.
5525 * tst-cancel19.c: New test.
5527 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5529 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5530 restoring of the old cancellation type.
5532 2003-09-30 Jakub Jelinek <jakub@redhat.com>
5534 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5536 2003-09-27 Wolfram Gloger <wg@malloc.de>
5538 * sysdeps/pthread/malloc-machine.h: New file
5540 2003-09-24 Roland McGrath <roland@redhat.com>
5542 * allocatestack.c (__make_stacks_executable): Don't ignore return
5543 value from _dl_make_stack_executable.
5545 2003-09-24 Ulrich Drepper <drepper@redhat.com>
5547 * allocatestack.c (__make_stacks_executable): Also change
5548 permission of the currently unused stacks.
5550 * allocatestack.c (change_stack_perm): Split out from
5551 __make_stacks_executable.
5552 (allocate_stack): If the required permission changed between the time
5553 we started preparing the stack and queueing it, change the permission.
5554 (__make_stacks_executable): Call change_stack_perm.
5556 * Makefile: Build tst-execstack-mod locally.
5557 * tst-execstack-mod.c: New file.
5559 2003-09-23 Jakub Jelinek <jakub@redhat.com>
5561 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5563 2003-09-23 Roland McGrath <roland@redhat.com>
5565 * tst-execstack.c: New file.
5566 * Makefile (tests): Add it.
5567 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5568 (LDFLAGS-tst-execstack): New variable.
5570 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5571 whether to use PROT_EXEC for stack mmap.
5572 (__make_stacks_executable): New function.
5573 * pthreadP.h: Declare it.
5574 * init.c (__pthread_initialize_minimal_internal): Set
5575 GL(dl_make_stack_executable_hook) to that.
5577 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5579 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5580 recommendation from AMD re avoidance of lock prefix.
5582 2003-09-22 Jakub Jelinek <jakub@redhat.com>
5584 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5585 lll_futex_timed_wait instead of lll_futex_wait.
5586 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5587 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5588 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5589 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5590 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5591 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5592 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5593 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5594 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5595 Completely revamp the locking macros. No distinction between
5596 normal and mutex locking anymore.
5597 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5598 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5599 __lll_lock_timedwait): Fix prototypes.
5600 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5601 __lll_lock_timedwait): Likewise.
5602 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5603 macros, add __builtin_expect.
5604 (lll_mutex_timedlock): Likewise. Fix return value.
5605 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5606 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5607 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5608 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5609 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5610 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5611 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5612 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5614 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5616 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5617 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5618 operation if possible.
5620 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5621 like jumping over the lock prefix.
5623 2003-09-21 Ulrich Drepper <drepper@redhat.com>
5625 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5626 locking macros. No distinction between normal and mutex locking
5628 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5629 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5630 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5631 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5632 locking. Merge bits from lowlevelmutex.S we still need.
5633 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5634 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5635 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5636 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5637 * Makefile (routines): Remove libc-lowlevelmutex.
5638 (libpthread-rountines): Remove lowlevelmutex.
5639 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5640 for new mutex implementation.
5641 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5642 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5643 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5644 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5645 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5647 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5649 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5650 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5651 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5652 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5653 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5654 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5655 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5656 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5658 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5660 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5661 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5662 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5664 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5665 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5667 2003-09-20 Ulrich Drepper <drepper@redhat.com>
5669 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5670 in parameters of asm with output parameters.
5672 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5673 type of DECR parameter to int.
5674 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5676 2003-09-18 Jakub Jelinek <jakub@redhat.com>
5678 * tst-attr3.c (tf, do_test): Print stack start/end/size and
5679 guardsize for each thread.
5681 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5683 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5684 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5685 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5687 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5688 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5690 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5691 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5692 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5693 (pthread_getaffinity_np): Add hidden_def.
5695 * Makefile (tests): Add tst-attr3.
5696 * tst-attr3.c: New test.
5698 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5700 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5702 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5703 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5705 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5707 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5708 * tst-align.c: Include tst-stack-align.h.
5709 (tf, do_test): Use TEST_STACK_ALIGN macro.
5711 2003-09-17 Ulrich Drepper <drepper@redhat.com>
5713 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5716 2003-09-16 Ulrich Drepper <drepper@redhat.com>
5718 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5719 stack-related values for the initial thread.
5721 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5723 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5725 2003-09-11 Ulrich Drepper <drepper@redhat.com>
5727 * pthread_mutex_lock.c: Minor code rearrangements.
5729 2003-09-05 Roland McGrath <roland@redhat.com>
5731 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5732 Instead, include ../nptl_db/db_info.c to do its magic.
5733 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5734 (__pthread_pthread_key_2ndlevel_size): Likewise.
5735 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5736 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5737 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5738 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5739 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5740 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5741 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5742 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5743 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5744 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5745 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5746 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5747 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5748 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5749 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5750 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5751 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5753 2003-09-08 Ulrich Drepper <drepper@redhat.com>
5755 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5756 of pthread_t to be compatible with LT.
5757 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5758 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5759 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5760 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5761 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5762 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5763 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5765 2003-09-04 Ulrich Drepper <drepper@redhat.com>
5767 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5769 2003-09-04 Jakub Jelinek <jakub@redhat.com>
5771 * unwind-forcedunwind.c: Move to...
5772 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5773 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5774 * sysdeps/pthread/jmpbuf-unwind.h: New file.
5775 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5776 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5777 * unwind.c: Include jmpbuf-unwind.h.
5778 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5780 2003-09-02 Jakub Jelinek <jakub@redhat.com>
5782 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5783 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5784 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5785 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5786 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5787 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5788 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5789 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5790 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5791 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5792 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5794 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5795 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5796 * Makefile (tests): Add tst-stack2.
5797 * tst-stack2.c: New test.
5798 * tst-stack1.c: Include limits.h and sys/param.h.
5799 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5801 * pthread_condattr_setpshared.c: Include errno.h.
5802 (pthread_condattr_setpshared): Return EINVAL if pshared
5803 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5805 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5806 defined symbol for entry point to avoid cancellation.
5807 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5809 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5811 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5813 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5815 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5817 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5818 __close_nocancel, __read_nocancel, __write_nocancel,
5819 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
5820 libpthread.so or librt.so, define to corresponding function
5821 without _nocancel suffix.
5822 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5823 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5824 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5826 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5828 2003-09-02 Ulrich Drepper <drepper@redhat.com>
5830 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5831 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5833 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5834 in subsections has a symbol associated with it.
5836 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5837 defined symbol for entry point to avoid cancellation.
5838 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5840 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5842 * Makefile (tests): Add tst-tls5.
5843 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5844 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5845 ($(objpfx)tst-tls5): New.
5846 ($(objpfx)tst-tls6.out): Likewise.
5847 (tests): Depend on $(objpfx)tst-tls6.out.
5848 * tst-tls3.c: Include stdint.h and pthreaddef.h.
5849 (do_test): Check pthread_self () return value alignment.
5850 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5851 (tf): Check pthread_self () return value alignment.
5852 * tst-tls5.c: New test.
5854 * tst-tls5mod.c: New.
5855 * tst-tls5moda.c: New.
5856 * tst-tls5modb.c: New.
5857 * tst-tls5modc.c: New.
5858 * tst-tls5modd.c: New.
5859 * tst-tls5mode.c: New.
5860 * tst-tls5modf.c: New.
5861 * tst-tls6.sh: New test.
5863 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5864 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5865 * init.c (pthread_functions): Initialize them.
5866 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5867 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5868 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5869 pthread_cond_timedwait@@GLIBC_2.3.2.
5871 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5873 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5874 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5875 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5876 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5877 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5878 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5880 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5882 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5883 _POSIX_THREAD_PRIORITY_SCHEDULING.
5884 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5886 2003-08-31 Ulrich Drepper <drepper@redhat.com>
5888 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5889 nested function, use static inline function from libio.h.
5890 Code by Richard Henderson.
5892 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5895 2003-08-30 Jakub Jelinek <jakub@redhat.com>
5897 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5898 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5899 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5900 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5901 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5902 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5903 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5904 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5905 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5906 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5907 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5908 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5909 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5910 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5911 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5912 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5913 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5914 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5915 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5916 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5917 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5918 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5919 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5920 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5921 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5922 * sysdeps/sparc/tls.h: New file.
5923 * sysdeps/sparc/tcb-offsets.sym: New file.
5924 * sysdeps/sparc/Makefile: New file.
5925 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5926 * init.c [__sparc__] (__NR_set_tid_address): Define.
5928 2003-08-29 Jakub Jelinek <jakub@redhat.com>
5930 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5931 _IO_release_lock): Define.
5933 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
5935 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5936 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
5938 2003-08-27 Ulrich Drepper <drepper@redhat.com>
5940 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5941 (__pthread_cleanup_class): Add missing return types of member
5944 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
5946 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5947 (lll_mutex_unlock_force): Add memory barrier between store and futex
5950 2003-08-25 Ulrich Drepper <drepper@redhat.com>
5952 * tst-cancel4.c (do_test): Also unlink tempfname and remove
5953 tempmsg in first loop.
5955 2003-08-18 Ulrich Drepper <drepper@redhat.com>
5957 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5958 _POSIX_THREAD_PRIORITY_SCHEDULING.
5959 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5961 2003-08-07 Jakub Jelinek <jakub@redhat.com>
5963 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5964 (__rtld_lock_default_lock_recursive,
5965 __rtld_lock_default_unlock_recursive): Define.
5966 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5967 __rtld_lock_unlock_recursive): Define using
5968 GL(_dl_rtld_*lock_recursive).
5969 * init.c (__pthread_initialize_minimal_internal): Initialize
5970 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5971 Lock GL(_dl_load_lock) the same number of times as
5972 GL(_dl_load_lock) using non-mt implementation was nested.
5974 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5975 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5977 2003-08-06 Jakub Jelinek <jakub@redhat.com>
5979 * tst-cancel17.c (do_test): Make len2 maximum of page size and
5982 2003-08-07 Jakub Jelinek <jakub@redhat.com>
5984 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5986 2003-08-03 Jakub Jelinek <jakub@redhat.com>
5988 * sysdeps/pthread/createthread.c (do_clone): Move error handling
5989 to first syscall error check. Move syscall error check for tkill
5990 into __ASSUME_CLONE_STOPPED #ifdef.
5992 2003-08-02 Ulrich Drepper <drepper@redhat.com>
5994 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5995 is not defined, do explicit synchronization.
5996 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
5997 is not defined also unlock pd->lock for non-debugging case in case
5999 * pthread_create.c (start_thread): Always get and release pd->lock
6000 if __ASSUME_CLONE_STOPPED is not defined.
6001 (start_thread_debug): Removed. Adjust users.
6002 * allocatestack.c (allocate_stack): Always initialize lock if
6003 __ASSUME_CLONE_STOPPED is not defined.
6004 * Makefile (tests): Add tst-sched1.
6005 * tst-sched1.c: New file.
6007 * sysdeps/pthread/createthread.c (do_clone): Only use
6008 sched_setschduler and pass correct parameters.
6010 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6012 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6013 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6014 PTHREAD_STACK_MIN in comments.
6016 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6018 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6019 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6021 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6022 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6023 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6024 (__pthread_cleanup_upto): Fix prototype.
6025 (_longjmp_unwind): Adjust caller.
6026 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6027 Change second argument to const struct pointer.
6028 * tst-sem8.c (main): Remove unused s2 and s3 variables.
6029 * tst-sem9.c (main): Likewise.
6030 * unwind.c: Include string.h for strlen prototype.
6032 2003-07-31 Ulrich Drepper <drepper@redhat.com>
6034 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6035 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6036 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6038 Patch by Nicholas Miell <nmiell@attbi.com>.
6040 2003-07-30 Jakub Jelinek <jakub@redhat.com>
6042 * init.c (__pthread_initialize_minimal_internal): Initialize
6043 GL(dl_init_static_tls).
6044 * pthreadP.h (__pthread_init_static_tls): New prototype.
6045 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6047 * Makefile (tests): Add tst-tls4.
6048 (modules-names): Add tst-tls4moda and tst-tls4modb.
6049 ($(objpfx)tst-tls4): Link against libdl and libpthread.
6050 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6052 * tst-tls4.c: New file.
6053 * tst-tls4moda.c: New file.
6054 * tst-tls4modb.c: New file.
6056 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
6058 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6059 before __timer_dealloc.
6060 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6061 Don't call list_unlink.
6063 2003-07-29 Roland McGrath <roland@redhat.com>
6065 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6067 2003-07-25 Jakub Jelinek <jakub@redhat.com>
6069 * tst-cancel17.c (do_test): Check if aio_cancel failed.
6070 Don't reuse struct aiocb A if it failed.
6071 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6072 not just one byte, as that does not block.
6074 2003-07-22 Jakub Jelinek <jakub@redhat.com>
6076 * sysdeps/pthread/unwind-resume.c: New file.
6077 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6078 unwind-resume in csu subdir.
6079 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6081 (librt-sysdep_routines, librt-shared-only-routines): Add
6083 * sysdeps/pthread/rt-unwind-resume.c: New file.
6084 * unwind-forcedunwind.c: New file.
6085 * Makefile (libpthread-routines): Add unwind-forcedunwind.
6086 (libpthread-shared-only-routines): Likewise.
6087 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6088 * pthreadP.h (pthread_cancel_init): New prototype.
6089 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6091 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6092 attr argument const struct pthread_attr *.
6094 * res.c (__res_state): Return __resp.
6095 * descr.h: Include resolv.h.
6096 (struct pthread): Add res field.
6097 * pthread_create.c: Include resolv.h.
6098 (start_thread): Initialize __resp.
6099 * Makefile (tests): Add tst-_res1.
6100 (module-names): Add tst-_res1mod1, tst-_res1mod2.
6101 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6102 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6104 * tst-_res1.c: New file.
6105 * tst-_res1mod1.c: New file.
6106 * tst-_res1mod2.c: New file.
6108 2003-07-21 Ulrich Drepper <drepper@redhat.com>
6110 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6112 * Makefile: Define various *-no-z-defs variables for test DSOs
6113 which has undefined symbols.
6115 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
6117 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6118 Retry if the stwcx fails to store once_control.
6120 2003-07-20 Ulrich Drepper <drepper@redhat.com>
6122 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6123 pthread_attr_setaffinity.
6124 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6125 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6126 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6127 * pthread_attr_destroy.c: Free cpuset element if allocated.
6128 * pthread_create.c: Pass iattr as additional parameter to
6130 * sysdeps/pthread/createthread.c: If attribute is provided and
6131 a new thread is created with affinity set or scheduling parameters,
6132 start thread with CLONE_STOPPED.
6133 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6134 pthread_attr_setaffinity.
6135 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6138 2003-07-15 Ulrich Drepper <drepper@redhat.com>
6140 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6142 2003-07-14 Ulrich Drepper <drepper@redhat.com>
6144 * sysdeps/pthread/configure.in: Require CFI directives also for
6147 2003-07-15 Jakub Jelinek <jakub@redhat.com>
6149 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6152 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6154 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6156 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6157 registers as variables. Call __pthread_mutex_unlock_usercnt.
6158 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6159 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6160 not self pointer in __writer. Compare with TID to determine
6162 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6163 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6165 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6167 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6168 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6169 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6170 macros also when compiling librt.
6172 2003-07-11 Jakub Jelinek <jakub@redhat.com>
6174 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6175 -fasynchronous-unwind-tables.
6176 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6177 (PSEUDO): Add cfi directives.
6178 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6180 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6183 2003-07-08 Jakub Jelinek <jakub@redhat.com>
6185 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6186 __pthread_unregister_cancel): Add prototypes and hidden_proto.
6187 * unwind.c (__pthread_unwind_next): Add hidden_def.
6188 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6190 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6191 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6192 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6194 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6195 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6197 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6198 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6199 __pthread_unregister_cancel and __pthread_unwind_next.
6201 2003-07-04 Jakub Jelinek <jakub@redhat.com>
6203 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6204 different symbol for the cancellation syscall wrapper and
6205 non-cancellation syscall wrapper.
6206 (PSEUDO_END): Define.
6208 2003-07-05 Richard Henderson <rth@redhat.com>
6210 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6211 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6212 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6213 return actual return value from the syscall, not 0.
6215 2003-07-07 Ulrich Drepper <drepper@redhat.com>
6217 * descr.h (struct pthread): Add pid field.
6218 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6219 (__reclaim_stacks): Likewise.
6220 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6221 also check for PID of the signal source.
6222 (__pthread_initialize_minimal_internal): Also initialize pid field
6223 of initial thread's descriptor.
6224 * pthread_cancel.c: Use tgkill instead of tkill if possible.
6225 * sysdeps/unix/sysv/linux/fork.c: Likewise.
6226 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6227 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6228 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6230 2003-07-05 Ulrich Drepper <drepper@redhat.com>
6232 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6233 Fix use of parameter.
6234 (__libc_cleanup_pop): Likewise.
6236 2003-07-04 Ulrich Drepper <drepper@redhat.com>
6238 * init.c (sigcancel_handler): Change parameters to match handler
6239 for SA_SIGACTION. Check signal number and code to recognize
6240 invalid invocations.
6242 2003-07-03 Roland McGrath <roland@redhat.com>
6244 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6245 Apply sizeof (struct pthread) bias to r13 value.
6247 2003-07-03 Ulrich Drepper <drepper@redhat.com>
6249 * sysdeps/pthread/configure.in: Require CFI directives.
6251 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6253 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6254 libpthread compilation.
6255 * unwind.c (__pthread_unwind): Add hidden_def.
6256 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6258 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6260 * libc-cancellation.c (__libc_cleanup_routine): Define.
6261 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6262 (__pthread_cleanup_pop): Define.
6264 2003-07-01 Richard Henderson <rth@redhat.com>
6266 * sysdeps/alpha/elf/pt-initfini.c: New file.
6267 * sysdeps/alpha/pthread_spin_lock.S: New file.
6268 * sysdeps/alpha/pthread_spin_trylock.S: New file.
6269 * sysdeps/alpha/pthreaddef.h: New file.
6270 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6271 * sysdeps/alpha/tls.h: New file.
6272 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6273 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6274 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6275 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6276 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6277 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6278 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6279 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6280 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6281 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6283 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6285 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6286 cleanup support and unwind info.
6288 2003-06-30 Ulrich Drepper <drepper@redhat.com>
6290 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6291 Use correct cleanup handler registration. Add unwind info.
6292 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6293 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6294 * tst-once3.c: Add cleanup handler and check it is called.
6295 * tst-once4.c: Likewise.
6296 * tst-oncex3.c: New file.
6297 * tst-oncex4.c: New file.
6298 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6300 2003-06-29 Ulrich Drepper <drepper@redhat.com>
6302 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6304 2003-06-27 Ulrich Drepper <drepper@redhat.com>
6306 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6307 (tf_msgsnd): Likewise.
6309 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6310 premature returns a bit more.
6312 2003-06-26 Ulrich Drepper <drepper@redhat.com>
6314 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6315 definition to the front.
6317 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6318 the cleanup functions to make the names unique. Fix dwarf opcode
6320 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6321 functions to make the names unique. Fix CFA offset for two blocks.
6323 2003-06-25 Ulrich Drepper <drepper@redhat.com>
6325 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6326 missing closing braces.
6327 Patch by Christophe Saout <christophe@saout.de>.
6329 2003-06-24 Roland McGrath <roland@redhat.com>
6331 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6333 2003-06-24 Ulrich Drepper <drepper@redhat.com>
6335 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6336 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6338 * pthreadP.h: Declare __find_thread_by_id.
6339 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6340 * pthread_clock_gettime.c: Allow using other thread's clock.
6341 * pthread_clock_settime.c: Likewise.
6342 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6343 * Makefile: Add rules to build and run tst-clock2.
6344 * tst-clock2.c: New file.
6346 2003-06-23 Ulrich Drepper <drepper@redhat.com>
6348 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6349 to use exception-based cleanup handler.
6350 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6352 * tst-cond8.c (ch): Announce that we are done.
6354 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6356 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6357 Also test aio_suspend with timeout value.
6359 2003-06-22 Ulrich Drepper <drepper@redhat.com>
6361 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6362 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6365 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6366 (__pthread_mutex_lock_internal): Likewise.
6367 (__pthread_mutex_unlock_internal): Likewise.
6368 (__pthread_mutex_unlock_usercnt): Declare.
6369 * pthread_mutex_destroy.c: Always fail if used in any way.
6370 * pthread_mutex_init.c: Update comment.
6371 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6372 * pthread_mutex_timedlock.c: Adjust __nusers.
6373 * pthread_mutex_trylock.c: Adjust __nusers.
6374 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6375 and public interfaces are wrapper with pass additional parameter.
6376 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6378 * tst-mutex8.c: New file.
6379 * Makefile (tests): Add tst-mutex8.
6380 * sysdeps/pthread/pthread_cond_timedwait.c: Call
6381 __pthread_mutex_unlock_usercnt.
6382 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6383 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6384 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6385 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6386 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6387 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6388 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6390 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6391 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6392 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6393 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6394 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6396 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6397 * pthread_mutex_timedlock.c: Likewise.
6398 * pthread_mutex_trylock.c: Adjust __nusers.
6399 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6400 * tst-mutex9.c: New file.
6401 * Makefile (tests): Add tst-mutex9.
6402 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6403 * sysdeps/ia64/tls.h: Likewise.
6404 * sysdeps/powerpc/tls.h: Likewise.
6405 * sysdeps/s390/tls.h: Likewise.
6406 * sysdeps/sh/tls.h: Likewise.
6407 * sysdeps/x86_64/tls.h: Likewise.
6408 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6409 Change type of __owner.
6410 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6411 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6412 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6413 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6414 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6416 2003-06-19 Jakub Jelinek <jakub@redhat.com>
6418 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6419 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6421 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6422 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
6423 instead of nr to lll_futex_wake. Only set errno and return -1
6426 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6427 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6428 return actual return value from the syscall, not 0.
6430 2003-06-18 Ulrich Drepper <drepper@redhat.com>
6432 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6433 find a random value.
6434 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
6437 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6438 compat_timer_settime.
6439 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6440 compat_timer_gettime.
6441 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6442 compat_timer_getoverrun.
6443 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6444 compat_timer_delete.
6446 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6447 error-checking mutex detect busy mutexes.
6449 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6451 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6452 Add ax to clobber list.
6453 (lll_mutex_cond_lock): Likewise.
6454 (lll_mutex_unlock): Likewise.
6455 (lll_lock): Likewise.
6456 (lll_unlock): Likewise.
6458 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6459 * tst-cancel18.c: New file.
6460 * tst-cancelx18.c: New file.
6462 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6465 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6466 * tst-cancel17.c: New file.
6467 * tst-cancelx17.c: New file.
6469 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6470 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6471 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6473 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6475 2003-06-16 Jakub Jelinek <jakub@redhat.com>
6477 * sysdeps/pthread/createthread.c (create_thread): Set
6478 header.multiple_threads unconditionally.
6479 * allocatestack.c (allocate_stack): Likewise.
6480 * descr.h (struct pthread): Add header.multiple_threads
6482 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6483 Define for librt. #error if neither libpthread, libc nor librt.
6484 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6486 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6487 CDISABLE): Likewise.
6488 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6489 CDISABLE): Likewise.
6490 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6491 CDISABLE): Likewise.
6492 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6493 CDISABLE): Likewise. Access header.multiple_threads outside of
6494 libc and libpthread.
6495 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6497 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6498 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6500 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6502 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6503 Also test early cancellation before the thread reaches the cancellation
6506 * Makefile: Compile forward.c with exceptions.
6508 * sysdeps/unix/sysv/linux/sleep.c: New file.
6510 2003-06-16 Ulrich Drepper <drepper@redhat.com>
6512 * Makefile: Add CFLAGS definition to compile function wrappers
6513 duplicated from libc with exceptions.
6514 * tst-cancel4.c: Also check cancellation handlers.
6516 * Makefile: Add rules to build and run tst-cancel16 and
6517 tst-cancelx16. Add missing CFLAGS definitions.
6518 * tst-cancel16.c: New file.
6519 * tst-cancelx16.c: New file.
6521 2003-06-15 Ulrich Drepper <drepper@redhat.com>
6523 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6524 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6525 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6526 (DL_SYSINFO_IMPLEMENTATION): Likewise.
6528 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6529 (LIBC_CANCEL_RESET): Likewise.
6530 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6531 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6533 (CFLAGS-libcrt-cancellation.c): Define.
6534 * sysdeps/pthread/librt-cancellation.c: New file.
6535 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6536 macros also when compiling librt.
6537 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6538 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6539 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6540 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6541 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6542 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6543 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6545 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6546 compat_timer_create.
6548 2003-06-14 Ulrich Drepper <drepper@redhat.com>
6550 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6552 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6554 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6555 Add libc_hidden_def.
6557 2003-06-13 Roland McGrath <roland@redhat.com>
6559 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6560 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6562 2003-06-11 Ulrich Drepper <drepper@redhat.com>
6564 * allocatestack.c (queue_stack): Always inline.
6565 * ptreadhP.h (__do_cancel): Likewise.
6567 2003-06-10 Jakub Jelinek <jakub@redhat.com>
6569 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6572 2003-06-10 Ulrich Drepper <drepper@redhat.com>
6574 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6575 (__pthread_cond_signal): Remove incorrect second addition for
6578 2003-06-09 Ulrich Drepper <drepper@redhat.com>
6580 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6581 (__pthread_cond_signal): Use correct futex pointer in
6582 __lll_mutex_lock_wait call.
6584 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6585 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6587 2003-06-08 Ulrich Drepper <drepper@redhat.com>
6589 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6591 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6594 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6595 hand-written CFI generation code. Since ENTRY/END also initiated
6596 CFI frames this caused two CFI sets to be generated.
6598 2003-06-07 Ulrich Drepper <drepper@redhat.com>
6600 * cleanup_routine.c: New file.
6601 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6602 * sysdeps/pthread/pthread.h: Add support for fully exception-based
6604 * Makefile (libpthread-routines): Add cleanup_routine.
6605 Add more CFLAGS variables to compile with exceptions. Add comments
6606 why which file needs unwind tables.
6607 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6609 * tst-cancelx1.c: New file.
6610 * tst-cancelx2.c: New file.
6611 * tst-cancelx3.c: New file.
6612 * tst-cancelx4.c: New file.
6613 * tst-cancelx5.c: New file.
6614 * tst-cancelx6.c: New file.
6615 * tst-cancelx7.c: New file.
6616 * tst-cancelx8.c: New file.
6617 * tst-cancelx9.c: New file.
6618 * tst-cancelx10.c: New file.
6619 * tst-cancelx11.c: New file.
6620 * tst-cancelx12.c: New file.
6621 * tst-cancelx13.c: New file.
6622 * tst-cancelx14.c: New file.
6623 * tst-cancelx15.c: New file.
6624 * tst-cleanupx0.c: New file.
6625 * tst-cleanupx0.expect: New file.
6626 * tst-cleanupx1.c: New file.
6627 * tst-cleanupx2.c: New file.
6628 * tst-cleanupx3.c: New file.
6630 * tst-cleanup0.c: Make standard compliant.
6631 * tst-cleanup1.c: Likewise.
6633 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6634 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6635 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6636 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6637 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6638 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6639 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6641 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6642 * tst-cancel12.c: New file.
6643 * tst-cancel13.c: New file.
6644 * tst-cancel14.c: New file.
6645 * tst-cancel15.c: New file.
6646 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6649 * tst-cancel1.c: Add some comments.
6651 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6654 2003-06-06 Ulrich Drepper <drepper@redhat.com>
6656 * Makefile (CFLAGS-pthread_cancel.c): Define.
6658 2003-06-05 Ulrich Drepper <drepper@redhat.com>
6660 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6661 Change type of __writer element to int.
6662 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6663 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6664 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6665 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6666 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6667 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6668 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6669 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6670 Compare with TID to determine deadlocks.
6671 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6672 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6673 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6674 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6675 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6676 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6678 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6680 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6681 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6682 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6684 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6686 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6687 * Makefile (tests): Add tst-rwlock12.
6688 * tst-rwlock12.c: New file.
6690 2003-06-05 Jakub Jelinek <jakub@redhat.com>
6692 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6693 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6694 Remove bogus hidden_proto.
6695 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6697 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6698 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6699 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6700 ___lll_mutex_timedlock): Likewise.
6702 2003-06-04 Ulrich Drepper <drepper@redhat.com>
6704 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6705 (__pthread_cond_signal): Add some code to eventually handle
6708 2003-06-01 Ulrich Drepper <drepper@redhat.com>
6710 * Makefile (tests): Add tst-exec4.
6711 (tst-exec4-ARGS): Define.
6712 * tst-exec4.c: New file.
6714 2003-05-31 Ulrich Drepper <drepper@redhat.com>
6716 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6717 Also fail if tv_nsec < 0.
6718 (__lll_timedwait_tid): Likewise.
6719 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6720 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6722 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6724 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6726 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6728 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6730 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6733 * Makefile (tests): Add tst-sem8 and tst-sem9.
6734 * tst-sem8.c: New file.
6735 * tst-sem9.c: New file.
6736 * sem_open.c: Fix creation of in_use record if the file exists but
6739 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6742 * sysdeps/pthread/timer_create.c (timer_create): In case
6743 evp==NULL, assign timer ID to sival_ptr.
6745 * descr.h (struct pthread_unwind_buf): Change type of prev element to
6746 struct pthread_unwind_buf *.
6747 (struct pthread): Likewise for cleanup_jmp_buf element.
6749 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6750 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6751 * unwind.c (__pthread_unwind_next): Likewise.
6753 2003-05-30 Ulrich Drepper <drepper@redhat.com>
6755 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6756 (lll_futex_timed_wait): Use int for futex value parameter.
6757 (lll_futex_wake): Likewise.
6758 (lll_futex_requeue): Likewise.
6760 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6761 Replace one memory operation with one register operation.
6763 * tst-join4.c (do_test): Fix error message.
6765 * tst-rwlock6.c (do_test): Use correct format specifier.
6767 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6768 (__lll_mutex_lock_wait): Replace one memory operation with one
6770 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6771 (__lll_mutex_lock_wait): Likewise.
6773 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6774 (__lll_mutex_cond_lock): Add one to value parameter of
6775 __lll_lock_wait to reflect reality in the futex syscall.
6776 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6777 (lll_mutex_cond_lock): Likewise.
6779 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6781 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6783 (lll_mutex_cond_lock): Define.
6785 2003-05-29 Ulrich Drepper <drepper@redhat.com>
6787 * Makefile (tests): Add tst-signal6.
6788 * tst-signal6.c: New file.
6790 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6791 (__lll_mutex_unlock_force): New function
6792 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6794 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6795 (__lll_mutex_unlock_force): New function.
6796 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6798 * tst-rwlock7.c (do_test): Use correct format specifier.
6800 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6801 Find break parameter in correct asm argument.
6803 2003-05-27 Jakub Jelinek <jakub@redhat.com>
6805 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6807 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6809 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6811 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6812 lll_futex_requeue, lll_mutex_unlock_force): Define.
6814 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6816 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6817 (pthread_cond_t): Add __mutex.
6818 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6819 lll_futex_requeue, lll_mutex_unlock_force): Define.
6821 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6823 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6824 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6826 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6828 (lll_futex_wait, lll_futex_wake): Define.
6829 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6830 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6831 FUTEX_REQUEUE instead of FUTEX_WAIT.
6832 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6833 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6834 mutex which was used in condvar structure. Call
6835 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6836 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6838 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6839 include tcb-offsets.h. Read wakeup value in locked region.
6840 Use the value of gbr register as THREAD_ID.
6841 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6842 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6843 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6845 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6848 2003-05-28 Ulrich Drepper <drepper@redhat.com>
6850 * sysdeps/pthread/pthread_cond_broadcast.c
6851 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6853 2003-05-26 Ulrich Drepper <drepper@redhat.com>
6855 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6856 typo in register name.
6857 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6858 correctly. Actually use requeue. Little optimization.
6859 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6860 mutex address early. Handle cancellation state as 32-bit value.
6861 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6862 Remove unnecessary label.
6864 2003-05-25 Ulrich Drepper <drepper@redhat.com>
6866 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6867 instead of FUTEX_WAIT.
6868 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6869 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6870 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6871 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6872 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6873 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6874 used in condvar structure. Call __pthread_mutex_cond_lock instead
6875 of __pthread_mutex_lock_internal.
6876 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6877 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6878 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6879 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6880 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6881 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6882 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6883 Add pthread_mutex_cond_lock.
6884 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6885 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6886 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6887 lll_mutex_cond_lock.
6888 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6889 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6890 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6892 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6893 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6895 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6896 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6898 * pthreadP.h: Declare __pthread_mutex_cond_lock.
6899 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6900 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
6901 macro don't define aliases.
6903 * cancellation.c: Remove __pthread_enable_asynccancel_2.
6904 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6905 * sysdeps/pthread/pthread_cond_timedwait.c: Use
6906 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6907 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6908 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6909 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6910 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6911 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6913 2003-05-17 Ulrich Drepper <drepper@redhat.com>
6915 * sem_open.c: Fix one endless loop. Implement correct semantics
6916 wrt opening the same semaphore more then once.
6917 * sem_close.c: Adjust for sem_open change.
6918 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
6919 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6920 * Makefile (tests): Add tst-sem7.
6921 * tst-sem7.c: New file.
6923 2003-05-16 Roland McGrath <roland@redhat.com>
6925 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6926 uninitialized variable braino.
6928 2003-05-16 Ulrich Drepper <drepper@redhat.com>
6930 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6931 test for syscall availability.
6933 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6934 __no_posix_timers to -1 if the syscalls don't exist.
6936 * pthread_join.c (pthread_join): Set tid field of the joined
6937 thread to -1. This isn't necessary but helps to recognize some
6938 error conditions with almost no cost.
6940 * allocatestack.c (FREE_P): Also negative values indicate an
6943 * unwind.c: Include <unistd.h>.
6945 2003-05-14 Ulrich Drepper <drepper@redhat.com>
6947 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6949 2003-05-14 Jakub Jelinek <jakub@redhat.com>
6951 * Makefile (crti-objs, crtn-objs): New variables.
6952 (omit-deps, extra-objs): Add crtn.
6953 ($(objpfx)libpthread.so): Depend on both crti and crtn
6954 and links to them in multidir.
6955 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6957 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
6959 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6960 (lll_mutex_unlock): Use atomic_exchange_rel.
6962 2003-05-11 Ulrich Drepper <drepper@redhat.com>
6964 * cond-perf.c (cons): Add missing locking around setting of alldone.
6966 2003-05-10 Ulrich Drepper <drepper@redhat.com>
6968 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6970 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6972 2003-05-09 Ulrich Drepper <drepper@redhat.com>
6974 * tst-sem6.c: New file.
6975 * Makefile (tests): Add tst-sem6.
6977 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6978 Use atomic_exchange_rel instead of atomic_exchange.
6979 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6982 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6983 code for lll_futex_wait and lll_futex_wake in static apps. Use
6984 vsyscall is possible.
6986 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6987 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6988 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6989 pthread_setaffinity_np.
6990 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6991 and pthread_setaffinity_np.
6992 * Makefile (libpthread-routines): Add pthread_getaffinity and
6993 pthread_setaffinity.
6995 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6996 use it in case mmap to allocate the stack fails.
6997 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6998 ARCH_MAP_FLAGS here.
6999 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7002 2003-05-08 Ulrich Drepper <drepper@redhat.com>
7004 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7005 handler implementation. It is now lockless in fork().
7006 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7007 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7008 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
7009 declare the __fork_*_lists.
7010 (struct fork_handler): Include pointers to all three functions.
7011 Add next, refcntr and need_signal elements.
7012 (__fork_handlers): New declaration.
7013 (__register_atfork_malloc): Remove declaration.
7014 (HAVE_register_atfork_malloc): Remove definition.
7015 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7016 __pthread_child_handler variable.
7017 (__libc_pthread_init): Use __register_atfork instead of explicitly
7019 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7021 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7023 * unwind.c (unwind_cleanup): Print error message and then abort. This
7024 function must never be reached.
7026 * cond-perf.c: New file.
7028 2003-05-05 Ulrich Drepper <drepper@redhat.com>
7030 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7032 2003-05-04 Roland McGrath <roland@redhat.com>
7034 * Makefile ($(objpfx)../libc.so): New target.
7036 2003-05-02 Ulrich Drepper <drepper@redhat.com>
7038 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7039 (pthread_condattr_t): Size is only an int, don't use long for
7041 (pthread_mutexattr_t): Likewise.
7042 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7043 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7044 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7046 2003-05-01 Ulrich Drepper <drepper@redhat.com>
7048 * sysdeps/i386/tls.h: Define THREAD_ID.
7049 * sysdeps/ia64/tls.h: Likewise.
7050 * sysdeps/powerpc/tls.h: Likewise.
7051 * sysdeps/s390/tls.h: Likewise.
7052 * sysdeps/sh/tls.h: Likewise.
7053 * sysdeps/x86_64/tls.h: Likewise.
7054 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7056 * pthread_mutex_timedlock.c: Likewise.
7057 * pthread_mutex_trylock.c: Likewise.
7058 * pthread_mutex_unlock.c: Likewise.
7059 * pthread_rwlock_trywrlock.c: Likewise.
7060 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7061 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7062 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7063 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7065 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7068 2003-04-29 Jakub Jelinek <jakub@redhat.com>
7070 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7071 (__SIZEOF_PTHREAD_COND_T): Define to 48.
7072 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7073 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7074 Make __align long long instead of long.
7075 (pthread_rwlock_t): Formatting.
7076 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7077 (pthread_rwlock_t): Formatting.
7078 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7079 (pthread_cond_t): Make __align long long instead of long.
7080 (pthread_rwlock_t): Move __flags field to the same position as in
7083 2003-04-30 Ulrich Drepper <drepper@redhat.com>
7085 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7086 * tst-rwlock7.c (do_test): Likewise.
7088 2003-04-26 Roland McGrath <roland@redhat.com>
7090 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7092 2003-04-22 Jakub Jelinek <jakub@redhat.com>
7094 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7095 sizeof (struct pthread).
7096 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7098 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7100 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7102 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7104 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7106 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7108 (NO_TLS_OFFSET): Define.
7109 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7110 add TLS_TCB_SIZE unnecessarily.
7112 2003-04-22 Roland McGrath <roland@redhat.com>
7114 * Makeconfig (shared-thread-library): Reverse link order to work
7117 2003-04-22 Ulrich Drepper <drepper@redhat.com>
7119 * semaphore.h: Fix typo in comment.
7121 2003-04-21 Ulrich Drepper <drepper@redhat.com>
7123 * sysdeps/pthread/sigfillset.c: New file.
7125 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7126 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7127 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7128 * sysdeps/pthread/sigaction.c: Likewise.
7129 * sysdeps/pthread/sigprocmask.c: New file.
7130 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7132 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7133 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
7136 2003-04-19 Ulrich Drepper <drepper@redhat.com>
7138 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7139 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7141 * sysdeps/unix/sysv/linux/unregister-atfork.c
7142 (__unregister_atfork): Don't free memory not allocated dynamically.
7144 * semaphore.h: Remove __THROW marker from cancellation points.
7145 * nptl/sysdeps/pthread/pthread.h: Likewise.
7147 2003-04-18 Ulrich Drepper <drepper@redhat.com>
7149 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7150 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7153 2003-04-16 Jakub Jelinek <jakub@redhat.com>
7155 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7157 2003-04-15 Roland McGrath <roland@redhat.com>
7159 * forward.c (__pthread_unwind): Tweak to avoid warning.
7161 2003-04-15 Ulrich Drepper <drepper@redhat.com>
7163 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7165 2003-04-14 Ulrich Drepper <drepper@redhat.com>
7167 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7168 overflow CFA advance instructions.
7169 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7171 2003-04-14 Jakub Jelinek <jakub@redhat.com>
7173 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7174 * sysdeps/i386/pthread_spin_lock.c: Likewise.
7175 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
7178 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7179 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7180 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7181 DW_CFA_advance_loc for .Laddl-.Lsubl.
7183 2003-04-13 Ulrich Drepper <drepper@redhat.com>
7185 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7186 position-independent unwind data for static libraries.
7187 Add missing unwind info. Add comments.
7189 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7190 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7191 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7192 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7194 2003-04-12 Ulrich Drepper <drepper@redhat.com>
7196 * Makefile: Make sure all cancellation points are compiled with
7197 exception and asynchronous unwind tables.
7199 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7200 which mishandles loading of global object addresses in PIC.
7201 (THREAD_SETMEM_NC): Likewise.
7203 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7205 * pthread.h: Define new data structure for cleanup buffer. Declare
7206 new cleanup handler interfaces.
7207 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
7208 (struct pthread): Add cleanup_jmp_buf pointer. Define
7209 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7210 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
7211 it. Declare old cleanup handler installation functions.
7212 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
7214 * cleanup_defer.c: Likewise.
7215 * cleanup_compat.c: New file. Old cleanup code.
7216 * cleanup_def_compat.c: New file. Old cleanup code.
7217 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7218 if own thread descriptor.
7219 * unwind.c: New file.
7220 * forward.c: Add __pthread_unwind.
7221 * init.c (pthread_functions): Add __pthread_unwind.
7222 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7223 Add ptr___pthread_unwind.
7224 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7225 and unwind function.
7226 * Makefile (libpthread-routines): Add cleanup_compat,
7227 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
7228 table generation if necessary.
7229 * version.c: Record whether unwind support is compiled in.
7230 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7231 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7233 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7234 complication to generate unwind information for syscall wrappers.
7235 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7236 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7237 __cleanup_fct_attribute.
7239 * Makefile: Add rules to build and run tst-cleanup0.
7240 * tst-cleanup0.c: New file.
7241 * tst-cleanup0.expect: New file.
7243 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
7244 caller. Optimize to avoid often unecessary local variable.
7246 2003-04-11 Roland McGrath <roland@redhat.com>
7248 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7249 sets variable `multidir'; include that.
7250 (generated): Add it.
7251 ($(objpfx)$(multidir)/crti.o): New target.
7252 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7254 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7256 * tst-attr2.c (do_test): Add cast to avoid warning.
7257 * tst-mutex4.c (do_test): Likewise.
7259 2003-04-10 Ulrich Drepper <drepper@redhat.com>
7261 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7264 2003-04-09 Ulrich Drepper <drepper@redhat.com>
7266 * Makefile (tests): Add tst-detach1.
7267 * tst-detach1.c: New file.
7269 2003-04-08 Ulrich Drepper <drepper@redhat.com>
7271 * sysdeps/pthread/pthread.h: Remove duplicate
7272 pthread_cleanup_{push,pop} definitions.
7274 * tst-barrier2.c: Eliminate warnings.
7275 * tst-cancel4.c: Likewise.
7276 * tst-cond4.c: Likewise.
7277 * tst-cond6.c: Likewise.
7278 * tst-detach1.c: Likewise.
7279 * tst-rwlock4.c: Likewise.
7280 * tst-rwlock6.c: Likewise.
7281 * tst-rwlock7.c: Likewise.
7282 * tst-sem3.c: Likewise.
7283 * tst-spin2.c: Likewise.
7284 * tst-umask1.c: Likewise.
7286 2003-04-07 Ulrich Drepper <drepper@redhat.com>
7288 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7290 2003-04-06 Ulrich Drepper <drepper@redhat.com>
7292 * descr.h (struct pthread): Move cancelhandling member to the front.
7294 2003-04-05 Ulrich Drepper <drepper@redhat.com>
7296 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7297 malloc_parent, and malloc_child statically.
7298 (__register_atfork_malloc): New function.
7299 (free_mem): Don't free any of the malloc_* variables on the list.
7300 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7301 Define HAVE_register_atfork_malloc.
7303 2003-04-04 Ulrich Drepper <drepper@redhat.com>
7305 * sysdeps/pthread/createthread.c (create_thread): Add some more
7306 comments explaining when to set multiple_threads and when not.
7308 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7309 THREAD_ATOMIC_BIT_SET if not already defined.
7310 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7311 THREAD_ATOMIC_BIT_SET:
7312 * sysdeps/x86_64/tls.h: Likewise.
7313 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7314 THREAD_ATOMIC_CMPXCHG_VAL.
7315 (_pthread_cleanup_pop_restore): Likewise.
7316 * cancellation.c (__pthread_enable_asynccancel): Likewise.
7317 (__pthread_enable_asynccancel_2): Likewise.
7318 (__pthread_disable_asynccancel): Likewise.
7319 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7320 (__libc_disable_asynccancel): Likewise.
7321 * init.c (sigcancel_handler): Likewise.
7322 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7323 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7325 2003-04-03 Ulrich Drepper <drepper@redhat.com>
7327 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7328 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7329 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7330 * Makefile (tests): Add tst-cancel11.
7331 * tst-cancel11.c: New file.
7333 2003-04-01 Ulrich Drepper <drepper@redhat.com>
7335 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7336 round, not the first. Use specific_used flag instead of local
7337 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
7338 (__free_tcb): Don't call deallocate_tsd here.
7339 (start_thread): Call deallocate_tsd here.
7340 * pthread_setspecific.c: Set specific_used flag really only when
7342 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7343 * tst-tsd3.c: New file.
7344 * tst-tsd4.c: New file.
7346 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7348 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7349 Use atomic_exchange_and_add instead of __lll_add.
7350 (__lll_mutex_timedlock): Likewise.
7351 Patch by Ian Wienand.
7353 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
7355 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7356 (SINGLE_THREAD_P): Fix typo.
7357 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7359 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7361 * Makefile (tests): Add tst-align.
7362 * tst-align.c: New file.
7363 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7365 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7368 * tst-tsd2.c: Add casts to avoid warnings.
7370 2003-03-30 Ulrich Drepper <drepper@redhat.com>
7372 * descr.h (struct pthread): Move most often used elements to the front.
7374 2003-03-29 Ulrich Drepper <drepper@redhat.com>
7376 * Makefile (libpthread-routines): Add pthread_atfork.
7377 (libpthread-static-only-routines): Add pthread_atfork.
7379 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7381 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7383 (INSTALL_DTV): Add parens.
7384 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7385 Use passed descr instead of THREAD_SELF.
7386 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7387 (__lll_mutex_timedlock_wait): Correct expected value after
7389 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7390 Release lock before waking up the waiters.
7391 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7392 criteria. Reorderstruct passed to cleanup handler. Fix
7393 handling of cancellation and failung pthread_mutex_unlock call.
7394 Use __pthread_enable_asynccancel_2 instead of
7395 __pthread_enable_asynccancel.
7396 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7397 Return result of lock re-get if it fails.
7398 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7399 for __pthread_cleanup_push.
7400 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7401 completely broken rwlock implementation.
7402 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7403 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7404 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7405 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7406 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7407 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
7408 versioned_symbol macro.
7409 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7410 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7412 2003-03-27 Ulrich Drepper <drepper@redhat.com>
7414 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7415 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
7417 (struct timer): Remove th and bar field.
7418 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7419 debugging code. Create only one helper thread.
7420 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7422 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7423 Renamed. Define statically. Use thread info from siginfo.
7424 (__helper_once): New variable.
7425 (__helper_tid): New variable.
7426 (__reset_helper_control): New function.
7427 (__start_helper_thread): New function.
7429 * pthread_create.c (start_thread): Don't use setjmp inside
7430 __builtin_expect to work around gcc bug.
7432 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7433 timer_delete syscall fails, but not with ENOSYS, set
7436 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7437 (timer_settime): Fix typo.
7438 * sysdeps/unix/sysv/linux/timer_getoverr.c
7439 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7441 2003-03-27 Jakub Jelinek <jakub@redhat.com>
7443 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7444 offset of cleanupbuf.__prev.
7446 2003-03-26 Jakub Jelinek <jakub@redhat.com>
7448 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7451 2003-03-26 Ulrich Drepper <drepper@redhat.com>
7453 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7454 NULL provide default definition to syscall.
7456 2003-03-25 Roland McGrath <roland@redhat.com>
7458 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7459 (timer_id2ptr): Fix typo.
7461 2003-03-25 Ulrich Drepper <drepper@redhat.com>
7463 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7464 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7465 * sysdeps/ia64/pthreaddef.h: Likewise.
7466 * sysdeps/powerpc/pthreaddef.h: Likewise.
7467 * sysdeps/s390/pthreaddef.h: Likewise.
7468 * sysdeps/sh/pthreaddef.h: Likewise.
7469 * sysdeps/x86_64/pthreaddef.h: Likewise.
7470 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7471 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7473 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7474 SIGTIMER is not unblocked.
7475 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7477 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7479 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7480 pass pointer through as ID.
7481 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7482 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7483 * sysdeps/unix/sysv/linux/timer_create.c: New file.
7484 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7485 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7486 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7487 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7488 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7489 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7490 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7491 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7492 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7493 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7494 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7495 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7496 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7497 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7498 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7499 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7500 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7501 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7502 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7503 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7504 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7505 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7506 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7507 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7508 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7509 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7510 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7511 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7512 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7513 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7515 * pthreadP.h: Remove FRAME_LEFT definition.
7516 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7517 already left frame. Programs which have this problem are not POSIX
7519 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7521 2003-03-24 Ulrich Drepper <drepper@redhat.com>
7523 * sysdeps/pthread/tst-timer.c: Check return values of the
7526 2003-03-23 Roland McGrath <roland@redhat.com>
7528 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7529 * tst-tls3mod.c: Likewise.
7530 * tst-tls1.c: Likewise.
7531 * tst-tls2.c: Likewise.
7533 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7536 * tst-join5.c (tf1, tf2): Add a cast.
7538 * Makeconfig (includes): Append -I$(..)nptl to this variable.
7540 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7541 Don't test anything.
7542 * tst-cond4.c: Likewise.
7543 * tst-cond6.c: Likewise.
7544 * tst-flock2.c: Likewise.
7545 * tst-mutex4.c: Likewise.
7546 * tst-rwlock4.c: Likewise.
7547 * tst-signal1.c: Likewise.
7548 * tst-spin2.c: Likewise.
7549 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7551 * tst-mutex4.c: Use test-skeleton.c.
7552 * tst-spin2.c: Likewise.
7553 * tst-sysconf.c: Likewise.
7554 * tst-barrier2.c: Likewise.
7555 * tst-cond4.c: Likewise.
7556 * tst-cond6.c: Likewise.
7557 * tst-rwlock4.c: Likewise.
7558 * tst-unload.c: Likewise.
7559 * tst-flock2.c (do_test): Use return instead of exit.
7561 2003-03-22 Jakub Jelinek <jakub@redhat.com>
7563 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7565 2003-03-21 Ulrich Drepper <drepper@redhat.com>
7567 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7568 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7569 instead of __lll_compare_and_swap.
7570 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7572 Removed definition if __lll_compare_and_swap.
7574 * cancellation.c: Adjust for new form of compare&exchange macros.
7575 * cleanup_defer.c: Likewise.
7577 * libc-cancellation.c: Likewise.
7578 * old_pthread_cond_broadcast.c: Likewise.
7579 * old_pthread_cond_signal.c: Likewise.
7580 * old_pthread_cond_timedwait.c: Likewise.
7581 * old_pthread_cond_wait.c: Likewise.
7582 * pthread_cancel.c: Likewise.
7583 * pthread_create.c: Likewise.
7584 * pthread_detach.c: Likewise.
7585 * pthread_join.c: Likewise.
7586 * pthread_key_delete.c: Likewise.
7587 * pthread_setcancelstate.c: Likewise.
7588 * pthread_setcanceltype.c: Likewise.
7589 * pthread_timedjoin.c: Likewise.
7590 * pthread_tryjoin.c: Likewise.
7591 * sysdeps/pthread/createthread.c: Likewise.
7593 2003-03-20 Ulrich Drepper <drepper@redhat.com>
7595 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7596 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7597 definitions. Replace uses with calls to atomic_* functions.
7598 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7599 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7600 __lll_test_and_set calls with atomic_exchange_and_add and
7601 atomic_exchange calls respectively.
7602 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7603 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7604 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7605 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7606 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7607 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7608 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7610 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7611 returns the old value.
7613 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
7615 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7616 int for variable OLDVAL and correct inline assembler contraint.
7617 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7618 type int for variable OLD.
7620 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7622 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7623 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7624 instead of multiple_threads field in the TCB.
7626 2003-03-19 Ulrich Drepper <drepper@redhat.com>
7628 * sysdeps/i386/i686/bits/atomic.h: Removed.
7629 * sysdeps/i386/i586/bits/atomic.h: Removed.
7630 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
7631 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
7632 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
7633 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
7634 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
7635 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
7636 * atomic.h: Removed. Moved to glibc.
7638 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7639 support for clock selection.
7641 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7644 2003-03-18 Roland McGrath <roland@redhat.com>
7646 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7647 Add __lll_rel_instr first. Add memory clobber.
7648 (lll_mutex_unlock): Use __lll_test_and_set.
7649 From Paul Mackerras <paulus@samba.org>.
7651 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7653 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7654 (SINGLE_THREAD_P): Add `header.' prefix.
7655 From Paul Mackerras <paulus@samba.org>.
7657 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7658 pthread_timedjoin_np to ...
7659 (libpthread: GLIBC_2.3.3): ... here.
7660 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7662 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7663 Avoid shadowing VAL variable.
7665 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7668 2003-03-18 Ulrich Drepper <drepper@redhat.com>
7670 * Makefile (tests): Add tst-cond11.
7671 * tst-cond11.c: New file.
7673 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7674 struct passed to cleanup handler to eliminate one more
7676 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7678 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7679 (pthrad_cond_t): Replace __unused field with __clock.
7681 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7682 waken all waiters in cleanup handler.
7683 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7684 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7686 * pthread_condattr_getclock.c: New file.
7687 * pthread_condattr_setclock.c: New file.
7688 * sysdeps/pthread/pthread.h: Declare these new functions.
7689 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7690 * Makefile (libpthread-routines): Add the new functions.
7691 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7692 Renamed field to value. Document use of the bits.
7693 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7695 * pthread_condattr_setpshared.c: Likewise.
7696 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7697 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7698 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7700 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7701 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7702 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7703 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7704 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7705 Implement clock selection.
7706 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7707 * pthread-errnos.sym: Add ENOSYS.
7708 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7709 _POSIX_CLOCK_SELECTION.
7710 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7712 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7713 invalid .size directive.
7715 2003-03-17 Roland McGrath <roland@redhat.com>
7717 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7720 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7722 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7723 Use __lll_add instead of spelling it out. Use protected symbol names.
7724 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7726 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7727 Renamed from lll_compare_and_swap. Use new name where necessary.
7728 (__lll_add): Defined.
7729 (__lll_dec_if_positive): Defined.
7730 (__lll_test_and_set): Defined.
7731 * sysdeps/ia64/pthread_spin_init.c: Removed.
7732 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7733 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7734 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7735 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7736 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7737 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7738 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7739 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7740 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7741 __sync_lock_release_si.
7742 Patch by Jakub Jelinek.
7744 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7745 Fix timeout handling.
7746 (__lll_timedwait_tid): Likewise.
7747 (lll_unlock_wake_cb): Wake up other waiters if necessary.
7748 Patch by Jakub Jelinek.
7750 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7752 2003-03-17 Roland McGrath <roland@redhat.com>
7754 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7755 * sysdeps/pthread/pthread_spin_init.c: New file.
7756 * sysdeps/pthread/pthread_spin_unlock.c: New file.
7757 * sysdeps/powerpc/Makefile: New file.
7758 * sysdeps/powerpc/pthread_spin_lock.c: New file.
7759 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7760 * sysdeps/powerpc/pthreaddef.h: New file.
7761 * sysdeps/powerpc/tcb-offsets.sym: New file.
7762 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7763 * sysdeps/powerpc/tls.h: New file.
7764 * sysdeps/powerpc/bits/atomic.h: New file.
7765 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7766 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7767 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7769 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7770 * sysdeps/unix/sysv/linux/sem_post.c: New file.
7771 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7772 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7773 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7774 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7775 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7776 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7777 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7778 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7779 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7780 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7781 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7782 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7783 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7785 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7787 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7788 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7789 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7790 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7791 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7793 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7795 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7796 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7797 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7798 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7799 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7801 2003-03-16 Roland McGrath <roland@redhat.com>
7803 * tst-fork4.c: Include <string.h>.
7804 * tst-signal2.c: Likewise.
7805 * tst-mutex5.c (do_test): exit -> return.
7806 * tst-mutex2.c: Include <stdlib.h>.
7808 2003-03-16 Ulrich Drepper <drepper@redhat.com>
7810 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7811 (__lll_mutex_timedlock_wait): Correct expected value after
7812 spurious wakeup. Otherwise we would never wait again.
7814 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7815 zone versus inline asm stupidity. Use correct instructions.
7817 * tst-rwlock6.c: Add some more status output.
7819 2003-03-15 Roland McGrath <roland@redhat.com>
7821 * sysdeps/pthread/configure.in: New file.
7822 * sysdeps/pthread/configure: New file (generated).
7824 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7826 * allocatestack.c (allocate_stack): Store the exact stack size of
7827 user allocated stacks.
7829 2003-03-15 Jakub Jelinek <jakub@redhat.com>
7831 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7832 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7833 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7834 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7835 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7836 Use `header.' prefix.
7837 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7839 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7841 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7842 __builtin_frame_address, use stack pointer.
7844 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7845 instead of __builtin_frame_pointer.
7847 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7849 * tst-basic1.c (do_test): Add cast to avoid warning.
7850 * tst-basic2.c (do_test): Likewise.
7852 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7853 amount of stack correction.
7855 * tst-fork4.c: Use test-skeleton.c.
7857 2003-03-14 Roland McGrath <roland@redhat.com>
7859 * init.c: Fix typo "#eli" for "#else".
7861 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
7863 * allocatestack.c (__stack_user): Use hidden_data_def.
7864 * pthread_create.c (__pthread_keys): Likewise.
7866 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7868 2003-03-14 Roland McGrath <roland@redhat.com>
7870 * tst-fork4.c: New file.
7871 * Makefile (tests): Add it.
7873 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7874 we always define the padding space.
7875 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7876 stopped supporting its own extensions fully.
7877 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7878 struct also called `header', so `header.multiple_threads' is the field
7879 name to use on all machines.
7880 * allocatestack.c (allocate_stack): Use `header.' prefix.
7881 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7882 * pthread_create.c (__pthread_create_2_1): Likewise.
7883 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7884 (THREAD_SELF): Likewise.
7885 * sysdeps/x86_64/tls.h: Likewise.
7886 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7887 (SINGLE_THREAD_P): Likewise.
7888 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7889 (SINGLE_THREAD_P): Likewise.
7890 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7891 (SINGLE_THREAD_P): Likewise.
7893 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7896 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7898 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7899 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7901 * pthread_create.c (start_thread): setjmp is expected to return 0.
7903 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7904 (THREAD_GETMEM_NC): Likewise.
7906 2003-03-13 Ulrich Drepper <drepper@redhat.com>
7908 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7909 and the size of the stack which must be allocated is a multiple,
7910 allocate one more page.
7911 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7912 MULTI_PAGE_ALIASING.
7914 2003-03-13 Roland McGrath <roland@redhat.com>
7916 * pthread_create.c (start_thread): Set EXITING_BIT after the
7917 event-reporting (and destructors), not before.
7919 2003-03-13 Jakub Jelinek <jakub@redhat.com>
7921 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7922 lll_futex_wake): Declare register variables as long int instead of
7923 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7924 Make syscall arguments clobbered by the syscall.
7925 (lll_futex_wait): Define using lll_futex_timed_wait.
7927 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7930 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7933 * allocatestack.c (nptl_ncreated): Only declare if
7934 COLORING_INCREMENT != 0.
7936 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7937 (__libc_enable_asynccancel_2): Remove prototype.
7939 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7940 ctid to match kernel.
7942 2003-03-12 Ulrich Drepper <drepper@redhat.com>
7944 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7945 libc_multiple_threads.
7946 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7947 __libc_multiple_threads to...
7948 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
7950 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7952 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7953 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7955 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7956 (__pthread_once_internal): Define.
7958 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7959 macros instead of .symver directly.
7960 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7961 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7963 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7964 * sysdeps/x86_64/tcb-offsets.sym: New file.
7965 * sysdeps/x86_64/Makefile: New file.
7967 * sysdeps/i386/tcb-offsets.sym: Add SELF.
7968 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7969 to access own pthread_t in TCB.
7970 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7972 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7974 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7976 2003-03-12 Roland McGrath <roland@redhat.com>
7978 * pthread-errnos.sym: New file.
7979 * Makefile (gen-as-const-headers): New variable, list that file.
7980 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7981 header <pthread-errnos.h> instead of defining errno values here.
7982 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7983 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7984 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7985 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7986 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7988 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7990 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7991 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7992 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7993 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7994 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7995 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7996 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7997 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7998 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7999 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8000 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8001 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8002 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8003 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8004 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8005 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8006 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8007 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8008 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8009 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8010 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8011 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8012 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8013 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8014 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8015 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8016 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8018 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8019 CLONE_CHILD_SETTID worked.
8021 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8023 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8025 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8028 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8029 (pthread_cond_t): Add padding.
8031 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8032 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8033 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8035 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8036 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8037 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8038 (__pthread_rwlock_timedrdlock): Likewise.
8039 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8040 (__pthread_rwlock_wrlock): Likewise.
8041 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8042 (__pthread_rwlock_rdlock): Likewise.
8044 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8046 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8047 result of lock re-get if it fails.
8049 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8051 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8052 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8053 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8054 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8055 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8056 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8057 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8058 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8059 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8060 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8062 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8063 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8065 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8066 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8067 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8068 (create_thread): Likewise.
8069 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8070 * init.c (__pthread_initialize_minimal_internal): Initialize
8071 __libc_multiple_threads_ptr if necessary.
8072 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
8073 __pthread_multiple_threads and __libc_multiple_threads_ptr.
8074 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8075 __libc_multiple_threads.
8076 (__libc_pthread_init): Return pointer to __libc_pthread_init if
8079 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8080 (THREAD_SETMEM_NC): Likewise.
8082 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8083 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8084 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8085 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8087 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8088 Eliminate one entire instruction.
8090 * cancellation.c (__pthread_enable_asynccancel_2): New function.
8091 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8092 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8093 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8094 instead of __pthread_enable_asynccancel.
8095 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8096 (__pthread_cond_wait): Likewise.
8097 * sysdeps/pthread/pthread_cond_timedwait.c
8098 (__pthread_cond_timedwait): Likewise.
8099 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8101 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8102 (__condvar_cleanup): Wake up all waiters in case we got signaled
8103 after being woken up but before disabling asynchronous
8105 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8106 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8107 (__condvar_cleanup): Likewise.
8109 * init.c (__NR_set_tid_address): If already defined, don't redefine.
8110 Make it an error if architecture has no #if case. Add x86-64.
8112 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8113 pt-initfini.s generation.
8115 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8116 (TLS_INIT_TP): Fix typo.
8118 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8120 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8121 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8123 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8124 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8125 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8126 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8127 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8128 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8129 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8130 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8132 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8134 * sysdeps/pthread/pthread_cond_timedwait.c
8135 (__pthread_cond_timedwait): Return the result of the final
8136 locking. If it succeeds, the regular function return value.
8138 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8139 Return result of the final locking.
8140 * version.c (__nptl_main): Work around problems with the strange
8141 INTERNAL_SYSCALL macro on ppc32.
8142 * init.c (__pthread_initialize_minimal_internal): Unblock
8143 SIGCANCEL in case the parent blocked it.
8144 Reported by Paul Mackerras <paulus@samba.org>.
8146 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8147 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8148 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8150 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8152 * sysdeps/pthread/pthread_cond_timedwait.c
8153 (__pthread_cond_timedwait): Unlock and fail if
8154 __pthread_mutex_unlock_internal failed.
8156 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8157 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8159 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8160 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8161 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8162 ALLOCATE_STACK): New macros.
8163 (TLS_TPADJ): New macro.
8164 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8165 (allocate_stack): Handle TLS_DTV_AT_TP and
8166 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
8167 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8169 * init.c [__ia64__] (__NR_set_tid_address): Define.
8171 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8172 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8173 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8174 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8175 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8176 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8177 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8178 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8179 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8180 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8181 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8182 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8183 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8184 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8185 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8186 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8187 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8188 * sysdeps/ia64/bits/atomic.h: New file.
8189 * sysdeps/ia64/Makefile: New file.
8190 * sysdeps/ia64/pthread_spin_init.c: New file.
8191 * sysdeps/ia64/pthread_spin_lock.c: New file.
8192 * sysdeps/ia64/pthread_spin_trylock.c: New file.
8193 * sysdeps/ia64/pthread_spin_unlock.c: New file.
8194 * sysdeps/ia64/pthreaddef.h: New file.
8195 * sysdeps/ia64/tcb-offsets.sym: New file.
8196 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8197 * sysdeps/ia64/tls.h: New file.
8199 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8200 to syscall instead of no arguments.
8202 2003-03-10 Ulrich Drepper <drepper@redhat.com>
8204 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8205 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8206 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8207 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8209 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8212 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8214 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8215 lowlevelbarrier.sym.
8216 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8217 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8218 Include lowlevelbarrier.h and don't define offsets locally.
8219 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8221 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8222 (__lll_mutex_lock_wait): Reverse order of first two parameters.
8223 (__lll_mutex_timedlock_wait): Likewise.
8224 (lll_mutex_lock): Adjust asm for that.
8225 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
8226 (lll_lock): Adjust asm for operand order change.
8227 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8228 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8230 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8231 Reverse order of parameters.
8232 (__lll_timedwait_tid): Remove regparms attribute.
8233 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8234 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8236 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8237 (__lll_timedwait_tid): Remove one unnecessary instruction.
8239 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8240 __lll_mutex_timedlock_wait only for NOT_IN_libc.
8241 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8244 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8245 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8247 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8250 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8251 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
8253 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8254 define LOCK here (if UP is not defined). The actual code is in
8257 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8258 LOCK is already defined. Don't define lll_unlock_wake_cb and
8259 __lll_timedwait_tid for libc.so.
8260 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8261 define LOCK here (if UP is not defined). The actual code is in
8264 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8265 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8266 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8267 instead of lowlevelsem.h.
8268 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8269 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8270 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8272 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8274 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8275 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8276 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8278 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8280 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8283 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8285 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8286 of __libc_locking_needed.
8287 (lll_trylock): Initialize %eax to zero.
8289 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8290 pthread_cond_t definition.
8292 2003-03-10 Roland McGrath <roland@redhat.com>
8294 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8295 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8296 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8297 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8298 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8300 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8301 Instead of setting PD->multiple_threads, set globals
8302 __pthread_multiple_threads and __libc_multiple_threads.
8303 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8304 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8305 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8307 * descr.h (struct pthread): Conditionalize first member on
8308 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
8309 containing an anonymous tcbhead_t. Move `list' member out.
8310 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8311 * allocatestack.c: Remove use of `header.data.' prefix.
8312 * pthread_create.c: Likewise.
8313 * init.c (__pthread_initialize_minimal_internal): Likewise.
8314 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8315 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8316 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8317 * sysdeps/x86_64/tls.h: Likewise.
8318 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8319 (SINGLE_THREAD_P): Likewise.
8320 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8321 (SINGLE_THREAD_P): Likewise.
8322 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8323 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8325 2003-03-09 Ulrich Drepper <drepper@redhat.com>
8327 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8329 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8330 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8332 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8333 leftovers from the ia32 code.
8335 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8337 (clear_once_control): Don't load %esi.
8339 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8342 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8344 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8345 * sysdeps/unix/sysv/linux/createthread.c: ...here.
8347 * Makefile (tests): Add tst-cond10.
8348 * tst-cond10.c: New file.
8350 2003-03-08 Ulrich Drepper <drepper@redhat.com>
8352 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8353 * tst-signal3.c (do_test): Likewise.
8354 * tst-sem5.c (do_test): Likewise.
8355 * tst-kill6.c (do_test): Likewise.
8356 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
8358 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8360 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8361 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8362 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8363 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8364 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8365 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8366 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8368 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8370 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8371 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8372 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8373 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8374 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8375 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8376 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8377 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8379 * allocatestack.c (allocate_stack): If mprotect() fails free the
8382 2003-03-07 Ulrich Drepper <drepper@redhat.com>
8384 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8386 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8387 lll_wake_tid. This was used only to work around kernel limits in
8389 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8390 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8391 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8392 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8394 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8395 (__pthread_initialize_minimal_internal): Change initialization of
8396 __static_tls_align_m1 appropriately.
8397 * pthreadP.h (__static_tls_align_m1): Renamed from
8399 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8400 instead of __static_tls_align-1.
8402 2003-03-04 Ulrich Drepper <drepper@redhat.com>
8404 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8406 * pthread_create.c: Define __pthread_keys using nocommon
8407 attribute, not by placing it explicitly in bss.
8408 Remove DEFINE_DEALLOC definition. Not needed anymore.
8410 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8411 Use it in mmap call to allocate stacks.
8413 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8415 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8416 result of the thread function.
8418 2003-03-03 Ulrich Drepper <drepper@redhat.com>
8420 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
8421 version is just fine.
8423 * sysdeps/unix/sysv/linux/libc_pthread_init.c
8424 (__pthread_child_handler): Renamed from pthread_child_handler,
8425 exported, and marked hidden. Change all users.
8426 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8427 free __pthread_child_handler from child list.
8429 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
8431 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8433 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8434 Fix handling of cancellation and failing pthread_mutex_unlock call.
8435 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8436 (__pthread_cond_wait): Likewise.
8438 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8439 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8440 lll_futex_timed_wait call.
8441 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8442 (pthread_rwlock_timedwrlock): Likewise.
8444 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8445 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8446 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8448 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8449 check of lll_futex_wake return value.
8451 2003-03-03 Roland McGrath <roland@redhat.com>
8453 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8455 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8456 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8457 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8459 2003-03-02 Ulrich Drepper <drepper@redhat.com>
8461 * sysdeps/pthread/timer_create.c (timer_create): Return correct
8462 error for CPU clocks.
8464 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8465 _POSIX_MONOTONIC_CLOCK.
8466 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8468 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8471 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8473 * descr.h (struct pthread): Move cleanup field to the front.
8475 2003-03-01 Roland McGrath <roland@redhat.com>
8477 * sem_open.c (sem_open): Braino fix.
8479 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8481 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8482 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8483 __pthread_cleanup_pop functionality.
8484 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8486 * descr.h (struct pthread): Move tid field to the front now that
8489 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8490 (__lll_mutex_timedlock_wait): Remove.
8491 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8492 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8493 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8494 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8495 (lll_unlock_wake_cb): Don't save and restore %esi.
8496 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8498 (__lll_timedwait_tid): Add alignment.
8499 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8500 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8502 (__lll_timedwait_tid): Removed.
8503 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8504 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8505 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8506 (pthread_barrier_wait): Don't save, load, and restore %esi for
8508 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8509 (__pthread_cond_signal): Don't save, load, and restore %esi.
8510 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8511 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8512 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8513 Don't save, load, and restore %esi.
8515 2003-02-27 Ulrich Drepper <drepper@redhat.com>
8517 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8518 Release lock before waking up the waiters.
8520 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8522 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8523 (reader_thread): Likewise.
8525 * sysdeps/pthread/pthread_rwlock_unlock.c
8526 (__pthread_rwlock_unlock): Release internal lock early. Don't try
8527 to wake up readers if there are none.
8529 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8530 Release internal lock before wake threads.
8532 2003-02-26 Ulrich Drepper <drepper@redhat.com>
8534 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8535 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
8537 * tst-rwlock9.c: Likewise.
8538 * tst-rwlock10.c: New file.
8539 * tst-rwlock11.c: New file.
8541 * Makefile (tests): Add tst-dlsym1.
8542 * tst-dlsym1.c: New file.
8544 * init.c (__pthread_initialize_minimal_internal): Set
8545 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8546 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8548 2003-02-24 Ulrich Drepper <drepper@redhat.com>
8550 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8552 * tst-cond2.c: Fix sychronization with child.
8554 * tst-rwlock8.c (reader_thread): Remove unused variable.
8556 * Makefile: Add rules to build and run tst-tls3.
8557 * tst-tls3.c: New file.
8558 * tst-tls3mod.c: New file.
8560 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8561 * tst-rwlock8.c: New file.
8562 * tst-rwlock9.c: New file.
8563 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8564 complete broken rwlock implementation.
8565 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8567 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8569 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8570 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8571 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8572 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8573 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8574 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8575 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8577 2003-02-23 Roland McGrath <roland@redhat.com>
8579 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8581 2003-02-23 Ulrich Drepper <drepper@redhat.com>
8583 * Makefile (tests): Add tst-context1.
8584 * tst-context1.c: New file.
8586 * Makefile (tests): Add tst-tls1 and tst-tls2.
8587 * tst-tls1.c: New file.
8588 * tst-tls2.c: New file.
8590 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8593 * pthread_create.c (start_thread): Set EXITING_BIT early.
8595 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8596 (THREAD_GETMEM_NC): Likewise.
8598 2003-02-22 Ulrich Drepper <drepper@redhat.com>
8600 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8601 off 3 more bytes by using offset-less instructions when possible.
8603 * Makefile: Add dependency for $(objpfx)version.d.
8605 * eintr.c (eintr_source): Add unnecessary return but the compiler
8608 * tst-kill3.c: Include <unistd.h>.
8610 2003-02-21 Roland McGrath <roland@redhat.com>
8612 * pthread_create.c (start_thread): Call __libc_thread_freeres.
8614 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8616 * Makefile (tests): Add tst-eintr1.
8617 (distribute): Add eintr.c.
8618 * tst-eintr1.c: New file.
8619 * eintr.c: New file.
8621 * pthread_cancel.c (pthread_cancel): Use tkill directly.
8623 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8624 Disallow sending SIGCANCEL.
8626 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
8627 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8628 * tst-kill1.c: New file.
8629 * tst-kill2.c: New file.
8630 * tst-kill3.c: New file.
8631 * tst-kill5.c: New file.
8632 * tst-kill6.c: New file.
8633 * tst-basic7.c: Renamed to...
8634 * tst-kill4.c: ...this.
8636 2003-02-21 Roland McGrath <roland@redhat.com>
8638 * Makefile (install-lib-ldscripts): New variable.
8640 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8642 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8643 * pthread_cancel.c: Use INVALID_TD_P.
8644 * pthread_detach.c: Likewise.
8645 * pthread_getschedparam.c: Likewise.
8646 * pthread_setschedparam.c: Likewise.
8647 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8648 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8649 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8650 * pthread_timedjoin.c: Likewise.
8652 * tst-basic7.c: Include <signal.h>.
8654 * pthread_join.c (pthread_join): Limited checking for invalid
8656 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8658 2003-02-20 Ulrich Drepper <drepper@redhat.com>
8660 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8661 beginning of the loop. Clear the entire first block of TSD.
8662 * Makefile (tests): Add tst-key4.
8663 * tst-key4.c: New file.
8665 2003-02-18 Ulrich Drepper <drepper@redhat.com>
8667 * Makefile (tests): Add tst-basic7.
8668 * tst-basic7.c: New file.
8670 * pthread_create.c (deallocate_tsd): Mark as internal_function.
8671 Add some more __builtin_expect.
8673 * pthreadP.h: Define dummy version of DEBUGGING_P.
8675 2003-02-17 Ulrich Drepper <drepper@redhat.com>
8677 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8678 _POSIX_THREAD_PRIORITY_SCHEDULING.
8679 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8680 _XOPEN_REALTIME_THREADS.
8681 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8683 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8684 kernel returns EINVAL for PID <= 0, work around it.
8686 * Makefile (tests): Add tst-signal5.
8687 * tst-signal5.c: New file.
8689 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8692 * tst-cancel1.c (tf): Block all signals.
8694 * Makefile (tests): Add tst-basic6.
8695 * tst-basic6.c: New file.
8697 * tst-basic1.c: Add test for process ID.
8699 * Makefile (tests): Add tst-cancel10.
8700 * tst-cancel10.c: New file.
8702 * Makefile (tests): Add tst-signal4.
8703 * tst-signal4.c: New file.
8705 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8706 __sigismember instead of sigismember. Add __builtin_expect.
8708 2003-02-16 Ulrich Drepper <drepper@redhat.com>
8710 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8711 pthread_setcancelstate, and pthread_rwlock_setpshared.
8713 * tst-cancel7.c (do_test): Make sure the pid file exists before
8714 canceling the thread.
8716 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8717 pthread_rwlock_timedrdlock tests.
8718 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8719 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8720 Check for invalid tv_nsec field.
8721 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8724 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8725 recursive mutex of overflow.
8727 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8729 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8730 going into an endless loop.
8731 * Makefile (tests): Add tst-cancel9.
8732 * tst-cancel9.c: New file.
8734 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8736 2003-02-15 Ulrich Drepper <drepper@redhat.com>
8738 * tst-mutex5.c (do_test): Add more timedlock tests.
8740 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8741 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8743 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8744 use INLINE_SYSCALL. Error number is returned, not -1.
8746 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8747 and __deallocate_stack with internal_function.
8748 * pthread_create.c: Adjust definitions appropriately.
8749 * allocatestack.c: Likewise.
8751 * pthread_join.c: Add one more __builtin_expect.
8752 * pthread_timedjoin.c: Likewise.
8754 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8755 not data of sequence number does not match.
8756 Add one __builtin_expect.
8758 * Makefile (tests): Add tst-clock1.
8759 * tst-clock1.c: New file.
8761 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8763 * Makefile (tests): Add tst-basic5.
8764 * tst-basic5.c: New file.
8766 2003-02-14 Ulrich Drepper <drepper@redhat.com>
8768 * Makefile (tests): Add tst-basic4.
8769 * tst-basic4.c: New file.
8771 * pthreadP.h: Add declaraction for __nptl_nthreads.
8772 * pthread_create.c: Define __nptl_nthreads
8773 (start_thread): Increment __nptl_nthreads at beginning. Decrement
8774 after thread is done. If then zero, call exit(0).
8775 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8776 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
8777 * init.c (pthread_functions): Initialize ptr_nthreads.
8778 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8779 (__reclaim_stacks): Decrement __nptl_nthreads.
8780 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8782 * Makefile (tests): Add tst-basic3.
8783 * tst-basic3.c: New file.
8785 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
8786 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
8787 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8788 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
8789 if asynchronous canceling is enabled.
8790 * pthread_join.c (pthread_join): When recognizing circular joins,
8791 take into account the other thread might be already canceled.
8792 * Makefile (tests): Add tst-join5.
8793 * tst-join5.c: New file.
8795 * Makefile (tests): Add tst-join4.
8796 * tst-join4.c: New file.
8798 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8800 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8802 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
8804 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8805 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8806 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8808 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8810 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8811 error if lll_futex_wake failed.
8813 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8815 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8816 handling of cancellation and failung pthread_mutex_unlock call.
8817 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8818 * Makefile (tests): Add tst-cond8 and tst-cond9.
8819 * tst-cond8.c: New file.
8820 * tst-cond9.c: New file.
8822 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8824 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
8825 non-standard initializers with __USE_GNU.
8827 * Makefile (tests): Add tst-cleanup3.
8828 * tst-cleanup3.c: New file.
8830 2003-02-12 Ulrich Drepper <drepper@redhat.com>
8832 * Makefile (tests): Add tst-attr1 and tst-attr2.
8833 * tst-attr1.c: New file.
8834 * tst-attr2.c: New file.
8836 * Makefile: Add rules to build and run tst-atfork2 test.
8837 * tst-atfork2.c: New file.
8838 * tst-atfork2mod.c: New file.
8840 * sysdeps/unix/sysv/linux/unregister-atfork.c
8841 (__unregister_atfork): Free the memory allocated for the handlers
8842 after removing them from the lists.
8844 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8847 * tst-atfork1.c (do_test): Wait for the child we forked.
8848 Report error in child.
8850 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8852 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8854 2003-02-10 Ulrich Drepper <drepper@redhat.com>
8856 * Makefile (tests): Add tst-cancel8.
8857 * tst-cancel8.c: New file.
8859 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8860 clearing of control variable.
8861 * Makefile (tests): Add tst-once3 and tst-once4.
8862 * tst-once3.c: New file.
8863 * tst-once4.c: New file.
8865 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
8867 * sysdeps/sh/Makefile: New file.
8868 * sysdeps/sh/bits/atomic.h: New file.
8869 * sysdeps/sh/pthread_spin_init.c: New file.
8870 * sysdeps/sh/pthread_spin_lock.c: New file.
8871 * sysdeps/sh/pthread_spin_trylock.S: New file.
8872 * sysdeps/sh/pthread_spin_unlock.S: New file.
8873 * sysdeps/sh/pthreaddef.h: New file.
8874 * sysdeps/sh/tcb-offsets.sym: New file.
8875 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8876 * sysdeps/sh/tls.h: New file.
8877 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8878 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8879 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8880 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8881 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8882 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8883 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8884 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8885 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8886 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8887 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8888 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8889 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8890 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8891 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8892 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8893 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8894 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8895 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8896 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8897 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8898 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8899 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8900 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8901 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8902 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8903 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8904 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8905 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8906 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8908 2003-02-08 Ulrich Drepper <drepper@redhat.com>
8910 * tst-cond2.c: Rearrange code to not rely on behavior undefined
8913 * tst-basic2.c (do_test): Lock mutex before creating the thread.
8915 2003-02-07 Ulrich Drepper <drepper@redhat.com>
8917 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8918 (TLS_GET_FS): New #define.
8919 (TLS_SET_FS): New #define.
8920 Correct value of __NR_set_thread_area.
8922 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8924 2003-02-06 Ulrich Drepper <drepper@redhat.com>
8926 * Makefile (tests): Add tst-popen1.
8927 * tst-popen1.c: New file.
8929 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8930 but inactive generalization.
8931 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8932 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8933 Minor optimization, remove one instruction.
8934 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8936 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
8938 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8940 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
8942 * init.c (__NR_set_tid_address): Add #ifdef for s390.
8943 * sysdeps/pthread/pthread_barrier_wait.c: New file.
8944 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8945 * sysdeps/pthread/pthread_cond_signal.c: New file.
8946 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8947 * sysdeps/pthread/pthread_cond_wait.c: New file.
8948 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8949 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8950 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8951 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8952 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8953 * sysdeps/s390/Makefile: New file.
8954 * sysdeps/s390/bits/atomic.h: New file.
8955 * sysdeps/s390/pthread_spin_init.c: New file.
8956 * sysdeps/s390/pthread_spin_lock.c: New file.
8957 * sysdeps/s390/pthread_spin_trylock.c: New file.
8958 * sysdeps/s390/pthread_spin_unlock.c: New file.
8959 * sysdeps/s390/pthreaddef.h: New file.
8960 * sysdeps/s390/tcb-offsets.sym: New file.
8961 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8962 * sysdeps/s390/tls.h: New file.
8963 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8964 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8965 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8966 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8967 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8968 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8969 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8970 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8971 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8972 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8973 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8974 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8975 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8976 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8977 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8978 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8979 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8980 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8981 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8982 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8983 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8984 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8985 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8987 2003-02-04 Ulrich Drepper <drepper@redhat.com>
8989 * atomic.h: Add a couple more default implementations.
8990 (atomic_compare_and_exchange_acq): Use
8991 __arch_compare_and_exchange_32_acq in return value definition. It
8993 (atomic_bit_set): Renamed from atomic_set_bit.
8994 Add missing atomic_ prefixes.
8996 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8997 thread library is available, use correct value to mark initialized
9000 2003-02-03 Ulrich Drepper <drepper@redhat.com>
9002 * allocatestack.c (allocate_stack): Use __getpagesize instead of
9003 __sysconf to determine pagesize.
9005 * pthread_create.c: Include <atomic.h>.
9006 * allocatestack.c (allocate_stack): Implement coloring of the
9007 allocated stack memory. Rename pagesize to pagesize_m1. It's the
9008 size minus one. Adjust users.
9009 * sysdeps/i386/i686/Makefile: New file.
9011 2003-02-02 Ulrich Drepper <drepper@redhat.com>
9013 * allocatestack.c: Improve comment throughout the file.
9015 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9016 (__lll_lock_wait): Add branch prediction.
9017 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9018 (__lll_lock_wait): Likewise.
9019 (lll_unlock_wake_cb): Removed.
9021 2003-01-31 Ulrich Drepper <drepper@redhat.com>
9023 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9024 _POSIX_THREAD_PRIORITY_SCHEDULING.
9026 2003-01-30 Jakub Jelinek <jakub@redhat.com>
9028 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9029 Fix return type of ptr___pthread_getspecific.
9031 2003-01-29 Ulrich Drepper <drepper@redhat.com>
9033 * Makefile (tests): Add tst-umask1.
9034 (tst-umask1-ARGS): Define.
9035 * tst-umask1.c: New file.
9037 2003-01-28 Ulrich Drepper <drepper@redhat.com>
9039 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
9040 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9041 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9042 pthread_rwlock_unlock.
9043 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9044 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9045 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9046 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9047 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9049 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9050 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9052 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9053 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9054 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9056 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9057 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9059 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9060 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9061 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9063 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9064 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9066 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9068 * Makefile (libpthread-routines): Remove lowlevelcond and
9069 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9070 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9071 and pthread_cond_broadcast.
9072 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9073 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9074 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9075 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9076 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9077 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9078 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9079 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9080 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9081 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9082 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9083 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9084 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9085 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9086 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9087 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9088 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9089 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9090 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9091 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9092 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9093 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9094 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9095 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9096 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9097 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9098 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9099 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9100 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9101 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9102 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9104 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9105 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
9106 of the code is moved to ...
9107 * sysdeps/pthread/createthread.c: ...here. New file.
9109 2003-01-27 Ulrich Drepper <drepper@redhat.com>
9111 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9112 (__new_sem_post): Clear %eax before returning.
9113 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9115 * Makefile (tests): Add tst-cleanup2.
9116 * tst-cleanup2.c: New file.
9118 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9119 Interpret first parameter correctly.
9121 2003-01-17 Ulrich Drepper <drepper@redhat.com>
9123 * Makefile (headers): Add bits/semaphore.h.
9125 2003-01-16 Jakub Jelinek <jakub@redhat.com>
9127 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9130 2003-01-14 Ulrich Drepper <drepper@redhat.com>
9132 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9133 must be used and mapping failed.
9134 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9136 * Makefile (CFLAGS-pthread_self.os): Define this, not
9137 CFLAGS-pthread_self.c.
9139 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9141 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9144 * Makefile (libpthread-routines): Add version. Add rules to build
9145 version.os and banner.h.
9146 * version.c: New file.
9148 2003-01-13 Jakub Jelinek <jakub@redhat.com>
9150 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9151 the alias unconditional.
9152 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
9154 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9156 * Makefile (CFLAGS-pthread_self.c): New definition.
9158 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9160 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9161 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9162 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9163 * init.c (__pthread_initialize_minimal_internal): Likewise.
9165 2003-01-07 Jakub Jelinek <jakub@redhat.com>
9167 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9169 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9170 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9171 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9172 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9173 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9174 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9176 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9178 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9179 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9180 * tst-cancel-wrappers.sh: Remove all exceptions.
9182 2003-01-05 Ulrich Drepper <drepper@redhat.com>
9184 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9185 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
9187 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9188 Use __libc_pthread_functions array if SHARED.
9190 * pthreadP.h: Move pthread_cond_2_0_t definition to...
9191 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9193 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9194 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9195 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9196 __libc_ptf_call instead of __libc_maybe_call.
9198 (__libc_cleanup_region_start): Wrap function name with PTF call.
9199 (__libc_cleanup_region_end): Likewise.
9200 (__libc_cleanup_end): Likewise.
9202 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9203 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9204 * pthread_key_create.c: Add __pthread_key_create_internal alias.
9205 * pthreadP.h: Add prototypes.
9207 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9208 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9209 __pthread_rwlock_unlock aliases.
9210 * pthreadP.h: Add prototypes for new aliases.
9212 * pthreadP.h (struct pthead_functions): Moved to...
9213 * sysdeps/pthread/pthread-functions.h: ...here. New file.
9214 * init.c (pthread_functions): Add initializers for new elements.
9216 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9217 __pthread_cleanup_pop_restore aliases.
9218 * pthreadP.h: Add prototypes.
9220 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9221 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9222 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9223 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9224 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9225 * pthreadP.h: Adjust prototypes and callers.
9227 2003-01-04 Ulrich Drepper <drepper@redhat.com>
9229 * Makefile (tests): Add tst-cancel7.
9230 (tst-cancel7-ARGS): New variable.
9231 * tst-cancel7.c: New file.
9233 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9234 around gcc defficiencies.
9235 * old_pthread_cond_signal.c: Likewise.
9236 * old_pthread_cond_timedwait.c: Likewise.
9237 * old_pthread_cond_wait.c: Likewise.
9239 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9241 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9243 * Makefile (tests): Add tst-cond7.
9244 * tst-cond7.c: New file.
9246 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9247 (condvar_cleanup): Get condvar address from the right place.
9249 * atomic.h: Correct definitions of atomic_full_barrier,
9250 atomic_read_barrier, atomic_write_barrier.
9252 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9254 * old_pthread_cond_signal.c: Likewise.
9255 * old_pthread_cond_timedwait.c: Likewise.
9256 * old_pthread_cond_wait.c: Likewise.
9258 2003-01-03 Jakub Jelinek <jakub@redhat.com>
9260 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9262 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9264 * pthreadP.h (pthread_cond_2_0_t): New type.
9265 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9266 Use new type for the 2.0 condvar function prototypes.
9267 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9268 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9270 * old_pthread_cond_destroy.c: Likewise.
9271 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
9272 * old_pthread_cond_signal.c: Likewise.
9273 * old_pthread_cond_timedwait.c: Likewise.
9274 * old_pthread_cond_wait.c: Likewise.
9276 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9277 (__pthread_cond_wait): Don't save cancellation mode and seq value
9280 * herrno.c (__h_errno_location): Don't define as weak.
9282 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9284 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9285 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9286 and pthread_cond_wait.
9287 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9289 (__pthread_cond_broadcast_2_0): ... this.
9290 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9292 (__pthread_cond_destroy_2_0): ... this.
9293 * old_pthread_cond_init.c (__old_pthread_cond_init):
9295 (__pthread_cond_init_2_0): ... this.
9296 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9298 (__pthread_cond_signal_2_0): ... this.
9299 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9301 (__pthread_cond_wait_2_0): ... this.
9302 * pthread_cond_destroy.c: Include shlib-compat.h.
9303 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9304 * pthread_cond_init.c: Include shlib-compat.h.
9305 (pthread_cond_init): Change strong_alias into versioned_symbol.
9306 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9307 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9309 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9310 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9311 __pthread_cond_wait_2_0): New prototypes.
9312 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9313 __old_pthread_cond_init, __old_pthread_cond_signal,
9314 __old_pthread_cond_wait): Removed.
9315 * init.c: Include shlib-compat.h.
9316 (pthread_functions): Guard ptr___pthread_attr_init_2_0
9317 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9318 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9319 ptr___pthread_cond_*_2_0 fields.
9320 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9321 pthread_cond_*@GLIBC_2.0 compatibility symbols.
9323 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9324 LIBC_SIGACTION was not yet defined.
9325 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9326 [!defined LIBC_SIGACTION] (__sigaction): New function and
9328 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9329 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9331 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9333 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9335 2003-01-02 Ulrich Drepper <drepper@redhat.com>
9337 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9338 New, larger type definition.
9339 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9341 * Versions [libpthread]: Add definitions for new pthread_cond_*
9342 interfaces for version GLIBC_2.3.2.
9343 * pthread_cond_init.c: Update initialization for new type definition.
9344 * Makefile (libpthread-routines): Remove pthread_cond_wait,
9345 pthread_cond_timedwait, pthread_cond_signal, and
9346 pthread_cond_broadcast. Add old_pthread_cond_init,
9347 old_pthread_cond_destroy, old_pthread_cond_wait,
9348 old_pthread_cond_timedwait, old_pthread_cond_signal, and
9349 old_pthread_cond_broadcast.
9350 * old_pthread_cond_broadcast.c: New file.
9351 * old_pthread_cond_destroy.c: New file.
9352 * old_pthread_cond_init.c: New file.
9353 * old_pthread_cond_signal.c: New file.
9354 * old_pthread_cond_timedwait.c: New file.
9355 * old_pthread_cond_wait.c: New file.
9356 * pthreadP.h: Add prototypes for the compatibility interfaces.
9358 * pthread_cond_destroy.c: Don't include <errno.h>.
9360 2003-01-01 Ulrich Drepper <drepper@redhat.com>
9362 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9363 unnecessary zero offset when addressing MUTEX.
9365 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9367 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9369 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9370 for __register_atfork.
9372 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9374 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9375 instead of ASSEMBLER test macro.
9377 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9378 __libc_current_sigrtmax): Add libc_hidden_def.
9380 * sysdeps/pthread/list.h: Remove assert.h include.
9382 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9384 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9385 __pthread_initialize_minimal_internal not
9386 __pthread_initialize_minimal.
9388 2002-12-30 Ulrich Drepper <drepper@redhat.com>
9390 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9391 __pthread_initialize_minimal as hidden.
9393 * init.c (__pthread_initialize_minimal_internal): Don't mark as
9396 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9398 * Makefile ($(inst_libdir)/libpthread.so): Depend on
9399 $(common-objpfx)format.lds, include that into the output script.
9401 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9403 2002-12-28 Andreas Jaeger <aj@suse.de>
9405 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9406 nsec resolution changes.
9407 (xstat64_conv): Likewise.
9408 (xstat32_conv): Likewise.
9409 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9411 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9412 structs stat and stat64.
9413 * time/time.h (__timespec_defined): Define for __USE_MISC.
9414 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9416 2002-12-30 Jakub Jelinek <jakub@redhat.com>
9418 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
9420 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9421 (pthread_exit): Use strong_alias to avoid warnings.
9422 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9423 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9424 ptr___pthread_attr_init_2_*.
9425 * init.c (pthread_functions): Adjust.
9427 2002-12-29 Ulrich Drepper <drepper@redhat.com>
9429 * forward.c: Make all functions available by default again. It
9430 caused too much trouble.
9432 * pt-siglongjmp.c: Removed.
9434 2002-12-28 Jakub Jelinek <jakub@redhat.com>
9436 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9437 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9438 * sysdeps/i386/Makefile: New file.
9439 * sysdeps/i386/tcb-offsets.sym: New file.
9440 * sysdeps/pthread/tcb-offsets.h: New file.
9441 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9442 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9444 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9445 __register_atfork...
9446 (GLIBC_2.3.2): ...here.
9448 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9450 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9451 pthread_attr_setstackaddr with __attribute_deprecated__.
9453 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9455 * pt-system.c (system): Remove cancellation handling.
9456 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9457 cancellation routines.
9459 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9461 * descr.h: Include <dl-sysdep.h>.
9462 (struct pthread): Move header.data.list to the back of the struct.
9463 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9464 (MULTIPLE_THREADS_OFFSET): Adjust offset.
9465 (SYSINFO_OFFSEET): Likewise.
9467 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9469 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9471 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9472 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9473 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9474 (USE_DL_SYSINFO): Undef.
9476 2002-12-22 Jakub Jelinek <jakub@redhat.com>
9478 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9479 $(common-objpfx)libc.so.
9480 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9481 it is bigger than pipe buffer size even on arches with bigger
9483 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9485 2002-12-25 Ulrich Drepper <drepper@redhat.com>
9487 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9488 correct errno access for case that USE___THREAD is not defined.
9490 2002-12-24 Ulrich Drepper <drepper@redhat.com>
9492 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9493 Patch by Marijn Ros <marijn@mad.scientist.com>.
9495 2002-12-22 Roland McGrath <roland@redhat.com>
9497 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9499 2002-12-20 Ulrich Drepper <drepper@redhat.com>
9501 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9503 2002-12-19 Ulrich Drepper <drepper@redhat.com>
9505 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9506 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9507 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9509 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9511 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9512 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9513 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9514 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9515 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9516 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9517 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9518 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9520 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9522 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9524 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9526 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9528 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9529 that sysinfo is properly initialized.
9530 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9531 to 1 only for ld.so.
9533 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9534 RTLD_CORRECT_DYNAMIC_WEAK.
9536 2002-12-19 Jakub Jelinek <jakub@redhat.com>
9538 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9539 Use return 0 as 6th argument to FORWARD4.
9540 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9542 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9544 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9545 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9546 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9547 (INIT_SYSINFO): New #define.
9548 (TLS_TP_INIT): Use INIT_SYSINFO.
9549 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9550 At test to make sure SYSINFO_OFFSET value is correct.
9551 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9553 2002-12-18 Jakub Jelinek <jakub@redhat.com>
9555 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9556 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9557 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9558 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9559 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9560 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9561 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9563 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9565 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9566 macro instead of using int $0x80 directly.
9568 * sysdeps/pthread/bits/stdio-lock.h: New file.
9569 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9570 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9571 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9572 * Makefile (routines): Add libc-lowlevelmutex.
9574 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9575 __i686.get_pc_thunk.dx.
9577 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9579 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9580 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9581 ($(objpfx)tst-cancel-wrappers.out): New rule.
9582 * tst-cancel-wrappers.sh: New test.
9583 * tst-locale1.c: Include signal.h.
9584 (uselocale): Test static linking of __libc_current_sigrt*.
9586 2002-12-17 Ulrich Drepper <drepper@redhat.com>
9588 * Makefile (tests): Add tst-cancel6.
9589 * tst-cancel6.c: New file
9591 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9593 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9594 Define meaningfully for assembler as well.
9595 * pthreadP.h (struct pthread_functions): Remove
9596 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
9597 and ptr_pthread_attr_init_2_1 fields.
9598 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9599 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9600 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9601 (FORWARD3): Define using FORWARD4.
9602 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9604 * pt-system.c: Remove duplicate stdlib.h include.
9606 2002-12-16 Ulrich Drepper <drepper@redhat.com>
9608 * sem_init.c: Define sem_init@GLIBC_2.0.
9609 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9610 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9612 * flockfile.c: Moved to...
9613 * sysdeps/pthread/flockfile.c: ...here. New file.
9614 * funlockfile.c: Moved to...
9615 * sysdeps/pthread/funlockfile.c: ...here. New file.
9616 * ftrylockfile.c: Moved to...
9617 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
9619 2002-12-16 Jakub Jelinek <jakub@redhat.com>
9621 * libc-cancellation.c: Guard both function with
9622 #if !defined NOT_IN_libc.
9623 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9624 automatically provided pthread wrappers.
9625 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9626 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9628 * pt-open.c: Removed.
9629 * pt-fcntl.c: Removed.
9630 * pt-fsync.c: Removed.
9631 * pt-lseek.c: Removed.
9632 * pt-msgrcv.c: Removed.
9633 * pt-msgsnd.c: Removed.
9634 * pt-msync.c: Removed.
9635 * pt-nanosleep.c: Removed.
9636 * pt-open64.c: Removed.
9637 * pt-pause.c: Removed.
9638 * pt-pread.c: Removed.
9639 * pt-pread64.c: Removed.
9640 * pt-pwrite.c: Removed.
9641 * pt-pwrite64.c: Removed.
9642 * pt-read.c: Removed.
9643 * pt-recv.c: Removed.
9644 * pt-recvfrom.c: Removed.
9645 * pt-recvmsg.c: Removed.
9646 * pt-send.c: Removed.
9647 * pt-sendto.c: Removed.
9648 * pt-sigtimedwait.c: Removed.
9649 * pt-sigwait.c: Removed.
9650 * pt-wait.c: Removed.
9651 * pt-waitpid.c: Removed.
9652 * pt-write.c: Removed.
9653 * pt-accept.c: Removed.
9654 * pt-close.c: Removed.
9655 * pt-connect.c: Removed.
9656 * pt-lseek64.c: Removed.
9657 * pt-sendmsg.c: Removed.
9658 * pt-tcdrain.c: Removed.
9660 2002-12-15 Ulrich Drepper <drepper@redhat.com>
9662 * init.c (__pthread_initialize_minimal_internal): Renamed from
9663 __pthread_initialize_minimal. Make old name an alias. This
9664 converts a normal relocation into a relative relocation.
9666 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9668 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9669 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9670 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9671 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9672 pt-sigwaitinfo, pt-waitid, and pt-writev.
9673 * pt-creat.c: Removed.
9674 * pt-poll.c: Removed.
9675 * pt-pselect.c: Removed.
9676 * pt-readv.c: Removed.
9677 * pt-select.c: Removed.
9678 * pt-sigpause.c: Removed.
9679 * pt-sigsuspend.c: Removed.
9680 * pt-sigwaitinfo.c: Removed.
9681 * pt-waitid.c: Removed.
9682 * pt-writev.c: Removed.
9684 * init.c (pthread_functions): New variable.
9685 (__pthread_initialize_minimal): Pass pointer to pthread_functions
9686 (or NULL) to __libc_pthread_init.
9687 * forward.c: Rewrite to use __libc:pthread_functions array to get
9689 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9691 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9692 Take new parameter. Copy content of variable pointed to by it
9693 to __libc_pthread_init.
9695 * pthreadP.h (struct pthread_functions): New type.
9696 (__libc_pthread_init): Declare.
9698 * pthread_attr_destroy.c: Add namespace protected alias.
9699 * pthread_attr_getdetachstate.c: Likewise.
9700 * pthread_attr_getinheritsched.c: Likewise.
9701 * pthread_attr_getschedparam.c: Likewise.
9702 * pthread_attr_getschedpolicy.c: Likewise.
9703 * pthread_attr_getscope.c: Likewise.
9704 * pthread_attr_setdetachstate.c: Likewise.
9705 * pthread_attr_setinheritsched.c: Likewise.
9706 * pthread_attr_setschedparam.c: Likewise.
9707 * pthread_attr_setschedpolicy.c: Likewise.
9708 * pthread_attr_setscope.c: Likewise.
9709 * pthread_cond_broadcast.c: Likewise.
9710 * pthread_cond_destroy.c: Likewise.
9711 * pthread_cond_init.c: Likewise.
9712 * pthread_cond_signal.c: Likewise.
9713 * pthread_cond_wait.c: Likewise.
9714 * pthread_condattr_destroy.c: Likewise.
9715 * pthread_condattr_init.c: Likewise.
9716 * pthread_equal.c: Likewise.
9717 * pthread_exit.c: Likewise.
9718 * pthread_getschedparam.c: Likewise.
9719 * pthread_self.c: Likewise.
9720 * pthread_setcancelstate.c: Likewise.
9721 * pthread_setschedparam.c: Likewise.
9722 * pthread_mutex_destroy.c: Likewise.
9723 * pthread_mutex_init.c: Likewise.
9724 * pthreadP.h: Add prototypes for the aliases.
9726 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9727 multiple_threads member in correct TCB to 1.
9729 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9730 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
9731 member of thread decriptor, otherwise return unconditionally 1.
9733 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9735 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9736 regular Linux version. Remove file.
9737 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
9738 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
9739 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
9740 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
9741 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
9742 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
9743 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
9744 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
9745 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
9746 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
9747 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
9748 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
9749 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
9750 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
9751 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
9752 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
9753 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
9754 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
9755 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
9756 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
9757 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
9758 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
9759 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
9760 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
9761 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
9762 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
9763 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
9764 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
9765 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
9766 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
9768 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9770 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9771 * sysdeps/unix/sysv/linux/open.c: Removed.
9772 * sysdeps/unix/sysv/linux/fsync.c: Removed.
9773 * sysdeps/unix/sysv/linux/lseek.c: Removed.
9774 * sysdeps/unix/sysv/linux/msync.c: Removed.
9775 * sysdeps/unix/sysv/linux/read.c: Removed.
9776 * sysdeps/unix/sysv/linux/close.c: Removed.
9777 * sysdeps/unix/sysv/linux/creat.c: Removed.
9778 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9779 * sysdeps/unix/sysv/linux/pause.c: Removed.
9780 * sysdeps/unix/sysv/linux/select.c: Removed.
9781 * sysdeps/unix/sysv/linux/write.c: Removed.
9783 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9785 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9786 element in TCB to see whether locking is needed.
9788 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9789 MULTIPLE_THREADS_OFFSET value is correct.
9791 * sysdeps/unix/sysv/linux/close.c: New file.
9792 * sysdeps/unix/sysv/linux/connect.S: New file.
9793 * sysdeps/unix/sysv/linux/creat.c: New file.
9794 * sysdeps/unix/sysv/linux/fsync.c: New file.
9795 * sysdeps/unix/sysv/linux/llseek.c: New file.
9796 * sysdeps/unix/sysv/linux/lseek.c: New file.
9797 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9798 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9799 * sysdeps/unix/sysv/linux/msync.c: New file.
9800 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9801 * sysdeps/unix/sysv/linux/open.c: New file.
9802 * sysdeps/unix/sysv/linux/open64.c: New file.
9803 * sysdeps/unix/sysv/linux/pause.c: New file.
9804 * sysdeps/unix/sysv/linux/poll.c: New file.
9805 * sysdeps/unix/sysv/linux/pread.c: New file.
9806 * sysdeps/unix/sysv/linux/pread64.c: New file.
9807 * sysdeps/unix/sysv/linux/pselect.c: New file.
9808 * sysdeps/unix/sysv/linux/pwrite.c: New file.
9809 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9810 * sysdeps/unix/sysv/linux/readv.c: New file.
9811 * sysdeps/unix/sysv/linux/recv.S: New file.
9812 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9813 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9814 * sysdeps/unix/sysv/linux/select.c: New file.
9815 * sysdeps/unix/sysv/linux/send.S: New file.
9816 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9817 * sysdeps/unix/sysv/linux/sendto.S: New file.
9818 * sysdeps/unix/sysv/linux/sigpause.c: New file.
9819 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9820 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9821 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9822 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9823 * sysdeps/unix/sysv/linux/system.c: New file.
9824 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9825 * sysdeps/unix/sysv/linux/wait.c: New file.
9826 * sysdeps/unix/sysv/linux/waitid.c: New file.
9827 * sysdeps/unix/sysv/linux/waitpid.c: New file.
9828 * sysdeps/unix/sysv/linux/writev.c: New file.
9829 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9831 * pt-readv.c: Fix comment.
9833 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9835 * tst-cleanup1.c: Include stdlib.h.
9837 * tst-cancel5.c: New test.
9838 * Makefile (tests): Add tst-cancel5.
9839 (tst-cancel5): Link against libc.so libpthread.so in that order.
9841 2002-12-13 Ulrich Drepper <drepper@redhat.com>
9843 * forward.c (test_loaded): Prevent recursive calls.
9845 * Makefile (routines): Add libc-cancellation.
9846 * libc-cancellation.c: New file.
9847 * descr.h (struct pthread): Add multiple_threads field.
9848 * allocatestack.c (allocate_stack): Initialize multiple_header field of
9849 new thread descriptor to 1.
9850 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9851 Initialize multiple_thread field after successful thread creation.
9852 * cancellation.c (__do_cancel): Move to pthreadP.h.
9853 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9854 (__pthread_disable_asynccancel): Add internal_function attribute.
9855 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9856 * pthread_setcancelstate.c: Likewise.
9857 * pthread_setcanceltype.c: Likewise.
9858 * pthread_exit.c: Likewise.
9859 * pthreadP.h (CANCELLATION_P): Likewise.
9860 (__do_cancel): Define as static inline.
9861 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9862 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9864 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9865 fields. Define MULTIPLE_THREADS_OFFSET.
9866 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9868 * sysdeps/unix/sysv/linux/accept.S: New file.
9869 * sysdeps/unix/sysv/linux/read.c: New file.
9870 * sysdeps/unix/sysv/linux/write.c: New file.
9871 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9872 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9873 initialization of __libc_locking_needed.
9874 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9875 __libc_locking_needed, use multiple_threads field in TCB.
9876 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9878 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9880 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9882 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9884 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9885 access to __libc_locking_needed for PIC.
9887 2002-12-12 Jakub Jelinek <jakub@redhat.com>
9889 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9890 declare for libc.so.
9891 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9893 (__libc_lock_lock): Put into statement expression.
9894 (__libc_lock_unlock): Remove trailing semicolon.
9895 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9897 2002-12-12 Roland McGrath <roland@redhat.com>
9899 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9900 "m" constraint to refer to __libc_locking_needed. Declare it here.
9902 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9904 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9905 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9906 Initialize __libc_locking_needed.
9907 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9908 instead of __register_pthread_fork_handler.
9909 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9910 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9911 fork-gen with libc_pthread_init.
9912 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9913 of __register_pthread_fork_handler.
9914 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9915 of __register_pthread_fork_handler.
9916 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9917 __libc_locking_needed to determine whether lock prefix can be avoided.
9918 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9920 2002-12-11 Ulrich Drepper <drepper@redhat.com>
9922 * Makefile (tests): Add tst-cleanup1.
9923 * tst-cleanup1.c: New file.
9924 * cancellation.c (__cleanup_thread): Removed.
9925 (__do_cancel): Remove call to __cleanup_thread.
9926 * pthreadP.h: Remove __cleanup_thread prorotype.
9928 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9929 Remember function and argument even if cancellation handler
9930 function is not available.
9931 (__libc_cleanup_region_end): Execute registered function directly if
9932 pthread functions are not available.
9933 (__libc_cleanup_end): Likewise.
9935 * init.c (__pthread_initialize_minimal): Fix initialization in
9936 static lib by preventing gcc from being too clever.
9938 2002-12-10 Ulrich Drepper <drepper@redhat.com>
9940 * init.c (__pthread_initialize_minimal): Remove unneccesary
9943 * Makefile (tests): We can run tst-locale2 now.
9945 2002-12-09 Ulrich Drepper <drepper@redhat.com>
9947 * Versions: Remove duplicated sigwait entry.
9949 2002-12-08 Ulrich Drepper <drepper@redhat.com>
9951 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9954 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9956 * pthreadP.h: Declare __pthread_enable_asynccancel and
9957 __pthread_disable_asynccancel.
9958 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9959 (CANCEL_RESET): Use __pthread_disable_asynccancel.
9960 * cancellation.c (__pthread_enable_asynccancel): New function.
9961 (__pthread_disable_asynccancel): New function.
9962 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9963 * pt-close.c: Likewise.
9964 * pt-connect.c: Likewise.
9965 * pt-creat.c: Likewise.
9966 * pt-fcntl.c: Likewise.
9967 * pt-fsync.c: Likewise.
9968 * pt-lseek.c: Likewise.
9969 * pt-lseek64.c: Likewise.
9970 * pt-msgrcv.c: Likewise.
9971 * pt-msgsnd.c: Likewise.
9972 * pt-msync.c: Likewise.
9973 * pt-nanosleep.c: Likewise.
9974 * pt-open.c: Likewise.
9975 * pt-open64.c: Likewise.
9976 * pt-pause.c: Likewise.
9977 * pt-poll.c: Likewise.
9978 * pt-pread.c: Likewise.
9979 * pt-pread64.c: Likewise.
9980 * pt-pselect.c: Likewise.
9981 * pt-pwrite.c: Likewise.
9982 * pt-pwrite64.c: Likewise.
9983 * pt-read.c: Likewise.
9984 * pt-readv.c: Likewise.
9985 * pt-recv.c: Likewise.
9986 * pt-recvfrom.c: Likewise.
9987 * pt-recvmsg.c: Likewise.
9988 * pt-select.c: Likewise.
9989 * pt-send.c: Likewise.
9990 * pt-sendmsg.c: Likewise.
9991 * pt-sendto.c: Likewise.
9992 * pt-sigpause.c: Likewise.
9993 * pt-sigsuspend.c: Likewise.
9994 * pt-sigtimedwait.c: Likewise.
9995 * pt-sigwait.c: Likewise.
9996 * pt-sigwaitinfo.c: Likewise.
9997 * pt-system.c: Likewise.
9998 * pt-tcdrain.c: Likewise.
9999 * pt-wait.c: Likewise.
10000 * pt-waitid.c: Likewise.
10001 * pt-waitpid.c: Likewise.
10002 * pt-write.c: Likewise.
10003 * pt-writev.c: Likewise.
10004 * pthread_join.c: Likewise.
10005 * pthread_timedjoin.c: Likewise.
10007 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10008 (__xpg_sigpause): New function.
10009 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10011 2002-12-07 Ulrich Drepper <drepper@redhat.com>
10013 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10015 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10016 _GI_pthread_cleanup_pop to pthreadP.h.
10018 * ftrylockfile.c: Use _IO_lock_trylock instead of
10019 pthread_mutex_trylock.
10021 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10022 (CANCEL_RESET): Likewise.
10023 (__pthread_setcanceltype_): Declare.
10024 (__pthread_mutex_lock_internal): Declare.
10025 (__pthread_mutex_unlock_internal): Declare.
10026 (__pthread_once_internal): Declare.
10027 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10028 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10030 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10031 and pthread_mutex_unlock.
10032 * pthread_cond_wait.c: Likewise.
10033 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10034 * pthread_mutex_unlock.c: Likewise.
10036 * pthread_setcanceltype.c: Add additional alias
10037 __pthread_setcanceltype.
10039 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10040 * sem_open.c (sem_open): Likewise.
10041 Use __libc_open, __libc_write, and __libc_close instead of
10042 open, write, and close respectively.
10044 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10045 Rewrite as statement expression since it must return a value.
10047 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10048 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10051 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10052 alias __pthread_once_internal.
10054 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10056 2002-12-06 Ulrich Drepper <drepper@redhat.com>
10058 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10059 * tst-stdio1.c: New file.
10060 * tst-stdio2.c: New file.
10062 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10064 * Makefile (tests): Comment out tst-locale2 for now.
10065 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10067 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10069 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10070 Use _IO_lock_init instead of explicit assignment.
10072 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10073 Define __libc_lock_* and __libc_lock_recursive macros with
10074 lowlevellock macros, not pthread mutexes.
10076 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
10077 of pthread_mutex_lock.
10078 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
10079 instead of pthread_mutex_unlock.
10081 2002-12-06 Roland McGrath <roland@redhat.com>
10083 * allocatestack.c (__stack_user): Use uninitialized defn.
10084 * init.c (__pthread_initialize_minimal): Initialize it here.
10086 2002-12-05 Roland McGrath <roland@redhat.com>
10088 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10090 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10092 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10093 missing & here too.
10095 2002-12-05 Ulrich Drepper <drepper@redhat.com>
10097 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10099 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10100 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10101 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10102 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10103 for __libc_lock_* macros.
10104 * Makefile (routines): Add libc-lowlevellock.
10106 2002-10-09 Roland McGrath <roland@redhat.com>
10108 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10109 Under [__PIC__], call the function via the pointer fetched for
10110 comparison rather than a call by name that uses the PLT.
10111 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10112 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10113 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10114 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10115 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10117 2002-12-04 Roland McGrath <roland@redhat.com>
10119 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10121 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10122 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10124 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10126 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10128 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10129 a completely opaque, non-integer type.
10130 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10132 2002-12-05 Jakub Jelinek <jakub@redhat.com>
10134 * sysdeps/i386/tls.h: Include stdlib.h.
10135 * sysdeps/x86_64/tls.h: Likewise.
10137 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10139 * Makefile (tests): Add tst-locale2.
10140 (tests-static): Likewise.
10141 * tst-locale2.c: New file.
10143 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10144 volatile and add memory clobbers to lock operations.
10146 2002-12-03 Ulrich Drepper <drepper@redhat.com>
10148 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10149 * sysdeps/i386/i486/bits/atomic.h: New file.
10150 * sysdeps/i386/i586/bits/atomic.h: New file.
10151 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10152 include i486 version.
10153 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10154 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10155 Patch by Marijn Ros <marijn@mad.scientist.com>.
10157 * allocatestack.c (get_cached_stack): Don't crash if we first
10158 found a stack with a larger size then needed.
10159 Reported by Hui Huang <hui.huang@sun.com>.
10161 * Makefile (tests): Add tst-sysconf.
10162 * tst-sysconf.c: New file.
10164 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10165 PTHREAD_THREADS_MAX.
10167 2002-12-02 Roland McGrath <roland@redhat.com>
10169 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10170 Declare using hidden_proto instead of attribute_hidden, so there are
10171 non-.hidden static symbols for gdb to find.
10172 (__pthread_keys): Likewise.
10173 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10174 * allocatestack.c (__stack_user): Likewise.
10175 * pthread_create.c (__pthread_keys): Likewise.
10176 (__nptl_threads_events, __nptl_last_event): Make these static instead
10178 * pthread_key_create.c (__pthread_pthread_keys_max,
10179 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10181 2002-12-02 Ulrich Drepper <drepper@redhat.com>
10183 * Makefile (tests): Add tst-locale1. If buid-static is yes link
10185 * tst-locale1.c: New file.
10187 * pthread_cond_timedwait.c: Include <stdlib.h>.
10189 * Makefile (tests): Add tst-fork2 and tst-fork3.
10190 * tst-fork2.c: New file.
10191 * tst-fork3.c: New file.
10193 2002-11-28 Ulrich Drepper <drepper@redhat.com>
10195 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10197 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10198 require it to 200112L.
10200 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10201 instruction only if HAVE_CMOV is defined.
10202 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10204 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10206 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10208 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10210 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10212 2002-11-27 Ulrich Drepper <drepper@redhat.com>
10214 * sysdeps/x86_64/bits/atomic.h: New file.
10216 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10219 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10220 possible since gettid cannot fail.
10222 * sysdeps/x86_64/pthreaddef.h: New file.
10224 * sysdeps/i386/pthreaddef.h (gettid): Removed.
10226 * sysdeps/x86_64/pthread_spin_init.c: New file.
10227 * sysdeps/x86_64/pthread_spin_lock.c: New file.
10228 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10229 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10231 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10232 Add missing lock prefix. Minute optimization.
10234 * tst-spin2.c (main): Also check successful trylock call.
10236 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10237 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
10239 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10240 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
10242 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
10243 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10244 value in case of an error. Add support for INTERNAL_SYSCALL.
10246 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10247 value in case of an error.
10249 * sysdeps/x86_64/tls.h: New file.
10251 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10253 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
10254 takes the array member name and the index as parameters.
10255 (THREAD_SETMEM_NC): Likewise.
10256 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10257 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10260 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10261 to decide which code to use.
10262 (THREAD_SETMEM_NC): Likewise.
10264 * allocatestack.c (queue_stack): Don't remove stack from list here.
10265 Do it in the caller. Correct condition to prematurely terminate
10266 loop to free stacks.
10267 (__deallocate_stack): Remove stack from list here.
10269 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10271 * Makefile (tests): Add tst-stack1.
10272 * tst-stack1.c: New file.
10274 * allocatestack.c (allocate_stack): Initialize the TCB on a user
10277 * pthread_attr_getstack.c: Return bottom of the thread area.
10279 2002-11-25 Ulrich Drepper <drepper@redhat.com>
10281 * Makefile (libpthread-routines): Add pt-allocrtsig and
10282 pthread_kill_other_threads.
10283 * pt-allocrtsig.c: New file.
10284 * pthread_kill_other_threads.c: New file.
10285 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10286 all three functions.
10287 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10289 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10290 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10291 and __libc_allocate_rtsig_private.
10292 * Versions (libpthread): Export pthread_kill_other_threads_np,
10293 __libc_current_sigrtmin, and __libc_current_sigrtmax.
10295 2002-11-24 Ulrich Drepper <drepper@redhat.com>
10297 * allocatestack.c (allocate_stack): stackaddr in attribute points to
10298 the end of the stack. Adjust computations.
10299 When mprotect call fails dequeue stack and free it.
10300 * pthread_attr_setstack.c: Store top of the stack in stackaddr
10302 * pthread_getattr_np.c: Likewise.
10304 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10307 2002-11-23 Ulrich Drepper <drepper@redhat.com>
10309 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10310 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10312 2002-11-22 Ulrich Drepper <drepper@redhat.com>
10314 * pthread_getspecific.c: Optimize access to first 2nd-level array.
10315 * pthread_setspecific.c: Likewise.
10317 2002-11-21 Ulrich Drepper <drepper@redhat.com>
10319 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10320 definitions. Get them from the official place.
10321 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10323 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10324 Use new CLONE_ flags in clone() calls.
10326 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10327 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10329 * Versions: Add pthread_* functions for libc.
10330 * forward.c: New file.
10332 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10334 * herrno.c: New file.
10337 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10338 sem_trywait, and sem_timedwait. Add herrno and res.
10339 * sem_init.c: Don't initialize lock and waiters members.
10340 * sem_open.c: Likewise.
10341 * sem_post.c: Removed.
10342 * sem_wait.c: Removed.
10343 * sem_trywait.c: Removed.
10344 * sem_timedwait.c: Removed.
10345 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10346 Includes full implementations of sem_post, sem_wait, sem_trywait,
10348 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10349 for new implementation.
10350 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10351 and waiters fields.
10353 * tst-sem3.c: Improve error message.
10354 * tst-signal3.c: Likewise.
10356 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10357 to tell the kernel about the termination futex and to initialize tid
10358 member. Don't initialize main_thread.
10359 * descr.h (struct pthread): Remove main_thread member.
10360 * cancelllation.c (__do_cancel): Remove code handling main thread.
10361 The main thread is not special anymore.
10363 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
10364 size of the stacks to stack_cache_actsize.
10366 * pt-readv.c: Add missing "defined".
10367 * pt-sigwait.c: Likewise.
10368 * pt-writev.c: Likewise.
10370 2002-11-09 Ulrich Drepper <drepper@redhat.com>
10372 * Versions: Export __connect from libpthread.
10373 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10375 * Makefile (libpthread-routines): Add pt-raise.
10376 * sysdeps/unix/sysv/linux/raise.c: New file.
10377 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10378 * sysdeps/generic/pt-raise.c: New file.
10380 * pthread_cond_init.c: Initialize all data elements of the condvar
10381 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10383 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10384 * pthread_create.c: Likewise.
10386 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10387 * tst-key1.c: New file.
10388 * tst-key2.c: New file.
10389 * tst-key3.c: New file.
10391 * Versions: Export pthread_detach for version GLIBC_2.0.
10392 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10394 2002-11-08 Ulrich Drepper <drepper@redhat.com>
10396 * pthread_key_create.c: Terminate search after an unused key was found.
10397 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10399 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10400 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10402 2002-10-10 Ulrich Drepper <drepper@redhat.com>
10404 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10405 dynamic lookup for errno in PIC.
10407 * allocatestack.c (get_cached_stack): Rearrange code slightly to
10408 release the stack lock as soon as possible.
10409 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10410 the static TLS block.
10411 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10413 * cancellation.c: Renamed from cancelation.c.
10414 * Makefile: Adjust accordingly.
10415 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10416 * cleanup_defer.c: Use CANCELLATION_P.
10417 * pthread_testcancel.c: Likewise.
10418 * descr.h: Fix spelling in comments.
10419 * init.c: Likewise.
10420 * pthread_getattr_np.c: Likewise.
10421 * pthread_getschedparam.c: Likewise.
10422 * pthread_setschedparam.c: Likewise.
10423 * Versions: Likewise.
10425 * pt-pselect.c: New file.
10426 * Makefile (libpthread-routines): Add pt-pselect.
10427 * Versions: Add pselect.
10429 * tst-cancel4.c: New file.
10430 * Makefile (tests): Add tst-cancel4.
10432 2002-10-09 Ulrich Drepper <drepper@redhat.com>
10434 * pthread_mutex_lock.c: Always record lock ownership.
10435 * pthread_mutex_timedlock.c: Likewise.
10436 * pthread_mutex_trylock.c: Likewise.
10438 * pt-readv.c: New file.
10439 * pt-writev.c: New file.
10440 * pt-creat.c: New file.
10441 * pt-msgrcv.c: New file.
10442 * pt-msgsnd.c: New file.
10443 * pt-poll.c: New file.
10444 * pt-select.c: New file.
10445 * pt-sigpause.c: New file.
10446 * pt-sigsuspend.c: New file.
10447 * pt-sigwait.c: New file.
10448 * pt-sigwaitinfo.c: New file.
10449 * pt-waitid.c: New file.
10450 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10451 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10452 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10453 * Versions: Add all the new functions.
10455 * tst-exit1.c: New file.
10456 * Makefile (tests): Add tst-exit1.
10458 * sem_timedwait.c: Minor optimization for more optimal fastpath.
10460 2002-10-08 Ulrich Drepper <drepper@redhat.com>
10462 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10464 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10465 call. pthread_join is an official cancellation point.
10466 * pthread_timedjoin.c: Likewise.
10468 * pthread_cond_wait.c: Revert order in which internal lock are dropped
10469 and the condvar's mutex are retrieved.
10470 * pthread_cond_timedwait.c: Likewise.
10471 Reported by dice@saros.East.Sun.COM.
10473 2002-10-07 Ulrich Drepper <drepper@redhat.com>
10475 * pthreadP.h: Cut out all type definitions and move them...
10476 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
10477 * pthreadP.h: Include <internaltypes.h>.
10479 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10480 performance tweaks.
10482 * sem_trywait.c: Shuffle #includes around to get right order.
10483 * sem_timedwait.c: Likewise.
10484 * sem_post.c: Likewise.
10485 * sem_wait.c: Likewise.
10487 * nptl 0.3 released.
10489 * Makefile (tests): Add tst-signal3.
10490 * tst-signal3.c: New file.
10492 2002-10-05 Ulrich Drepper <drepper@redhat.com>
10494 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10495 the asms modify the sem object.
10496 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10498 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10499 the actual members.
10500 * pthreadP.h (struct sem): New type. Actual semaphore type.
10501 * semaphoreP.h: Include pthreadP.h.
10502 * sem_getvalue.c: Adjust to sem_t change.
10503 * sem_init.c: Likewise.
10504 * sem_open.c: Likewise.
10505 * sem_post.c: Likewise.
10506 * sem_timedwait.c: Likewise.
10507 * sem_trywait.c: Likewise.
10508 * sem_wait.c: Likewise.
10510 2002-10-04 Ulrich Drepper <drepper@redhat.com>
10512 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10513 * tst-basic2.c: New file.
10514 * tst-exec1.c: New file.
10515 * tst-exec2.c: New file.
10516 * tst-exec3.c: New file.
10518 * tst-fork1.c: Remove extra */.
10520 * nptl 0.2 released. The API for IA-32 is complete.