1 2013-07-19 Dominik Vogt <vogt@de.ibm.com>
3 * pthread_mutex_lock.c: Fix whitespace.
4 * pthread_mutex_trylock.c: Likewise.
5 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
6 * sysdeps/unix/sysv/linux/x86/elision-conf.c: Likewise.
7 * sysdeps/unix/sysv/linux/x86/elision-conf.h: Likewise.
8 * sysdeps/unix/sysv/linux/x86/elision-lock.c: Likewise.
9 * sysdeps/unix/sysv/linux/x86/elision-timed.c: Likewise.
10 * sysdeps/unix/sysv/linux/x86/elision-trylock.c: Likewise.
11 * sysdeps/unix/sysv/linux/x86/force-elision.h: Likewise.
12 * sysdeps/unix/sysv/linux/x86/hle.h: Likewise.
13 * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
14 * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
15 * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
16 * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
18 * sysdeps/unix/sysv/linux/x86/elision-conf.c:
19 Remove __rwlock_rtm_enabled and __rwlock_rtm_read_retries.
20 (elision_init): Don't set __rwlock_rtm_enabled.
21 * sysdeps/unix/sysv/linux/x86/elision-conf.h:
22 Remove __rwlock_rtm_enabled.
24 2013-07-03 H.J. Lu <hongjiu.lu@intel.com>
26 * sysdeps/unix/sysv/linux/x86/init-arch.c: New file.
27 * sysdeps/unix/sysv/linux/x86/init-arch.h: Likewise.
29 2013-07-02 Andi Kleen <ak@linux.intel.com>
31 * sysdeps/unix/sysv/linux/x86/elision-conf.c (elision_init):
32 Check ENABLE_LOCK_ELISION.
34 2013-07-02 Andi Kleen <ak@linux.intel.com>
36 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype):
37 Disable elision for PTHREAD_MUTEX_DEFAULT.
39 2013-07-02 Andi Kleen <ak@linux.intel.com>
40 Hongjiu Lu <hongjiu.lu@intel.com>
42 * pthread_mutex_lock.c
43 (__pthread_mutex_lock): Add lock elision support.
44 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
45 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
46 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
47 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
48 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
49 * sysdeps/unix/sysv/linux/x86/Makefile: New file.
50 * sysdeps/unix/sysv/linux/x86/force-elision.h: New file
51 * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
52 * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
53 * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
54 * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
55 * sysdeps/unix/sysv/linux/x86/pthread_mutex_unlock.c: Likewise.
57 2013-07-02 Andi Kleen <ak@linux.intel.com>
59 * tst-mutex5.c: Include config.h.
60 (do_test): Add checks for ENABLE_LOCK_ELISION.
61 * tst-mutex8.c: Include config.h
62 (tf): Add checks for ENABLE_LOCK_ELISION.
63 (check_type): Likewise.
65 2013-07-02 Andi Kleen <ak@linux.intel.com>
67 * pthreadP.h: Add elision types.
68 (PTHREAD_MUTEX_TYPE_ELISION): Add.
69 * sysdeps/pthread/pthread.h: Add elision initializers.
70 (PTHREAD_MUTEX_ELISION_NP, PTHREAD_MUTEX_NO_ELISION_NP,
71 PTHREAD_MUTEX_PSHARED_NP): Add new flags.
72 (__PTHREAD_SPINS): Add.
74 2013-07-02 Andi Kleen <ak@linux.intel.com>
75 Hongjiu Lu <hongjiu.lu@intel.com>
77 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_timedwait_tid,
78 lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
79 __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
80 lll_trylock_elision): Add.
81 * sysdeps/unix/sysv/linux/x86/Makefile: Imply x86.
82 * sysdeps/unix/sysv/linux/x86/elision-conf.c: New file.
83 * sysdeps/unix/sysv/linux/x86/elision-conf.h: New file.
84 * sysdeps/unix/sysv/linux/x86/elision-lock.c: New file.
85 * sysdeps/unix/sysv/linux/x86/elision-timed.c: New file.
86 * sysdeps/unix/sysv/linux/x86/elision-trylock.c: New file.
87 * sysdeps/unix/sysv/linux/x86/elision-unlock.c: New file.
88 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_timedwait_tid,
89 lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
90 __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
91 lll_trylock_elision): Add.
92 * nptl/sysdeps/unix/sysv/linux/x86/hle.h: New file.
93 * elision-conf.h: New file.
95 2013-06-24 Vladimir Nikulichev <v.nikulichev@gmail.com>
98 * pthread_exit.c: Add reference to pthread_create.
100 2013-06-22 Joseph Myers <joseph@codesourcery.com>
102 * pthread_getattr_default_np.c: Include <string.h>.
104 2013-06-15 Siddhesh Poyarekar <siddhesh@redhat.com>
106 * Versions (libpthread): Add GLIBC_2.18.
107 (GLIBC_2.18): Add pthread_setattr_default_np and
108 pthread_getattr_default_np.
109 * allocatestack.c (allocate_stack): Synchronize read from
110 __default_pthread_attr.
111 (__reclaim_stacks): Initialize __default_pthread_attr_lock.
112 * nptl-init.c (__pthread_initialize_minimal_internal):
113 Synchronize write to __default_pthread_attr.
114 * pthreadP.h (__default_pthread_attr_lock): Declare.
115 * pthread_attr_getstacksize (__pthread_attr_getstacksize):
116 Synchronize read from __default_pthread_attr.
117 * pthread_create.c (__pthread_create_2_1): Make a local copy of
118 __default_pthread_attr. Check value of flags in IATTR even if
120 * pthread_getattr_default_np.c: New file.
121 * pthread_setattr_default_np.c: New file.
122 * sysdeps/pthread/pthread.h [__USE_GNU]
123 (pthread_getattr_default_np, pthread_setattr_default_np):
125 * tst-default-attr.c: New test case.
126 * Makefile (libpthread-routines): Add
127 pthread_setattr_default_np and pthread_getattr_default_np.
128 (tests): Add tst-default-attr.
129 * vars.c (__default_pthread_attr_lock): Declare and initialize.
131 2013-06-13 Siddhesh Poyarekar <siddhesh@redhat.com>
132 Carlos O'Donell <carlos@redhat.com>
135 * tst-pthread-attr-affinity: New test case.
136 * Makefile (tests): Add it.
137 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
138 (__pthread_attr_getaffinity_new): Copy minimum of source and
139 destination sizes to avoid a buffer overrun.
141 2013-06-10 Carlos O'Donell <carlos@redhat.com>
143 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
144 (lll_futex_wake): Return syscall error.
145 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
146 (lll_futex_wake): Return syscall error.
148 2013-08-06 Ondřej Bílka <neleai@seznam.cz>
150 * sysdeps/pthread/allocalim.h: (__libc_use_alloca): Fix warning.
152 2013-06-06 Ondřej Bílka <neleai@seznam.cz>
154 * tst-cond22.c: Fix leading whitespaces.
155 * tst-umask1.c: Likewise.
157 2013-06-06 Joseph Myers <joseph@codesourcery.com>
159 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Remove
161 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Likewise.
162 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
163 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
164 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
165 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
166 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
167 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
168 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
169 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
170 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
171 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
172 * tst-mutexpp10.c: Likewise.
173 * tst-stackguard1.c: Likewise.
175 2013-05-31 Joseph Myers <joseph@codesourcery.com>
177 * Makefile ($(objpfx)libpthread.so): Remove dependencies on libc
180 2013-05-16 Ryan S. Arnold <rsa@linux.vnet.ibm.com>
182 * pthread_create.c: Add missing #include <stdint.h> due to uint64_t or
184 * sysdeps/pthread/createthread.c: Likewise.
186 2013-05-14 Andreas Jaeger <aj@suse.de>
189 * sysdeps/x86_64/tls.h (struct tcbhead_t): Add __private_ss field.
190 * sysdeps/i386/tls.h (struct tcbhead_t): Likewise.
192 2013-05-09 Andi Kleen <ak@linux.intel.com>
194 * tst-mutex8.c (do_test): Check for ENABLE_PI.
196 2013-04-22 Siddhesh Poyarekar <siddhesh@redhat.com>
198 * pthreadP.h (check_sched_policy_attr): New inline function.
199 (check_sched_priority_attr): Likewise.
200 (check_stacksize_attr): Likewise.
201 (__kernel_cpumask_size, __determine_cpumask_size): Declare
203 (check_cpuset_attr): New inline function.
204 * pthread_attr_setschedparam (__pthread_attr_setschedparam):
205 Use check_sched_priority_attr.
206 * pthread_attr_setschedpolicy.c
207 (__pthread_attr_setschedpolicy): Use check_sched_policy_attr.
208 * pthread_attr_setstack.c (__pthread_attr_setstack): Use
209 check_stacksize_attr.
210 * pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
212 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
213 (__pthread_attr_setaffinity_new): Use check_cpuset_attr.
215 2013-04-11 Andreas Schwab <schwab@suse.de>
217 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
218 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
219 directly use absolute timeout.
221 2013-04-07 Carlos O'Donell <carlos@redhat.com>
223 * sysdeps/unix/sysv/linux/sem_post.c: Include atomic.h.
225 2013-04-04 Siddhesh Poyarekar <siddhesh@redhat.com>
228 * sysdeps/unix/sysv/linux/x86_64/cancellation.S
230 [SHARED && defined DO_VERSIONING && !defined NO_HIDDEN]: Mark
231 __pthread_unwind hidden.
233 2013-03-28 Roland McGrath <roland@hack.frob.com>
235 * pthread_create.c (start_thread) [!SHARED]:
236 Call __call_tls_dtors only if it's not NULL.
238 2013-03-19 Siddhesh Poyarekar <siddhesh@redhat.com>
240 * allocatestack.c (allocate_stack): Use __default_pthread_attr
241 instead of __default_stacksize.
242 * nptl-init.c (__pthread_initialize_minimal_internal):
243 Likewise. Initialize guardsize.
244 * pthreadP.h (__default_pthread_attr): Declare.
245 * pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
246 Use __default_pthread_attr instead of __default_stacksize.
247 * pthread_create.c (default_attr): Remove.
248 (__pthread_create_2_1): Use __default_pthread_attr instead of
250 * vars.c (__default_stacksize): Remove.
251 (__default_pthread_attr): New static variable to store
252 default thread attributes.
254 2013-03-18 Siddhesh Poyarekar <siddhesh@redhat.com>
256 * pthread_barrier_init.c (default_attr): Rename to
258 (pthread_barrier_init): Adjust for the rename.
259 * pthread_mutex_init.c (default_attr): Rename to
261 (__pthread_mutex_init): Adjust for the rename.
262 * pthread_rwlock_init.c (default_attr): Rebane to
264 (__pthread_rwlock_init): Adjust for the rename.
266 2013-03-12 Carlos O'Donell <carlos@redhat.com>
268 * sysdeps/unix/sysv/linux/lowlevellock.c: Include <atomic.h>.
270 2013-03-04 Roland McGrath <roland@hack.frob.com>
272 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h:
273 Change multiple inclusion guard to _LINUX_I686_DL_SYSDEP_H.
275 (HAVE_DL_DISCOVER_OSVERSION): Remove definition, now redundant.
276 (RTLD_PRIVATE_ERRNO): Likewise.
277 (NEED_DL_SYSINFO, DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION):
278 Move macros and associated declaration to ...
279 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: ... here.
280 Change multiple include guard to _LINUX_I386_DL_SYSDEP_H.
283 2013-03-01 Carlos O'Donell <carlos@redhat.com>
285 * Makefile (tests): Revert last change.
286 (tst-pthread-stack-env-ENV): Likewise.
287 * nptl-init.c (set_default_stacksize): Likewise.
288 (__pthread_initialize_minimal_internal): Likewise.
289 * tst-pthread-stack-env.c: Likewise.
291 2013-03-01 Siddhesh Poyarekar <siddhesh@redhat.com>
293 * tst-oddstacklimit.c: Include stdlib.h.
295 * Makefile (tests): Add tst-pthread-stack-env.
296 (tst-pthread-stack-env-ENV): Set environment for test.
297 * nptl-init.c (set_default_stacksize): New function.
298 (__pthread_initialize_minimal_internal): Accept ARGC, ARGV and
299 ENVP. Initialize __ENVIRON and set __DEFAULT_STACKSIZE.
300 * tst-pthread-stack-env.c: New test case.
302 2013-02-21 David S. Miller <davem@davemloft.net>
304 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
305 (FUTEX_WAIT_REQUEUE_PI): Define.
306 (FUTEX_CMP_REQUEUE_PI): Likewise.
307 (lll_futex_wait_requeue_pi): Likewise.
308 (lll_futex_timed_wait_requeue_pi): Likewise.
309 (lll_futex_cmp_requeue_pi): Likewise.
311 2013-02-21 Carlos O'Donell <carlos@redhat.com>
313 * sysdeps/unix/sysv/linux/fork.c: Fix comment typo.
315 2013-02-18 Siddhesh Poyarekar <siddhesh@redhat.com>
317 * sysdeps/pthread/tst-timer.c: Include stdlib.h for declaration
319 * tst-barrier4.c: Likewise.
320 * tst-robust7.c: Likewise.
323 * pthreadP.h (USE_REQUEUE_PI): New macro to check if mutex is
325 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Use
326 PI-aware futex operations if available and mutex is PI-aware.
327 * pthread_cond_signal.c (__pthread_cond_signal): Likewise.
328 * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait):
330 * pthread_cond_wait.c (__condvar_cleanup): Adjust lock if
331 cancellation occurred just after futex returned successfully
332 from a PI operation with the mutex held.
333 (__pthread_cond_wait): Use PI-aware futex operations if
334 available and mutex is PI-aware.
335 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
336 (FUTEX_WAIT_REQUEUE_PI): Define.
337 (FUTEX_CMP_REQUEUE_PI): Likewise.
338 (lll_futex_wait_requeue_pi): Likewise.
339 (lll_futex_timed_wait_requeue_pi): Likewise.
340 (lll_futex_cmp_requeue_pi): Likewise.
341 * nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
342 (FUTEX_WAIT_REQUEUE_PI): Define.
343 (FUTEX_CMP_REQUEUE_PI): Likewise.
344 (lll_futex_wait_requeue_pi): Likewise.
345 (lll_futex_timed_wait_requeue_pi): Likewise.
346 (lll_futex_cmp_requeue_pi): Likewise.
347 * sysdeps/unix/sysv/linux/kernel-features.h: Define
348 __ASSUME_REQUEUE_PI for Linux version higher than 2.6.31.
350 2013-02-04 Andreas Schwab <schwab@suse.de>
353 * tst-cancel14.c: Include <sys/time.h>.
354 * tst-cancel15.c: Likewise.
355 * tst-mutex9.c: Include <stdint.h>, <stdlib.h> and <sys/time.h>.
356 * tst-stackguard1.c: Include <tls.h>
358 2013-01-16 Andreas Schwab <schwab@suse.de>
361 * sem_open.c (sem_open): Use __mktemp instead of mktemp.
363 2013-01-11 Carlos O'Donell <codonell@redhat.com>
365 * allocatestack.c (allocate_stack): Add comment. Remove assert
368 2013-01-11 H.J. Lu <hongjiu.lu@intel.com>
370 * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd)
371 with $(host-test-program-cmd).
372 (tst-exec4-ARGS): Likewise.
373 (tst-stackguard1-ARGS): Likewise.
374 ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh.
375 Replace $(rtld-installed-name) with $(test-via-rtld-prefix).
376 * tst-tls6.sh (elf_objpfx): Removed.
377 (rtld_installed_name): Renamed to ...
378 (test_via_rtld_prefix): This.
379 (tst_tls5): Prepend ${test_via_rtld_prefix}.
381 2013-01-02 Joseph Myers <joseph@codesourcery.com>
383 * All files with FSF copyright notices: Update copyright dates
384 using scripts/update-copyrights.
386 2013-01-01 Joseph Myers <joseph@codesourcery.com>
388 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat
391 2012-12-28 Andi Kleen <ak@linux.intel.com>
393 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert
395 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
398 2012-12-27 David S. Miller <davem@davemloft.net>
400 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
401 (lll_futex_timed_wait_bitset): New macro.
403 2012-12-27 Siddhesh Poyarekar <siddhesh@redhat.com>
405 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
407 (lll_futex_timed_wait): Replace assembly code with
409 (lll_futex_timed_wait_bitset): Likewise.
410 (lll_futex_wake): Likewise.
411 (lll_futex_requeue): Likewise.
412 (lll_futex_wake_unlock): Likewise.
414 2012-12-08 Siddhesh Poyarekar <siddhesh@redhat.com>
416 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
417 Declare LOCAL_VAR as char.
419 2012-12-04 Joseph Myers <joseph@codesourcery.com>
421 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
422 Cast result of atomic_increment_val to (void) instead of storing
423 in otherwise-unused variable.
425 2012-12-03 Allan McRae <allan@archlinux.org>
427 * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
429 2012-11-26 H.J. Lu <hongjiu.lu@intel.com>
431 * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
433 * sysdeps/i386/tls.h: Include <libc-internal.h>.
434 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
435 (THREAD_SETMEM_NC): Likewise.
436 * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
437 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
438 (THREAD_SETMEM_NC): Likewise.
440 2012-11-21 Joseph Myers <joseph@codesourcery.com>
442 * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
443 of atomic_increment_val to (void) instead of storing in
444 otherwise-unused variable.
446 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
447 [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
448 instead of storing in otherwise-unused variable.
450 2012-11-14 Marcus Shawcroft <marcus.shawcroft@linaro.org>
452 * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
453 (CFLAGS-recv.c, CFLAGS-send.c): Define.
455 2012-11-06 Chris Metcalf <cmetcalf@tilera.com>
457 * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
458 * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
460 2012-11-05 Siddhesh Poyarekar <siddhesh@redhat.com>
462 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
463 if absolute timeout is negative.
464 [__ASSUME_FUTEX_CLOCK_REALTIME &&
465 lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
466 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
468 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
470 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
471 (__lll_robust_timedlock_wait): Likewise.
472 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
473 (lll_futex_timed_wait_bitset): New macro.
474 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
475 (lll_futex_timed_wait_bitset): Likewise.
477 2012-11-03 David S. Miller <davem@davemloft.net>
479 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
481 (__cpu_relax): Likewise.
483 2012-11-02 H.J. Lu <hongjiu.lu@intel.com>
485 * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
486 (__128bits): New struct typedef.
487 (tcbhead_t): Replace __m128 with __128bits.
489 2012-10-30 Aurelien Jarno <aurelien@aurel32.net>
490 Joseph Myers <joseph@codesourcery.com>
492 * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
494 2012-10-28 David S. Miller <davem@davemloft.net>
496 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
497 Define when we have v9 instructions available.
498 * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
499 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
501 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
503 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
504 to libpthread-routines.
506 2012-10-25 Roland McGrath <roland@hack.frob.com>
508 * tst-cond-except.c (TEST_FUNCTION): New macro.
510 2012-10-25 Joseph Myers <joseph@codesourcery.com>
512 * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
514 * tst-tls6.sh: Use /bin/bash not /bin/sh.
516 2012-10-25 Roland McGrath <roland@hack.frob.com>
518 * tst-basic2.c (do_test): Return RESULT, not always zero.
520 * tst-cond25.c: Include <stdint.h>
521 (waiter): Add casts to uintptr_t between casting integer<->pointer.
522 (timed_waiter): Likewise.
523 (do_test_wait): Likewise.
524 * tst-cond-except.c (thr): Likewise.
525 (do_test): Use prototype definition.
527 2012-10-24 Joseph Myers <joseph@codesourcery.com>
528 Jim Blandy <jimb@codesourcery.com>
530 * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
532 * tst-tls6.sh (test_wrapper_env): New variable. Use it to run
533 programs with LD_PRELOAD set.
535 2012-10-24 Roland McGrath <roland@hack.frob.com>
537 * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
538 ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
539 ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
540 ($(objpfx)tst-rwlock14): Likewise.
542 2012-10-24 Joseph Myers <joseph@codesourcery.com>
544 * Makefile (tests): Remove tst-oddstacklimit.
545 (test-srcs): New variable.
546 (tst-oddstacklimit-ENV): Remove.
547 [$(run-built-tests) = yes] (tests): Depend on
548 $(objpfx)tst-oddstacklimit.out.
549 [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
551 * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
552 setrlimit before executing tst-basic1 test passed to --command.
554 2012-10-23 Joseph Myers <joseph@codesourcery.com>
556 * Makefile [$(cross-compiling) = no]: Change condition to
557 [$(run-built-tests) = yes].
559 2012-10-23 Jim Blandy <jimb@codesourcery.com>
560 Joseph Myers <joseph@codesourcery.com>
562 * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
563 (tst-exec4-ARGS): Likewise.
564 (tst-stackguard1-ARGS): Likewise.
566 2012-10-21 Jim Blandy <jimb@codesourcery.com>
567 Joseph Myers <joseph@codesourcery.com>
569 * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
570 tst-cancel-wrappers.sh.
571 * tst-cancel-wrappers.sh: Use nm program given as first argument,
574 2012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
576 * tst-cond25.c (do_test_wait): Don't check for return value from
579 2012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
582 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
583 (__condvar_tw_cleanup): Adjust the mutex data structure if it
584 was locked by FUTEX_WAIT_REQUEUE_PI.
585 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
586 (__condvar_w_cleanup): Likewise.
587 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
588 (__condvar_cleanup2): Likewise.
589 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
590 (__condvar_cleanup1): Likewise.
592 2012-10-10 Carlos O'Donell <carlos@systemhalted.org>
594 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
595 defined __EXCEPTIONS) && defined __USE_GNU]
596 (pthread_cleanup_push_defer_np): Fix formatting.
598 2012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
601 * Makefile (tests): New test case tst-cond25.
602 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
603 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
604 (__condvar_tw_cleanup): Lock mutex only if we don't already
606 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
607 (__condvar_w_cleanup): Likewise.
608 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
609 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
610 (__condvar_cleanup2): Lock mutex only if we don't already
612 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
613 (__condvar_cleanup1): Likewise.
614 * tst-cond25.c: New test case.
616 2012-10-09 Roland McGrath <roland@hack.frob.com>
618 * sysdeps/pthread/configure: Regenerated.
619 * sysdeps/x86_64/configure: Regenerated.
621 2012-10-05 David S. Miller <davem@davemloft.net>
624 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
625 (DB_THREAD_SELF): Use constants for the register offsets. Correct
626 the case of a 64-bit debugger with a 32-bit inferior.
628 2012-10-05 H.J. Lu <hongjiu.lu@intel.com>
631 * Makefile (tests-static): Add tst-cancel24-static,
632 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
633 tst-sem11-static and tst-sem12-static.
635 (LDLIBS-tst-cancel24-static): New macro.
636 * tst-cancel24-static.cc: New file.
637 * tst-cond8-static.c: Likewise.
638 * tst-mutex8-static.c: Likewise.
639 * tst-mutexpi8-static.c: Likewise.
640 * tst-sem11-static.c: Likewise.
641 * tst-sem12-static.c: Likewise.
643 2012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
646 * Makefile (tests): New test case tst-cond24.
647 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
648 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
649 (__pthread_cond_timedwait): Unlock mutex before going back to
651 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
652 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
653 return from futex_wait.
654 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
655 (__pthread_cond_timedwait): Unlock mutex before going back to
656 wait in PI case. Set requeue_pi flag only if wait returned 0.
657 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
658 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
659 return from futex_wait.
660 * tst-cond24.c: New test case.
662 2012-10-04 Roland McGrath <roland@hack.frob.com>
664 * pthread_create.c (start_thread): Use __madvise, not madvise.
666 2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
668 * sysdeps/i386/tls.h: Update copyright years.
670 2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
672 * pthread_create.c (start_thread): Fix clone flag name in
673 comment to CLONE_CHILD_CLEARTID.
674 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
675 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
676 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
677 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
678 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
679 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
681 2012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
684 * Makefile (tests): Add tst-cond-except.
685 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
686 (__pthread_cond_timedwait): Mark instructions where %ebx is
687 incremented in PI case.
688 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
689 for the marked PI case instructions.
690 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
691 (__pthread_cond_wait): Mark instructions where %ebx is
692 incremented in PI case.
693 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
694 for the marked PI case instructions.
695 * tst-cond-except.c: New test case.
697 2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
699 * tst-tls6.sh: Add "set -e".
700 * Makefile: Do not specify -e option when running testsuite
703 * tst-tls6.sh: Add copyright header.
705 2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
707 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
708 to uint64_t for 64-bit store.
709 (THREAD_SETMEM_NC): Likewise.
711 2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
713 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
715 (THREAD_SETMEM_NC): Likewise.
717 2012-09-14 Jeff Law <law@redhat.com>
720 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
722 2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
725 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
728 2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
730 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
731 (LDLIBS-tst-cancel24): This.
733 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
736 * Makefile (tests-static): Add tst-cancel21-static.
738 * tst-cancel21-static.c: New file.
740 2012-09-01 Joseph Myers <joseph@codesourcery.com>
742 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
743 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
744 [__NR_clock_getres]: Make code unconditional.
745 (pthread_getcpuclockid): Remove code left unreachable by removal
748 2012-08-31 Joseph Myers <joseph@codesourcery.com>
751 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
752 atomic_compare_and_exchange_bool_rel.
753 * tst-sem14.c: New file.
754 * Makefile (tests): Add tst-sem14.
756 2012-08-15 Roland McGrath <roland@hack.frob.com>
758 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
760 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
761 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
763 2012-08-16 Joseph Myers <joseph@codesourcery.com>
765 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
766 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
767 * pthread_condattr_setclock.c (pthread_condattr_setclock)
768 [!__ASSUME_POSIX_TIMERS]: Likewise.
769 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
770 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
771 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
772 [!__ASSUME_POSIX_TIMERS]: Likewise.
773 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
774 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
775 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
777 [!__NR-timer_create]: Remove conditional code.
778 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
779 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
781 [!__NR_timer_delete]: Remove conditional code.
782 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
783 * sysdeps/unix/sysv/linux/timer_getoverr.c
784 [__NR_timer_getoverrun]: Make code unconditional.
785 [!__NR_timer_getoverrun]: Remove conditional code.
786 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
787 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
788 Make code unconditional.
789 [!__NR_timer_gettime]: Remove conditional code.
790 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
791 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
792 Make code unconditional.
793 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
794 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
795 Make code unconditional.
796 [!__NR_timer_settime]: Remove conditional code.
797 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
798 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
799 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
802 2012-08-15 Tom de Vries <vries@codesourcery.com>
803 Maxim Kuvyrkov <maxim@codesourcery.com>
805 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
806 (__libc_lock_trylock): Allow pre-existing definitions.
808 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
810 * pthread_spin_lock.c: New file.
811 * pthread_spin_trylock.c: New file.
813 2012-08-08 Joseph Myers <joseph@codesourcery.com>
815 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
817 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
818 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
820 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
821 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
822 Make code unconditional.
823 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
824 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
825 __NR_tgkill]: Make code unconditional.
826 (raise) [__ASSUME_TGKILL]: Likewise.
827 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
828 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
829 [__ASSUME_TGKILL]: Make code unconditional.
830 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
831 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
832 __NR_tgkill]: Make code unconditional.
833 (raise) [__ASSUME_TGKILL]: Likewise.
834 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
836 2012-08-07 Joseph Myers <joseph@codesourcery.com>
838 * sysdeps/pthread/createthread.c (create_thread)
839 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
841 2012-08-03 Joseph Myers <joseph@codesourcery.com>
843 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
845 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
847 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
849 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
850 (pagesize): New static variable.
851 (allocate_and_test): Return MEM. Rename parameter to TARGET.
852 (check_stack_top): New local variables MEM and PAGEMASK. Cap
853 stack size to MAX_STACK_SIZE. Call allocate_and_test for
854 halfway up the stack top page. Verify that the top page was
856 (do_test): Get pagesize using sysconf.
858 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
860 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
862 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
863 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
866 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
868 * tst-pthread-getattr.c: Revert last change.
870 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
872 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
875 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
877 (check_stack_top): Read valued written into STACKADDR in
878 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
880 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
882 * nptl-init.c (sighandler_setxid): Fix the comment that
885 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
887 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
888 (__lll_robust_timedlock_wait): Simplify CFI directives.
890 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
893 * Makefile (tests): Add test case.
894 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
895 the __libc_stack_end page from stacksize. Truncate stacksize to
896 make it page aligned when it is computed from RLIMIT_STACK.
897 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
900 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
903 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
906 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
907 Jakub Jelinek <jakub@redhat.com>
910 * sysdeps/pthread/pthread.h
911 [!(defined __GNUC__ && defined __EXCEPTIONS)]
912 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
913 __libc_unlikely instead of __builtin_expect.
915 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
918 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
919 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
920 * sysdeps/unix/sysv/linux/i386/Implies: New file.
921 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
922 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
924 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
925 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
927 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
929 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
932 * nptl-init.c (pthread_functions): Remove use of INTUSE and
934 (__pthread_initialize_minimal_internal): Likewise.
935 * sem_open.c: Likewise.
936 * sem_unlink.c: Likewise.
937 * pthreadP.h: Replace _internal aliases by hidden_proto
939 * pthread_getspecific.c: Replace _internal alias by hidden_def.
940 * pthread_key_create.c: Likewise.
941 * pthread_mutex_destroy.c: Likewise.
942 * pthread_mutex_init.c: Likewise.
943 * pthread_mutex_lock.c: Likewise.
944 * pthread_mutex_unlock.c: Likewise.
945 * pthread_once.c: Likewise.
946 * pthread_rwlock_rdlock.c: Likewise.
947 * pthread_rwlock_unlock.c: Likewise.
948 * pthread_rwlock_wrlock.c: Likewise.
949 * pthread_setspecific.c: Likewise.
950 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
952 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
954 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
956 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
957 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
958 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
959 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
960 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
961 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
962 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
963 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
964 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
965 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
967 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
969 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
972 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
974 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
975 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
977 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
978 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
980 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
981 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
982 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
983 (pthread_barrier_wait): Likewise.
984 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
985 (__pthread_cond_broadcast): Likewise.
986 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
987 (__pthread_cond_signal): Likewise.
988 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
989 (__pthread_cond_timedwait): Likewise.
990 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
992 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
993 (__pthread_rwlock_rdlock): Likewise.
994 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
995 (pthread_rwlock_timedrdlock): Likewise.
996 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
997 (pthread_rwlock_timedwrlock): Likewise.
998 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
999 (__pthread_rwlock_unlock): Likewise.
1000 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
1001 (__pthread_rwlock_wrlock): Likewise.
1002 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
1003 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1004 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1006 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1008 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
1011 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
1012 __libc_stack_end rounded to the end of containing page as the
1015 2012-05-25 Rayson Ho <rho@redhat.com>
1017 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
1019 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1020 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1021 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1022 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1023 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1024 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1025 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1026 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1028 2012-05-25 Rayson Ho <rho@redhat.com>
1029 Roland McGrath <roland@hack.frob.com>
1031 * DESIGN-systemtap-probes.txt: New file.
1032 * pthread_cond_broadcast.c: SystemTap probes.
1033 * pthread_cond_init.c: Likewise.
1034 * pthread_cond_signal.c: Likewise.
1035 * pthread_cond_wait.c: Likewise.
1036 * pthread_cond_destroy.c: Likewise.
1037 * pthread_create.c: Likewise.
1038 * pthread_join.c: Likewise.
1039 * pthread_mutex_destroy.c: Likewise.
1040 * pthread_mutex_init.c: Likewise.
1041 * pthread_mutex_lock.c: Likewise.
1042 * pthread_mutex_timedlock.c: Likewise.
1043 * pthread_mutex_unlock.c: Likewise.
1044 * pthread_rwlock_destroy.c: Likewise.
1045 * pthread_rwlock_rdlock.c: Likewise.
1046 * pthread_rwlock_unlock.c: Likewise.
1047 * pthread_rwlock_wrlock.c: Likewise.
1048 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1049 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1050 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1051 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1052 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1053 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1054 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1055 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1057 2012-05-24 Roland McGrath <roland@hack.frob.com>
1059 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
1061 2012-05-17 Andreas Jaeger <aj@suse.de>
1063 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1064 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
1065 only for older kernels.
1067 2012-05-15 Joseph Myers <joseph@codesourcery.com>
1069 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
1072 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1074 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
1075 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
1076 (lll_robust_lock): Likewise.
1077 (lll_cond_lock): Likewise.
1078 (lll_robust_cond_lock): Likewise.
1079 (lll_timedlock): Likewise.
1080 (lll_robust_timedlock): Likewise.
1081 (lll_unlock): Likewise.
1082 (lll_robust_unlock): Likewise.
1084 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1086 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
1087 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
1089 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1091 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
1093 (__gcc_personality_v0): Replace 8-byte data alignment with
1094 LP_SIZE alignment and .quad with ASM_ADDR.
1096 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1098 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
1100 (__gcc_personality_v0): Replace 8-byte data alignment with
1101 LP_SIZE alignment and .quad with ASM_ADDR.
1103 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1105 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
1106 NWAITERS, which is unsigned long int.
1108 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1110 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
1111 (__gcc_personality_v0): Replace 8-byte data alignment with
1112 LP_SIZE alignment and .quad with ASM_ADDR.
1114 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1116 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
1117 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
1118 __vdso_clock_gettime pointer into RAX_LP.
1119 (__gcc_personality_v0): Replace 8-byte data alignment with
1120 LP_SIZE alignment and .quad with ASM_ADDR.
1122 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1124 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
1125 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
1126 __vdso_clock_gettime pointer into RAX_LP.
1127 (__gcc_personality_v0): Replace 8-byte data alignment with
1128 LP_SIZE alignment and .quad with ASM_ADDR.
1130 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1132 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
1133 LP_OP(cmp) and R8_LP on dep_mutex pointer.
1135 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1137 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
1138 to update pointer in memory. Load pointer into RDI_LP.
1140 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1142 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1143 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
1145 (LLL_STUB_UNWIND_INFO_END): Likewise.
1146 (lll_timedlock): Load timeout pointer into RDX_LP.
1147 (lll_robust_timedlock): Likewise.
1149 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
1150 Jakub Jelinek <jakub@redhat.com>
1153 * Makefile (tests): Add test cases.
1154 * descr.h (struct pthread): Add a comment describing multiple_threads.
1155 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
1156 single-process case.
1157 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
1158 before setting cancelstate of the thread.
1159 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
1160 (__libc_multiple_threads): Add explanatory comment.
1161 * tst-cancel-self-cancelstate.c: New test case.
1162 * tst-cancel-self-canceltype.c: Likewise.
1163 * tst-cancel-self-cleanup.c: Supporting file for test cases.
1164 * tst-cancel-self-testcancel.c: New test case.
1165 * tst-cancel-self.c: Likewise.
1166 * vars.c: Expand comment to include single-process case.
1168 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1170 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
1171 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
1174 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1176 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
1178 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
1179 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
1181 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1183 * shlib-versions: Move x86_64-.*-linux.* entry to ...
1184 * sysdeps/x86_64/64/shlib-versions: Here. New file.
1185 * sysdeps/x86_64/x32/shlib-versions: New file.
1187 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1189 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
1190 __SIZEOF_PTHREAD_XXX_T.
1191 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
1192 (pthread_mutex_t): Likewise.
1193 (pthread_rwlock_t): Likewise.
1194 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
1197 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1199 * sysdeps/x86_64/x32/tls.h: New file.
1201 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1203 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
1205 (THREAD_SETMEM_NC): Likewise.
1207 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1209 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
1212 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1214 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1215 (__cleanup_fct_attribute): Check __x86_64__ instead of
1218 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1220 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
1221 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
1222 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
1223 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1224 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1226 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1228 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
1229 instead of __WORDSIZE.
1231 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
1234 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
1236 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
1238 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1239 (__pthread_cond_timedwait): Use CFI directives.
1240 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1241 (__pthread_cond_wait): Likewise.
1242 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1243 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1245 2012-05-03 David S. Miller <davem@davemloft.net>
1247 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
1248 always have to return 0, especially for the pthread_spin_init
1250 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
1252 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
1253 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
1255 2012-05-02 David S. Miller <davem@davemloft.net>
1257 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
1258 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
1259 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
1260 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
1261 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
1262 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
1263 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
1264 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
1265 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
1266 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
1267 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
1268 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
1269 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
1270 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
1271 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
1272 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
1273 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
1274 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
1276 2012-05-02 Allan McRae <allan@archlinux.org>
1278 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
1279 (LDFLAGS-tst-cancel24): Likewise.
1281 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
1283 * sysdeps/i386/pthread_spin_lock.S: New.
1284 * sysdeps/i386/pthread_spin_lock.c: Delete.
1285 * sysdeps/x86_64/pthread_spin_lock.S: New.
1286 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
1288 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
1290 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
1291 run when cross-compiling.
1293 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
1295 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
1296 instead of libgcc_s.h.
1298 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
1300 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
1302 2012-03-27 David S. Miller <davem@davemloft.net>
1304 * tst-cond16.c (do_test): Use a thread stack size which is either
1305 PTHREAD_STACK_MIN or the page size, whichever is larger.
1306 * tst-cond18.c (do_test): Likewise.
1308 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1310 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
1311 register char * __asm__("rsp") to get stack frame.
1313 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1315 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
1316 __NR_futex directly.
1318 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1320 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
1323 2012-03-16 David S. Miller <davem@davemloft.net>
1326 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
1328 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
1331 2012-03-15 David S. Miller <davem@davemloft.net>
1334 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
1336 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
1339 * pt-crti.S: Replace FSF snail mail address with URL.
1341 2012-03-09 Joseph Myers <joseph@codesourcery.com>
1343 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
1344 Do not define before including <time.h>.
1346 2012-03-08 David S. Miller <davem@davemloft.net>
1348 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
1350 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
1352 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1353 Check for timestamp before the Epoch.
1355 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
1358 * tst-sem13.c (do_test): Add another test case.
1359 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1360 Fix updating nwaiters.
1362 2012-03-07 Joseph Myers <joseph@codesourcery.com>
1365 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
1366 link test to a compile test.
1367 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
1369 * sysdeps/pthread/configure: Regenerated.
1371 2012-03-07 Ulrich Drepper <drepper@gmail.com>
1373 * Makefile (distribute): Remove variable.
1375 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
1377 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
1378 superfluous assignment.
1379 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
1381 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1382 (sem_timedwait): Likewise.
1384 2012-03-06 Ulrich Drepper <drepper@gmail.com>
1386 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
1387 installed headers to...
1388 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
1390 2012-03-06 David S. Miller <davem@davemloft.net>
1392 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
1393 atomic_increment and remove unused local variable.
1394 (__old_sem_post): Likewise.
1396 2012-02-27 David S. Miller <davem@davemloft.net>
1398 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
1399 non-existing __pthread_attr.
1400 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1401 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1402 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1403 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1404 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1406 2012-02-26 Ulrich Drepper <drepper@gmail.com>
1408 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
1410 * sysdeps/pthread/pthread.h: Define __need_timespec before including
1412 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1414 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1415 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1416 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1417 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1418 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1420 2012-02-21 Joseph Myers <joseph@codesourcery.com>
1423 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1425 [crti.S not in sysdirs] (omit-deps): Do not append.
1426 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1427 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1428 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1429 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1430 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1431 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1432 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1433 [crti.S in sysdirs] (extra-objs): Append unconditionally.
1434 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1436 * sysdeps/pthread/pt-initfini.c: Remove file.
1438 2012-02-16 Richard Henderson <rth@twiddle.net>
1440 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1441 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1443 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1445 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1447 2012-02-16 David S. Miller <davem@davemloft.net>
1449 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1451 2012-02-15 Marek Polacek <polacek@redhat.com>
1453 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1455 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
1457 Replace FSF snail mail address with URLs, as per GNU coding standards.
1459 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
1461 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1463 2012-02-08 Joseph Myers <joseph@codesourcery.com>
1465 Support crti.S and crtn.S provided directly by architectures.
1466 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1467 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1468 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1469 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1470 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1471 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1472 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1473 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1474 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1475 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1476 * pt-crti.S: New file.
1477 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1479 2012-02-03 Joseph Myers <joseph@codesourcery.com>
1481 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1482 macros for PIC register setup.
1483 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1484 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1485 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1486 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1487 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1489 2012-01-11 Marek Polacek <polacek@redhat.com>
1491 * forward.c (FORWARD_NORETURN): Define macro.
1492 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1493 (__pthread_exit): Likewise.
1495 2012-01-10 Ulrich Drepper <drepper@gmail.com>
1497 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1499 * pthreadP.h: Add noreturn to __pthread_exit.
1500 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1502 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
1504 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1505 Call pthread_attr_setstacksize() with result of
1506 __pthread_get_minstack() to account for application TLS usage.
1508 2012-01-08 Marek Polacek <polacek@redhat.com>
1510 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1512 2012-01-07 Ulrich Drepper <drepper@gmail.com>
1515 * pthreadP.h: Use const instead of __const.
1516 * semaphore.h: Likewise.
1517 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1518 * sysdeps/pthread/bits/sigthread.h: Likewise.
1519 * sysdeps/pthread/pthread.h: Likewise.
1521 * Makefile: Remove elf=yes test, only ELF is supported.
1523 * shlib-versions: Remove entries for ports architectures.
1525 In case anyone cares, the IA-64 architecture could move to ports.
1526 * sysdeps/ia64/*: Removed.
1527 * sysdeps/unix/sysv/linux/ia64/*: Removed.
1529 2011-12-22 Ulrich Drepper <drepper@gmail.com>
1531 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1532 __pthread_get_minstack.
1533 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1536 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1537 through __pthread_get_minstack.
1538 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1539 directly from _rtld_global_ro.
1540 (__pthread_get_minstack): New function.
1541 * pthreadP.h: Declare __pthread_get_minstack.
1542 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1544 2011-12-21 Ulrich Drepper <drepper@gmail.com>
1547 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1548 Correct reading name from file.
1550 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
1552 * allocatestack.c (allocate_stack): Return errno on failure.
1554 2011-12-14 Jeff Law <law@redhat.com>
1557 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1559 2011-11-28 Andreas Schwab <schwab@redhat.com>
1561 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1562 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1563 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1565 2011-11-15 Ulrich Drepper <drepper@gmail.com>
1567 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1570 2011-10-29 Ulrich Drepper <drepper@gmail.com>
1573 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1574 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1575 path for kernels with FUTEX_CLOCK_REALTIME.
1576 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1578 2011-10-27 Andreas Schwab <schwab@redhat.com>
1581 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1582 for memory synchronization functions.
1583 * semaphore.h: Likewise.
1585 2011-10-24 Ulrich Drepper <drepper@gmail.com>
1587 * tst-cancel7.c: Avoid warning.
1588 * tst-mutex6.c: Likewise.
1589 * tst-mutex9.c: Likewise.
1590 * tst-mutexpi6.c: Likewise.
1592 2011-10-23 Ulrich Drepper <drepper@gmail.com>
1594 * sysdeps/i386/tls.h: Remove #include <list.h>.
1596 2011-10-15 Ulrich Drepper <drepper@gmail.com>
1598 * pthread_create.c (start_thread): Call __ctype_init.
1600 2011-09-15 Andreas Schwab <schwab@redhat.com>
1602 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1604 (list_add): Add atomic_write_barrier.
1605 * descr.h: Define __need_list_t before including <list.h>.
1606 * nptl-init.c: Include <list.h>
1607 * allocatestack.c: Likewise.
1609 2011-09-11 Ulrich Drepper <drepper@gmail.com>
1611 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1612 * sysdeps/ia64/tls.h: Likewise.
1613 * sysdeps/powerpc/tls.h: Likewise.
1614 * sysdeps/s390/tls.h: Likewise.
1615 * sysdeps/sh/tls.h: Likewise.
1616 * sysdeps/sparc/tls.h: Likewise.
1617 * sysdeps/x86_64/tls.h: Likewise.
1619 2011-09-10 Ulrich Drepper <drepper@gmail.com>
1621 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1623 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1625 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1626 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1627 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1628 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1629 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1630 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1631 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1632 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1633 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1634 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1635 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1636 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1638 * tst-tls1.c: Support for __thread is now mandatory.
1639 * tst-tls2.c: Likewise.
1640 * tst-tls3.c: Likewise.
1641 * tst-tls3mod.c: Likewise.
1642 * tst-tls4.c: Likewise.
1643 * tst-tls4moda.c: Likewise.
1644 * tst-tls4modb.c: Likewise.
1645 * tst-tls5.h: Likewise.
1647 2011-09-08 Ulrich Drepper <drepper@gmail.com>
1650 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1651 (pthread_rwlock_timedwrlock): Use correct macro in test.
1652 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1654 2011-09-06 Ulrich Drepper <drepper@gmail.com>
1656 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1657 use gettimeofday vsyscall, just call gettimeofday.
1658 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1659 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1660 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1662 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1664 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1665 Simplify __vdso_clock_gettime use.
1667 2011-09-05 David S. Miller <davem@davemloft.net>
1669 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1671 (sem_timedwait): Call it to force an exception region around
1672 the async cancel enable and the futex operation.
1673 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1674 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1675 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1676 (__new_sem_wait): Call it to force an exception region around
1677 the async cancel enable and the futex operation.
1678 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1679 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1681 2011-08-31 Andreas Schwab <schwab@redhat.com>
1683 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1686 2011-08-20 David S. Miller <davem@davemloft.net>
1688 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1690 2011-08-14 Roland McGrath <roland@hack.frob.com>
1692 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1693 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1695 2011-08-08 Andreas Schwab <schwab@redhat.com>
1697 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1699 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1700 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1702 2011-07-22 Ulrich Drepper <drepper@gmail.com>
1704 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1706 (__gcc_personality_v0): Likewise.
1707 (_Unwind_ForcedUnwind): Likewise.
1708 (_Unwind_GetCFA): Likewise.
1710 2011-07-14 Roland McGrath <roland@hack.frob.com>
1712 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1715 2011-06-30 Ulrich Drepper <drepper@gmail.com>
1717 * nptl-init.c (__nptl_set_robust): New function.
1718 (pthread_functions): Add reference.
1719 * npthreadP.h: Declare __nptl_set_robust.
1720 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1721 ptr_set_robust member.
1722 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1723 child if threads are used.
1725 2011-06-14 Andreas Jaeger <aj@suse.de>
1727 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1729 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1732 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1734 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1737 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1739 Patch partly by Robert Rex <robert.rex@exasol.com>.
1741 2011-01-19 Roland McGrath <roland@redhat.com>
1743 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1744 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1745 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1746 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1747 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1748 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1750 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1752 * Makefile (test-extras): Add tst-cleanup4aux.
1754 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1757 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1758 (__SETXID_2): Likewise.
1759 (__SETXID_3): Likewise.
1761 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1764 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1765 * alloca_cutoff.c: Add libc_hidden_def.
1767 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1770 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1771 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1772 of "struct pthread".
1774 2010-09-21 Andreas Schwab <schwab@redhat.com>
1776 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1777 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1778 (pthread_cleanup_push_defer_np): Likewise.
1780 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1782 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1785 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1786 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1788 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1789 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1791 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1793 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1795 2010-05-01 Alan Modra <amodra@gmail.com>
1797 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1798 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1799 to save temps. Correct cfi for possible later frame manipulation.
1800 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1801 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1802 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1803 (DOCARGS_6, UNDOCARGS_6): Likewise.
1804 (CENABLE, CDISABLE): Add nops for non-shared calls.
1806 2010-07-06 Andreas Schwab <schwab@redhat.com>
1808 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1811 2010-07-03 Ulrich Drepper <drepper@redhat.com>
1813 * tst-abstime.c (do_test): Some more cleanups
1815 2010-07-02 Ulrich Drepper <drepper@redhat.com>
1817 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1819 2010-07-01 Andreas Schwab <schwab@redhat.com>
1820 Ulrich Drepper <drepper@redhat.com>
1822 * Makefile (tests): Add tst-abstime.
1823 * tst-abstime.c: New file.
1824 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1825 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1826 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1827 (__lll_timedlock_wait): Likewise.
1828 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1829 (__lll_robust_timedlock_wait): Likewise.
1830 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1831 (__pthread_cond_timedwait): Likewise.
1832 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1833 (pthread_rwlock_timedrdlock): Likewise.
1834 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1835 (pthread_rwlock_timedwrlock): Likewise.
1836 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1839 2010-07-01 Ulrich Drepper <drepper@redhat.com>
1841 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1843 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1845 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1846 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1848 2010-04-09 Ulrich Drepper <drepper@redhat.com>
1851 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1852 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1853 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1855 * Makefile (libpthread-routines): Add pthread_getname and
1857 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1859 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1861 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1862 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1863 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1864 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1866 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1868 * pthread_cond_timedwait.c: Add check for
1869 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1870 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1873 2010-03-09 Ulrich Drepper <drepper@redhat.com>
1875 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1876 and the call fails wake eventually waiting setxid threads. Don't free
1877 stack here if we try starting a thread.
1878 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1879 if the clone call failed.
1881 2010-03-08 Andreas Schwab <schwab@redhat.com>
1883 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1884 * allocatestack.c (get_cached_stack): Set setxid_futex.
1885 (allocate_stack): Likewise.
1887 2010-03-05 Andreas Schwab <schwab@redhat.com>
1888 Ulrich Drepper <drepper@redhat.com>
1890 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1891 it is creating a thread or it is just being created.
1892 * pthread_create.c (start_thread): Wake setxid thread if it is
1894 (__pthread_create_2_1): Initialize setxid_futex.
1895 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1898 2010-01-15 Ulrich Drepper <drepper@redhat.com>
1900 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1902 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1904 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
1906 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1907 Fix pthread_cond_timedwait with requeue-PI.
1908 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1909 Fix pthread_cond_wait with requeue-PI.
1911 2010-01-14 Ulrich Drepper <drepper@redhat.com>
1913 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1914 and pthread_mutexattr_setrobust for GLIBC_2.12.
1915 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1916 * pthread_mutexattr_getrobust.c: Define alias
1917 pthread_mutexattr_getrobust.
1918 * pthread_mutexattr_setrobust.c: Define alias
1919 pthread_mutexattr_setrobust.
1921 2010-01-12 Ulrich Drepper <drepper@redhat.com>
1923 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1925 2010-01-08 Ulrich Drepper <drepper@redhat.com>
1927 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1929 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1931 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1932 call __gmon_start__.
1933 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1935 2009-12-17 Ulrich Drepper <drepper@redhat.com>
1937 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1940 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1942 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1943 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1944 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1945 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1946 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1947 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1948 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1949 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1951 2009-12-12 Ulrich Drepper <drepper@redhat.com>
1953 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1954 Don't update nwaiters after invalid timeout is recognized.
1956 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1958 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1961 2009-11-27 Andreas Schwab <schwab@redhat.com>
1963 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1964 THREAD_SELF->cancelhandling after returning from futex call.
1966 2009-11-24 Ulrich Drepper <drepper@redhat.com>
1968 * tst-sem13.c: New file.
1969 * Makefile (tests): Add tst-sem13.
1971 2009-11-22 Roland McGrath <roland@redhat.com>
1973 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1974 instead of recapitulating its contents.
1976 2009-11-18 Ulrich Drepper <drepper@redhat.com>
1978 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1979 optimizations and cleanups.
1981 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1983 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1984 Remove redundant code. Fix cfi offsets.
1985 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1988 2009-11-17 Ulrich Drepper <drepper@redhat.com>
1990 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1991 reduce size of unwind info.
1993 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1995 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1996 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1998 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
2001 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
2003 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
2005 2009-10-30 Ulrich Drepper <drepper@redhat.com>
2007 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
2010 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
2011 steps to avoid races with creation and terminations.
2012 * nptl-init.c (sighandler_setxid): Adjust.
2013 Patch by Daniel Jacobowitz.
2015 2009-09-07 Andreas Schwab <schwab@redhat.com>
2017 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
2019 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
2020 Joseph Myers <joseph@codesourcery.com>
2023 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2024 Initialize the sigev_notify field for newly created timer to make sure
2025 the timer gets deleted from the active timer's list upon timer_delete.
2027 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
2029 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2030 Correct a logic error.
2032 2009-08-25 Ulrich Drepper <drepper@redhat.com>
2034 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
2035 of the field in local variables.
2036 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
2037 variable and don't unconditionally clear it.
2039 2009-08-24 Ulrich Drepper <drepper@redhat.com>
2041 * pthread_create.c (start_thread): Hint to the kernel that memory for
2042 the stack can be reused. We do not mark all the memory. The part
2043 still in use and some reserve are kept.
2045 2009-08-23 Ulrich Drepper <drepper@redhat.com>
2047 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
2049 2009-08-11 Ulrich Drepper <drepper@redhat.com>
2051 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
2054 2009-08-10 Ulrich Drepper <drepper@redhat.com>
2056 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
2058 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2060 2009-08-10 Andreas Schwab <schwab@redhat.com>
2062 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2063 (__pthread_cond_signal): Don't clobber register used for syscall
2066 2009-08-08 Ulrich Drepper <drepper@redhat.com>
2068 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2069 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
2071 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2072 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
2075 2009-08-07 Ulrich Drepper <drepper@redhat.com>
2077 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
2078 enabled by the special *_asynccancel functions.
2079 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2080 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2082 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
2084 2009-08-04 Ulrich Drepper <drepper@redhat.com>
2086 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
2087 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
2088 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
2089 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
2090 since we can assume the special __*_{en,dis}able_asynccancel
2092 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
2093 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
2094 and PTHREAD_CANCELED.
2096 2009-07-31 Ulrich Drepper <drepper@redhat.com>
2098 * descr.h: Better definition of *_BITMASK macros for cancellation.
2100 2009-07-29 Ulrich Drepper <drepper@redhat.com>
2102 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
2104 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
2105 dynamic linker might have to save.
2106 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
2107 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
2110 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
2112 2009-07-28 Ulrich Drepper <drepper@redhat.com>
2114 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
2116 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
2117 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
2118 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
2119 requeue_pi for robust mutexes.
2120 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2121 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2122 Don't only skip __pthread_mutex_cond_lock. Call instead
2123 __pthread_mutex_cond_lock_adjust.
2124 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2126 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
2127 optimization of PI mutex handling.
2129 2009-07-27 Ulrich Drepper <drepper@redhat.com>
2132 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
2133 instead of of _acq variants of cmpxchg.
2135 2009-07-23 Ulrich Drepper <drepper@redhat.com>
2137 * sysdeps/x86_64/configure.in: New file.
2139 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
2140 path when not using absolute timeout futex.
2142 2009-07-20 Ulrich Drepper <drepper@redhat.com>
2144 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
2145 optimizations of last changes.
2146 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2148 2009-07-19 Ulrich Drepper <drepper@redhat.com>
2150 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2151 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2152 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
2153 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2154 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2155 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
2156 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2157 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2159 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2160 (__pthread_cond_timedwait): Make more robust.
2162 2009-07-18 Ulrich Drepper <drepper@redhat.com>
2164 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2165 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
2166 directly use absolute timeout.
2168 * tst-sem5.c (do_test): Add test for premature timeout.
2169 * Makefile: Linu tst-sem5 with librt.
2171 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2172 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
2173 directly use absolute timeout.
2174 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2175 (pthread_rwlock_timedrdlock): Likewise.
2177 * tst-cond11.c (run_test): Add test to check that the timeout is
2180 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2181 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
2182 directly use absolute timeout.
2184 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2185 (__pthread_cond_wait): Convert to using exception handler instead of
2186 registered unwind buffer.
2187 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2188 (__pthread_cond_timedwait): Likewise.
2190 2009-07-17 Ulrich Drepper <drepper@redhat.com>
2192 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2193 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
2194 use absolute timeout.
2196 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
2197 handling of uncontested semaphore.
2199 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2200 (__condvar_cleanup): Rewrite to use cfi directives instead of
2201 hand-coded unwind tables.
2202 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
2204 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2205 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2208 2009-06-12 Ulrich Drepper <drepper@redhat.com>
2210 * Makefile (libpthread-routines): Add pthread_sigqueue.
2211 * Versions: Add pthread_sigqueue for GLIBC_2.11.
2212 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
2213 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
2215 2009-06-11 Ulrich Drepper <drepper@redhat.com>
2218 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2219 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
2221 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
2223 2009-05-16 Ulrich Drepper <drepper@redhat.com>
2225 * libc-cancellation.c: Move __libc_cleanup_routine to...
2226 * libc-cleanup.c: ...here. New file.
2227 * Makefile (routines): Add libc-cleanup.
2229 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
2231 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
2232 * sysdeps/pthread/librt-cancellation.c: Likewise.
2235 * nptl-init.c: Renamed from init.c.
2236 * Makefile: Change all occurences of init.c to nptl-init.c.
2238 2009-05-15 Ulrich Drepper <drepper@redhat.com>
2240 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
2241 to test when deciding on the delay.
2242 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2243 * pthread_cancel.c: Close race between deciding on sending a signal
2244 and setting the CANCELING_BIT bit.
2246 * cancellation.c (__pthread_disable_asynccancel): Don't return if
2248 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2250 2009-04-27 Ulrich Drepper <drepper@redhat.com>
2252 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
2254 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2255 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
2256 * sysdeps/i386/tls.h: Likewise.
2257 (tcbhead_t): Add __private_tm member.
2259 2009-04-26 Ulrich Drepper <drepper@redhat.com>
2261 * sem_open.c (sem_open): Rewrite initialization of initsem to
2264 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2265 Avoid warning by using may_alias attribute on ptrhack.
2267 2009-04-22 Ulrich Drepper <drepper@redhat.com>
2270 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
2271 Check policy and priority for validity.
2272 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
2274 2009-03-15 Ulrich Drepper <drepper@redhat.com>
2276 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2277 (__pthread_cond_timedwait): Change to use cfi directives instead of
2278 hand-coded unwind sections.
2280 2009-03-10 Ulrich Drepper <drepper@redhat.com>
2282 * init.c (nptl_freeres): Compile only for SHARED.
2284 2009-03-09 Jakub Jelinek <jakub@redhat.com>
2286 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
2287 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
2288 FUTEX_BITSET_MATCH_ANY.
2290 2009-02-27 Roland McGrath <roland@redhat.com>
2292 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
2293 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
2295 2009-02-26 Ulrich Drepper <drepper@redhat.com>
2297 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2298 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
2299 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
2302 2009-02-25 Ulrich Drepper <drepper@redhat.com>
2304 * sysdeps/pthread/pthread.h: The robust mutex functions are in
2307 2009-02-24 Ulrich Drepper <drepper@redhat.com>
2309 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
2310 Unify name of include protector macro.
2312 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
2314 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2315 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
2317 2009-01-29 Ulrich Drepper <drepper@redhat.com>
2319 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
2322 * allocatestack.c (__free_stacks): Renamed from free_stacks.
2323 (__free_stack_cache): Removed. Change callers to call __free_stacks.
2324 * init.c (nptl_freeres): New function.
2325 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
2326 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
2327 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
2329 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
2330 load DSO. Assign last.
2331 (__unwind_freeres): New function.
2333 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
2334 for better debugging. No need to use stack_list_add here.
2336 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2338 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2339 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2340 instead of computing relative timeout.
2341 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2342 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2344 2009-01-25 Ulrich Drepper <drepper@redhat.com>
2346 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
2348 2009-01-08 Ulrich Drepper <drepper@redhat.com>
2350 * sysdeps/pthread/list.h (list_add): Initialize new element first.
2351 (list_add_tail): Removed.
2353 2009-01-07 Ulrich Drepper <drepper@redhat.com>
2355 * (in_flight_stack): New variable.
2356 (stack_list_del): New function. Use instead of list_del.
2357 (stack_list_add): New function. Use instead of list_add when adding to
2358 stack_cache and stack_used lists.
2359 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
2360 when the fork call interrupted another thread.
2362 2009-01-04 Ulrich Drepper <drepper@redhat.com>
2364 * init.c (__pthread_initialize_minimal_internal): Optimize test
2365 FUTEX_CLOCK_REALTIME a bit.
2367 2009-01-03 Ulrich Drepper <drepper@redhat.com>
2369 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
2370 only passing five parameters to FUTEX_WAIT_BITSET call.
2372 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2373 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2374 instead of computing relative timeout.
2376 2009-01-02 Ulrich Drepper <drepper@redhat.com>
2378 * init.c (__pthread_initialize_minimal_internal): Check for
2379 FUTEX_CLOCK_REALTIME flag.
2380 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2381 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
2384 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2385 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2386 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2387 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2388 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2389 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2391 2008-12-09 Ulrich Drepper <drepper@redhat.com>
2393 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
2394 loop body instead of ; to avoid gcc warnings.
2395 (pthread_cleanup_pop_restore_np): Likewise.
2396 Patch by Caolán McNamara <caolanm@redhat.com>.
2398 2008-12-09 Jakub Jelinek <jakub@redhat.com>
2400 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
2401 fast path here, for robust/PI/PP mutexes call
2402 __pthread_mutex_lock_full. Don't use switch, instead use a series
2403 of ifs according to their probability.
2404 (__pthread_mutex_lock_full): New function.
2405 * pthread_mutex_unlock.c: Include assert.h.
2406 (__pthread_mutex_unlock_usercnt): Handle only the
2407 fast path here, for robust/PI/PP mutexes call
2408 __pthread_mutex_unlock_full. Don't use switch, instead use a series
2409 of ifs according to their probability.
2410 (__pthread_mutex_unlock_full): New function.
2411 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
2412 (__pthread_mutex_lock_full): Define.
2414 2008-12-08 Ulrich Drepper <drepper@redhat.com>
2416 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2417 implementation. Add necessary padding and.
2418 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2421 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2423 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2424 and FUTEX_WAKE_BITSET.
2426 2008-12-02 Ulrich Drepper <drepper@redhat.com>
2428 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2429 and FUTEX_WAKE_BITSET.
2430 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2431 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2432 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2433 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2435 2008-11-25 Roland McGrath <roland@redhat.com>
2437 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2438 Subdirectories moved to ports repository as
2439 sysdeps/.../nptl subdirectories.
2441 2008-11-12 Jakub Jelinek <jakub@redhat.com>
2444 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2446 * pthread_cond_init.c (__pthread_cond_init): Fix
2447 cond->__data.__nwaiters initialization.
2448 * Makefile (tests): Add tst-cond23.
2449 * tst-cond23.c: New test.
2451 2008-11-07 Jakub Jelinek <jakub@redhat.com>
2453 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2455 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2458 2008-11-01 Ulrich Drepper <drepper@redhat.com>
2461 * pthread_mutex_lock.c: Add support for private PI mutexes.
2462 * pthread_mutex_timedlock.c: Likewise.
2463 * pthread_mutex_trylock.c: Likewise.
2464 * pthread_mutex_unlock.c: Likewise.
2465 Patch mostly by Ben Jackson <ben@ben.com>.
2467 2008-10-31 Ulrich Drepper <drepper@redhat.com>
2470 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2471 Increase stack size for helper thread.
2473 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2475 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2476 assembly with a clobber list for access registers a0 and a1.
2478 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
2480 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2481 to force runp->refcntr to be read from memory.
2483 2008-09-08 Richard Guenther <rguenther@suse.de>
2485 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2486 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2487 lll_timedlock, lll_robust_timedlock, lll_unlock,
2488 lll_robust_unlock): Promote private to int.
2490 2008-08-15 Ulrich Drepper <drepper@redhat.com>
2492 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2493 ARCH_RETRY_MMAP definitions.
2494 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2495 Define MAP_STACK when not defined.
2496 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
2497 handling of ARCH_RETRY_MMAP.
2499 2008-07-30 Ulrich Drepper <drepper@redhat.com>
2501 * tst-align2.c (f): Print message that f is reached.
2503 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
2506 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2507 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2509 2008-07-25 Ulrich Drepper <drepper@redhat.com>
2511 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2512 SOCK_CLOEXEC if possible.
2514 2008-05-29 Ulrich Drepper <drepper@redhat.com>
2516 * Makefile (tests): Add tst-rwlock2a.
2517 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2518 * tst-rwlock2a.c: New file.
2520 2008-06-12 Ulrich Drepper <drepper@redhat.com>
2522 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2524 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
2526 * sysdeps/pthread/pthread.h: Fix typo in comment.
2528 2008-05-28 Ulrich Drepper <drepper@redhat.com>
2530 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2531 of CPU set to the kernel.
2533 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2535 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2537 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2538 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2539 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2540 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2541 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2542 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2544 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
2546 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2548 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2550 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2552 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2555 2008-05-26 Ulrich Drepper <drepper@redhat.com>
2557 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2559 2008-05-20 Jakub Jelinek <jakub@redhat.com>
2561 David S. Miller <davem@davemloft.net>
2563 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2565 2008-05-10 Ulrich Drepper <drepper@redhat.com>
2567 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2568 __pshared correctly.
2569 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2571 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2573 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2575 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2577 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2579 2008-04-14 David S. Miller <davem@davemloft.net>
2581 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2582 (__old_sem_wait): Fix argument to lll_futex_wait().
2584 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2586 * pthread_create.c: Require pthread_mutex_trylock and
2587 pthread_key_delete for libgcc.
2589 2008-04-08 Jakub Jelinek <jakub@redhat.com>
2592 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2593 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2594 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2596 2008-03-27 Ulrich Drepper <drepper@redhat.com>
2598 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2599 <linux/limits.h> has defined it.
2600 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2601 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2602 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2603 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2605 2008-03-18 Jakub Jelinek <jakub@redhat.com>
2607 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2609 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2610 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2612 2008-03-14 Ulrich Drepper <drepper@redhat.com>
2614 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2615 HAVE_DL_DISCOVER_OSVERSION.
2616 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2617 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2619 2008-03-07 Ulrich Drepper <drepper@redhat.com>
2622 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2623 _POSIX_CHOWN_RESTRICTED value to zero.
2625 2008-01-31 Roland McGrath <roland@redhat.com>
2627 * Makefile (omit-deps): Variable removed.
2629 2008-01-30 Ulrich Drepper <drepper@redhat.com>
2631 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2632 unnecessary addr32 prefix.
2634 2008-01-29 Roland McGrath <roland@redhat.com>
2636 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2638 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2640 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2642 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2644 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2646 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2647 (__lll_lock_wait_private): Fix typo.
2648 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2649 (pthread_barrier_wait): Likewise. Adjust XADD use.
2650 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2652 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2653 (pthread_rwlock_timedrdlock): Return correct return value.
2654 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2655 (pthread_rwlock_timedwrlock): Likewise.
2657 2008-01-15 Ulrich Drepper <drepper@redhat.com>
2659 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2660 thread returns the program exits with an error code.
2662 2008-01-10 Ulrich Drepper <drepper@redhat.com>
2664 * pthread-errnos.sym: Add EOVERFLOW.
2665 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2666 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2667 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2668 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2670 2007-12-14 Ulrich Drepper <drepper@redhat.com>
2672 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2673 parameter. Passed it as permission to mmap.
2674 * allocatestack.c (allocate_stack): Pass prot as second parameter
2677 2007-12-12 Ulrich Drepper <drepper@redhat.com>
2679 * tst-basic7.c: Allocate memory for the stack.
2682 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2683 (__pthread_cond_timedwait): Don't use VDSO.
2684 Patch by Michal Januszewski.
2686 2007-12-07 Ulrich Drepper <drepper@redhat.com>
2689 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2690 Allow label before pthread_cleanup_pop.
2691 (pthread_cleanup_pop_restore_np): Likewise.
2693 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2695 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2696 Store 2 before returning ETIMEDOUT.
2698 2007-11-23 Ulrich Drepper <drepper@redhat.com>
2700 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2701 Store 2 before returning ETIMEDOUT.
2702 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2703 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2704 (__lll_lock_wait_private): Optimize.
2705 (__lll_lock_wait): Likewise.
2707 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2709 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2710 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2711 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2713 2007-11-08 Ulrich Drepper <drepper@redhat.com>
2716 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2717 If we time out, try one last time to lock the futex to avoid
2718 losing a wakeup signal.
2719 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2720 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2723 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2726 2007-11-07 Ulrich Drepper <drepper@redhat.com>
2729 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2730 mmap failed to EAGAIN.
2731 * Makefile (tests): Add tst-basic7.
2732 * tst-basic7.c: New file.
2734 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2736 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2737 Use __linkin_atfork.
2739 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2741 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2742 missing line continuations.
2743 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2744 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2746 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2749 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2750 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2751 (struct timer): Add next element.
2752 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2753 enqueue timer structure into __active_timer_sigev_thread list.
2754 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2755 remove timer struct from __active_timer_sigev_thread.
2756 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2757 Before using timer structure make sure it is still on the
2758 __active_timer_sigev_thread list. Keep lock until done.
2759 Define __active_timer_sigev_thread and
2760 __active_timer_sigev_thread_lock.
2762 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2764 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2765 Redefine thread_atfork for use of ATFORK_MEM.
2766 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2767 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2769 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2770 Use atomic operation when removing first element of list.
2772 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2774 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2775 routine instead of an alias to __new_sem_post.
2777 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2779 * init.c (__pthread_initialize_minimal): Initialize word to appease
2782 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2784 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2785 libc.so just clear NAME.
2786 (__libc_rwlock_fini): Nop inside of libc.so.
2787 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2790 2007-09-02 Ulrich Drepper <drepper@redhat.com>
2792 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2793 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2795 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2797 2007-08-21 Ulrich Drepper <drepper@redhat.com>
2800 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2801 reclaimed stack if necessary.
2802 * Makefile (tests): Add tst-tsd6.
2803 * tst-tsd6.c: New file.
2805 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2807 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2808 Add private argument.
2810 2007-08-20 Ulrich Drepper <drepper@redhat.com>
2812 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2813 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2815 2007-08-16 Jakub Jelinek <jakub@redhat.com>
2817 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2818 (__lll_robust_timedlock): Pass private as last argument to
2819 __lll_robust_timedlock_wait.
2820 (__lll_unlock): Fix a pasto.
2822 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2824 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2825 sparc_old_sem): New structs.
2826 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2827 (__sem_wait_cleanup): New function.
2828 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2829 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2830 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2832 (__old_sem_wait): New function.
2833 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2834 nptl/sysdeps/unix/sysv/linux/sparc version.
2835 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2837 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2838 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2839 (__new_sem_trywait): Use sparc_old_sem structure.
2840 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2841 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2842 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2843 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2844 lll_futex_timed_wait.
2845 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2846 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2847 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2849 (__old_sem_post): New function.
2850 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2851 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2852 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2853 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2854 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2855 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2857 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2859 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2860 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2861 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2862 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2863 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2864 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2865 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2867 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2868 kernel-features.h and tcb-offsets.h.
2869 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2870 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2872 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2874 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2875 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2877 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2878 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2879 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2880 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2881 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2882 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2883 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2885 2007-08-14 Jakub Jelinek <jakub@redhat.com>
2887 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2888 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2889 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2890 lll_futex_timed_wait.
2892 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2893 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2894 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2895 __lll_robust_unlock, __lll_wait_tid): Likewise.
2897 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2899 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2901 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2902 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2903 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2904 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2905 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2906 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2907 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2908 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2910 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2911 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2912 process private. Switch DW_CFA_advance_loc1 and some
2913 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2914 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2915 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2916 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2917 process private. Switch DW_CFA_advance_loc{1,2} and some
2918 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2919 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2920 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2921 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2923 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2924 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2925 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2927 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2928 (__pthread_cond_broadcast): Compare %r8 instead of
2929 dep_mutex-cond_*(%rdi) with $-1.
2930 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2931 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2934 2007-08-13 Ulrich Drepper <drepper@redhat.com>
2936 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2938 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2940 * allocatestack.c: Include kernel-features.h.
2941 * pthread_create.c: Likewise.
2942 * pthread_mutex_init.c: Likewise.
2944 * pthread_cond_timedwait.c: Likewise.
2945 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2946 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2947 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2948 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2949 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2950 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2951 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2953 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2955 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2956 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2957 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2958 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2960 2007-08-12 Jakub Jelinek <jakub@redhat.com>
2962 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2963 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2964 byte elements. One of them is the new __shared element.
2965 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2966 adjust names of other padding elements.
2967 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2968 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2969 byte elements. One of them is the new __shared element.
2970 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2971 adjust names of other padding elements.
2972 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2973 Renamed __pad1 element to __shared, adjust names of other padding
2975 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2976 (pthread_rwlock_t): Likewise.
2977 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2980 2007-08-09 Anton Blanchard <anton@samba.org>
2982 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2984 2007-08-12 Ulrich Drepper <drepper@redhat.com>
2986 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2987 <kernel-features.h>.
2988 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2990 2007-08-11 Ulrich Drepper <drepper@redhat.com>
2992 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2993 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2994 dealing with robust mutexes.
2995 * pthread_mutex_timedlock.c: Likewise.
2996 * pthread_mutex_trylock.c: Likewise.
2997 * pthread_mutex_unlock.c: Likewise.
2998 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3000 2007-08-06 Jakub Jelinek <jakub@redhat.com>
3002 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
3003 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
3004 (PTHREAD_MUTEX_PSHARED): Define.
3005 * pthread_mutex_init.c (__pthread_mutex_init): Set
3006 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
3008 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
3009 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
3010 as second argument to lll_lock.
3011 (LLL_MUTEX_TRYLOCK): Take mutex as argument
3012 instead of its __data.__lock field.
3013 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3014 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3016 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3017 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
3018 instead of mutex->__data.__kind directly, pass
3019 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
3020 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
3021 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3022 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
3023 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
3024 to lll_timedlock, lll_robust_timedlock, lll_unlock and
3025 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
3026 of mutex->__data.__kind directly.
3027 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
3028 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
3029 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
3030 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
3031 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
3032 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
3034 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
3035 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
3036 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3038 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
3039 Take mutex as argument instead of its __data.__lock field, pass
3040 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
3041 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
3042 __data.__lock field.
3043 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3044 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3045 to lll_robust_cond_lock.
3046 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
3047 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
3048 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
3049 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
3050 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
3051 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
3053 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
3054 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
3056 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
3057 pshared variable, pass it to lll_lock, lll_unlock,
3058 lll_futex_timedwait and lll_futex_wake.
3059 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
3060 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
3062 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
3063 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
3065 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
3066 lll_futex_wake_unlock): Likewise.
3067 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
3069 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
3070 lll_futex_wake_unlock): Likewise.
3071 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
3073 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
3074 lll_futex_wake_unlock): Likewise.
3075 (lll_futex_wake): Fix a typo.
3076 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
3077 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3078 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3079 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3080 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3081 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3082 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3083 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3084 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3085 (__pthread_cond_timedwait): Likewise.
3086 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3087 (__condvar_cleanup, __pthread_cond_wait): Likewise.
3089 2007-08-05 Jakub Jelinek <jakub@redhat.com>
3091 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3092 Don't use CGOTSETUP and CGOTRESTORE macros.
3093 (CGOTSETUP, CGOTRESTORE): Remove.
3094 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
3097 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3099 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
3100 definitions for private futexes.
3101 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
3102 kernel-features.h and lowlevellock.h. Use private futexes if
3104 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
3105 (__lll_mutex_lock_wait): Rename to
3106 (__lll_lock_wait): ... this. Don't compile in for libc.so.
3107 (__lll_mutex_timedlock_wait): Rename to ...
3108 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
3109 Don't compile in for libc.so.
3110 (__lll_mutex_unlock_wake): Rename to ...
3111 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
3112 (__lll_timedwait_tid): Use __NR_gettimeofday.
3113 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
3114 the header from assembler. Renamed all lll_mutex_* resp.
3115 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3116 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
3117 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
3119 (__lll_lock_wait_private): Add prototype.
3120 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
3121 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
3122 __lll_unlock_wake): Likewise.
3123 (lll_lock): Add private argument. Call __lll_lock_wait_private
3124 if private is constant LLL_PRIVATE.
3125 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3126 lll_timedlock, lll_robust_timedlock): Add private argument.
3127 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
3128 if private is constant LLL_PRIVATE.
3129 (lll_robust_unlock, lll_robust_dead): Add private argument.
3130 (lll_lock_t): Remove.
3131 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3132 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3133 lll_cond_wake, lll_cond_broadcast): Remove.
3134 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
3135 kernel-features.h and lowlevellock.h.
3136 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3137 (LOAD_FUTEX_WAIT): Define.
3138 (__lll_robust_mutex_lock_wait): Rename to ...
3139 (__lll_robust_lock_wait): ... this. Add private argument.
3140 Use LOAD_FUTEX_WAIT macro.
3141 (__lll_robust_mutex_timedlock_wait): Rename to ...
3142 (__lll_robust_timedlock_wait): ... this. Add private argument.
3143 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
3144 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
3146 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3147 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
3148 __lll_mutex_{lock,unlock}_*.
3149 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
3150 lowlevellock.h and pthread-errnos.h.
3151 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3152 FUTEX_CMP_REQUEUE, EINVAL): Remove.
3153 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
3154 __lll_mutex_{lock,unlock}_*.
3155 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
3156 lowlevellock.h and pthread-errnos.h.
3157 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
3158 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
3159 __lll_mutex_{lock,unlock}_*.
3160 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3162 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
3163 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
3164 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3165 (__condvar_tw_cleanup): Likewise.
3166 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3168 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3169 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
3170 __lll_mutex_{lock,unlock}_*.
3171 ( __condvar_w_cleanup): Likewise.
3172 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
3173 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3174 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
3176 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3177 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
3178 __lll_mutex_{lock,unlock}_*.
3179 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
3181 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3182 FUTEX_PRIVATE_FLAG): Remove.
3183 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
3184 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3185 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
3187 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3188 FUTEX_PRIVATE_FLAG): Remove.
3189 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
3190 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3191 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
3193 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3194 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
3195 __lll_mutex_{lock,unlock}_*.
3196 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
3198 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3199 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
3200 __lll_mutex_{lock,unlock}_*.
3201 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
3202 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3203 (__new_sem_post): Use standard initial exec code sequences.
3204 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
3206 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3207 FUTEX_PRIVATE_FLAG): Remove.
3208 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
3209 exec code sequences.
3210 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
3211 (__new_sem_trywait): Use standard initial exec code sequences.
3212 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
3213 (__new_sem_wait): Use standard initial exec code sequences.
3215 2007-07-31 Anton Blanchard <anton@samba.org>
3217 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3218 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
3219 atomic_full_barrier.
3221 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3223 * allocatestack.c (stack_cache_lock): Change type to int.
3224 (get_cached_stack, allocate_stack, __deallocate_stack,
3225 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
3226 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
3227 as second argument to lll_lock and lll_unlock macros on
3229 * pthread_create.c (__find_in_stack_list): Likewise.
3230 (start_thread): Similarly with pd->lock. Use lll_robust_dead
3231 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
3233 * descr.h (struct pthread): Change lock and setxid_futex field
3235 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
3236 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
3237 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
3238 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
3240 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
3241 * pthread_cond_init.c (__pthread_cond_init): Likewise.
3242 * pthreadP.h (__attr_list_lock): Change type to int.
3243 * pthread_attr_init.c (__attr_list_lock): Likewise.
3244 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
3245 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
3247 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
3248 also for lll_futex_{wake,wait}.
3249 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
3251 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
3252 LLL_SHARED as second argument to lll_{,un}lock.
3253 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
3254 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
3255 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
3256 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
3258 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
3259 as second argument to lll_{,un}lock macros on pd->lock.
3260 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
3261 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
3262 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3263 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
3265 * sysdeps/pthread/createthread.c (do_clone, create_thread):
3267 * pthread_once.c (once_lock): Change type to int.
3268 (__pthread_once): Pass LLL_PRIVATE as second argument to
3269 lll_{,un}lock macros on once_lock.
3270 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
3271 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
3272 rwlock->__data.__shared as second argument to them and similarly
3274 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
3276 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
3278 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
3279 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
3280 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
3281 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3282 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
3283 to lll_{,un}lock macros on __sem_mappings_lock.
3284 * sem_open.c (check_add_mapping): Likewise.
3285 (__sem_mappings_lock): Change type to int.
3286 * semaphoreP.h (__sem_mappings_lock): Likewise.
3287 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3288 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
3289 instead of lll_*mutex_*, pass LLL_SHARED as last
3291 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
3292 pass LLL_SHARED as last argument.
3293 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
3294 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
3295 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
3296 pass LLL_SHARED as last argument.
3297 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3298 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
3299 LLL_SHARED as last argument.
3300 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
3301 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
3303 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
3304 __libc_lock_lock_recursive, __libc_lock_unlock,
3305 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
3306 argument to lll_{,un}lock.
3307 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
3308 _IO_lock_unlock): Likewise.
3309 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
3311 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3312 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
3314 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
3315 free_mem): Likewise.
3316 (__fork_lock): Change type to int.
3317 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
3318 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
3319 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
3321 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3322 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
3323 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
3325 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
3326 pass it through to lll_futex_*wait, only compile in when
3328 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3329 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
3330 argument and pass it through to lll_futex_*wait.
3331 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
3332 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
3333 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
3334 inline functions to __lll_* resp. __lll_robust_*.
3335 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
3336 (lll_mutex_dead): Add private argument.
3337 (__lll_lock_wait_private): New prototype.
3338 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
3339 __lll_robust_lock_timedwait): Add private argument to prototypes.
3340 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
3341 call __lll_lock_wait_private, otherwise pass private to
3343 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
3344 __lll_robust_timedlock): Add private argument, pass it to
3345 __lll_*wait functions.
3346 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
3347 call __lll_unlock_wake_private, otherwise pass private to
3349 (__lll_robust_unlock): Add private argument, pass it to
3350 __lll_robust_unlock_wake.
3351 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
3352 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
3353 argument, pass it through to __lll_* inline function.
3354 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
3355 (lll_lock_t): Remove.
3356 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3357 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3358 lll_cond_wake, lll_cond_broadcast): Remove.
3359 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3360 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3361 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3362 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3363 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
3364 the header from assembler. Renamed all lll_mutex_* resp.
3365 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3366 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
3367 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3368 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
3369 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
3370 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
3371 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
3373 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
3374 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
3375 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
3376 (lll_trylock): Likewise, use __lll_trylock_asm, pass
3377 MULTIPLE_THREADS_OFFSET as another asm operand.
3378 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
3379 MULTIPLE_THREADS_OFFSET as last asm operand, call
3380 __lll_lock_wait_private if private is constant LLL_PRIVATE,
3381 otherwise pass private as another argument to __lll_lock_wait.
3382 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3383 lll_timedlock, lll_robust_timedlock): Add private argument, pass
3384 private as another argument to __lll_*lock_wait call.
3385 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
3386 MULTIPLE_THREADS_OFFSET as another asm operand, call
3387 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
3388 otherwise pass private as another argument to __lll_unlock_wake.
3389 (lll_robust_unlock): Add private argument, pass private as another
3390 argument to __lll_unlock_wake.
3391 (lll_robust_dead): Add private argument, use __lll_private_flag
3393 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
3394 LLL_MUTEX_LOCK_INITIALIZER.
3395 (lll_lock_t): Remove.
3396 (LLL_LOCK_INITIALIZER_WAITERS): Define.
3397 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3398 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3399 lll_cond_wake, lll_cond_broadcast): Remove.
3400 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3401 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
3402 2007-05-2{3,9} changes.
3403 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
3404 kernel-features.h and lowlevellock.h.
3405 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3406 (LOAD_FUTEX_WAIT): Rewritten.
3407 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3409 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3410 (__lll_mutex_lock_wait): Rename to ...
3411 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
3412 %ecx, %ecx is now private argument. Don't compile in for libc.so.
3413 (__lll_mutex_timedlock_wait): Rename to ...
3414 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
3415 contains private argument. Don't compile in for libc.so.
3416 (__lll_mutex_unlock_wake): Rename to ...
3417 (__lll_unlock_wake): ... this. %ecx contains private argument.
3418 Don't compile in for libc.so.
3419 (__lll_timedwait_tid): Use __NR_gettimeofday.
3420 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3421 kernel-features.h and lowlevellock.h.
3422 (LOAD_FUTEX_WAIT): Define.
3423 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3425 (__lll_robust_mutex_lock_wait): Rename to ...
3426 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
3427 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
3429 (__lll_robust_mutex_timedlock_wait): Rename to ...
3430 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
3431 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3432 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3434 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3435 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3436 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3437 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3438 to __lll_lock_wait in %edx.
3439 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3440 Include lowlevellock.h and pthread-errnos.h.
3441 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3442 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3443 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3444 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3445 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3447 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3448 Include lowlevellock.h and pthread-errnos.h.
3449 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3450 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3451 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3452 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3453 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3455 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3456 Include lowlevellock.h.
3457 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3459 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3460 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3461 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3462 __lll_unlock_wake. Use __NR_gettimeofday.
3463 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3464 Include lowlevellock.h.
3465 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3466 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3467 to __lll_*, pass cond_lock address in %edx rather than %ecx to
3468 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3469 and __lll_unlock_wake.
3470 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3471 Include lowlevellock.h.
3472 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3473 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3474 MUTEX(%ebx) address in %edx rather than %ecx to
3475 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3476 and __lll_unlock_wake. Move return value from %ecx to %edx
3478 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3479 Include lowlevellock.h.
3480 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3482 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3483 MUTEX(%ebp) address in %edx rather than %ecx to
3484 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3485 and __lll_unlock_wake. Move return value from %ecx to %edx
3486 register. Use __NR_gettimeofday.
3487 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3488 Include lowlevellock.h.
3489 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3491 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3492 MUTEX(%ebp) address in %edx rather than %ecx to
3493 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3494 and __lll_unlock_wake. Move return value from %ecx to %edx
3495 register. Use __NR_gettimeofday.
3496 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3497 Include lowlevellock.h.
3498 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3499 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3500 MUTEX(%edi) address in %edx rather than %ecx to
3501 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3502 and __lll_unlock_wake.
3503 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3504 Include lowlevellock.h.
3505 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3506 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3507 MUTEX(%ebx) address in %edx rather than %ecx to
3508 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3509 and __lll_unlock_wake. Move return value from %ecx to %edx
3511 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3513 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3515 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3516 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3517 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3519 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3520 (sem_timedwait): Use __NR_gettimeofday.
3521 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3523 (LOCK): Don't define.
3524 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3526 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3527 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3529 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3530 2007-05-2{3,9} changes.
3531 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3532 kernel-features.h and lowlevellock.h.
3533 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3534 (LOAD_FUTEX_WAIT): Rewritten.
3535 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3536 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3537 (__lll_mutex_lock_wait): Rename to ...
3538 (__lll_lock_wait): ... this. %esi is now private argument.
3539 Don't compile in for libc.so.
3540 (__lll_mutex_timedlock_wait): Rename to ...
3541 (__lll_timedlock_wait): ... this. %esi contains private argument.
3542 Don't compile in for libc.so.
3543 (__lll_mutex_unlock_wake): Rename to ...
3544 (__lll_unlock_wake): ... this. %esi contains private argument.
3545 Don't compile in for libc.so.
3546 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3547 kernel-features.h and lowlevellock.h.
3548 (LOAD_FUTEX_WAIT): Define.
3549 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3550 (__lll_robust_mutex_lock_wait): Rename to ...
3551 (__lll_robust_lock_wait): ... this. %esi argument contains private.
3552 Use LOAD_FUTEX_WAIT macro.
3553 (__lll_robust_mutex_timedlock_wait): Rename to ...
3554 (__lll_robust_timedlock_wait): ... this. %esi argument contains
3555 private, use LOAD_FUTEX_WAIT macro.
3556 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3558 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3559 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3560 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3561 __lll_lock_wait and __lll_unlock_wake.
3562 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3563 Include lowlevellock.h and pthread-errnos.h.
3564 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3565 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3566 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3567 pass LLL_SHARED in %esi to both __lll_lock_wait and
3569 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3570 Include lowlevellock.h and pthread-errnos.h.
3571 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3572 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3573 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3574 pass LLL_SHARED in %esi to both __lll_lock_wait and
3576 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3577 Include lowlevellock.h.
3578 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3579 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3580 pass LLL_SHARED in %esi to both __lll_lock_wait and
3582 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3583 Include lowlevellock.h.
3584 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3585 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3586 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3587 and __lll_unlock_wake.
3588 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3589 Include lowlevellock.h.
3590 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3592 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3593 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3594 and __lll_unlock_wake.
3595 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3596 Include lowlevellock.h.
3597 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3599 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3600 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3601 and __lll_unlock_wake.
3602 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3603 Include lowlevellock.h.
3604 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3606 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3607 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3608 and __lll_unlock_wake.
3609 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3610 Include lowlevellock.h.
3611 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3613 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3614 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3615 and __lll_unlock_wake.
3616 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3617 Include lowlevellock.h.
3618 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3620 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3621 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3622 and __lll_unlock_wake.
3623 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3625 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3627 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3628 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3629 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3631 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3632 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3634 (LOCK): Don't define.
3635 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3637 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3638 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3639 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3640 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3641 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3642 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3643 (__lll_lock_wait_private): New function.
3644 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3645 it to lll_futex_*wait. Don't compile in for libc.so.
3646 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3648 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3649 (struct sparc_pthread_barrier): Remove.
3650 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3651 struct sparc_pthread_barrier. Pass
3652 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3653 and lll_futex_wait macros.
3654 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3656 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3657 Include sparc pthread_barrier_wait.c instead of generic one.
3659 2007-07-30 Jakub Jelinek <jakub@redhat.com>
3661 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3663 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3664 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3666 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3667 (pthread_rwlock_timedwrlock): Likewise.
3668 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3669 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3671 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3673 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3675 2007-07-26 Jakub Jelinek <jakub@redhat.com>
3677 * tst-locale2.c (useless): Add return statement.
3679 2007-07-24 Jakub Jelinek <jakub@redhat.com>
3681 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3682 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3683 * pthread_create.c (start_thread): Likewise.
3684 * init.c (sighandler_setxid): Likewise.
3685 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3686 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3687 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3688 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3689 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3690 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3691 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3692 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3693 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3695 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3697 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3699 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3700 __rtld_notify): Likewise.
3701 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3702 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3703 __pthread_once): Likewise.
3704 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3705 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3706 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3707 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3708 (lll_futex_wait): Add private argument, define as wrapper around
3709 lll_futex_timed_wait.
3710 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3711 use __lll_private_flag macro.
3712 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3713 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3714 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3715 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3716 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3717 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3718 (lll_futex_wait): Add private argument, define as wrapper around
3719 lll_futex_timed_wait.
3720 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3721 use __lll_private_flag macro.
3722 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3723 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3724 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3726 (lll_futex_timed_wait, lll_futex_wake): Use it.
3727 (lll_private_futex_wait, lll_private_futex_timed_wait,
3728 lll_private_futex_wake): Removed.
3729 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3730 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3731 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3732 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3733 (lll_futex_wait): Add private argument, define as wrapper around
3734 lll_futex_timed_wait.
3735 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3736 use __lll_private_flag macro.
3737 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3738 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3740 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3741 (lll_private_futex_wait, lll_private_futex_timed_wait,
3742 lll_private_futex_wake): Removed.
3743 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3744 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3745 (lll_private_futex_wait, lll_private_futex_timed_wait,
3746 lll_private_futex_wake): Removed.
3747 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3748 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3749 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3750 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3751 (lll_futex_wait): Add private argument, define as wrapper around
3752 lll_futex_timed_wait.
3753 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3754 use __lll_private_flag macro.
3755 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3756 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3758 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3760 (lll_futex_timed_wait, lll_futex_wake): Use it.
3761 (lll_private_futex_wait, lll_private_futex_timed_wait,
3762 lll_private_futex_wake): Removed.
3764 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3766 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3767 of the structure for sparc32.
3769 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3771 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3773 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3775 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3776 code used when private futexes are assumed.
3777 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3780 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3782 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3783 (__lll_private_flag): Define.
3784 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3785 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3787 (lll_private_futex_wait, lll_private_futex_timedwait,
3788 lll_private_futex_wake): Define as wrapper around non-_private
3790 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3791 (__lll_private_flag): Define.
3792 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3793 (lll_private_futex_wait, lll_private_futex_timedwait,
3794 lll_private_futex_wake): Define as wrapper around non-_private
3797 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3799 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3800 parameter to lll_futex_wait call.
3801 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3803 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3804 Replace lll_futex_wait with lll_private_futex_wait.
3805 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3806 Add LLL_SHARED parameter to lll_futex_wake().
3808 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3809 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3810 lll_private_futex_wake.
3811 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3812 bit from private parm before syscall.
3813 (lll_futex_timed_wait): Likewise.
3814 (lll_futex_wake): Likewise.
3815 (lll_futex_wake_unlock): Likewise.
3816 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3817 (lll_robust_mutex_unlock): Likewise.
3818 (lll_mutex_unlock_force): Likewise.
3819 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3821 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3823 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3824 compilation when unconditionally using private futexes.
3825 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3826 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3828 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3829 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3831 2007-07-17 Jakub Jelinek <jakub@redhat.com>
3833 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3836 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3838 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3841 2007-05-16 Roland McGrath <roland@redhat.com>
3843 * init.c (__nptl_initial_report_events): New variable.
3844 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3847 2007-06-22 Jakub Jelinek <jakub@redhat.com>
3849 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3850 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3852 2007-06-19 Ulrich Drepper <drepper@redhat.com>
3854 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3857 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3859 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3860 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3861 * pthread_mutex_timedlock.c: Likewise.
3862 * pthread_mutex_trylock.c: Likewise.
3863 * pthread_mutex_unlock.c: Likewise.
3865 2007-06-17 Andreas Schwab <schwab@suse.de>
3867 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3870 2007-06-17 Ulrich Drepper <drepper@redhat.com>
3872 * allocatestack.c (allocate_stack): Make code compile if
3873 __ASSUME_PRIVATE_FUTEX is set.
3875 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3877 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3878 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3879 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3880 (__pthread_rwlock_wrlock): Likewise.
3881 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3882 (pthread_rwlock_timedrdlock): Likewise.
3883 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3884 (pthread_rwlock_timedwrlock): Likewise.
3885 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3886 (__pthread_rwlock_unlock): Likewise.
3888 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3890 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3891 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3892 Split __flags into __flags, __shared, __pad1 and __pad2.
3893 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3894 futexes if they are available.
3895 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3896 in libc-lowlevellock.S allow using private futexes.
3897 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3898 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3899 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3900 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3901 lll_private_futex_timed_wait and lll_private_futex_wake.
3902 (lll_robust_mutex_unlock): Fix typo.
3903 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3904 field in futex command setup.
3905 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3906 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3907 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3908 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3909 if they are available. Remove clear_once_control.
3910 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3911 futexes if they are available.
3912 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3913 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3914 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3915 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3916 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3917 Wake only when there are waiters.
3918 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3919 support. Indicate that there are waiters. Remove unnecessary
3920 extra cancellation test.
3921 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3922 left-over duplication of __sem_wait_cleanup.
3924 2007-06-07 Ulrich Drepper <drepper@redhat.com>
3926 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3927 parameter to lll_futex_wait, lll_futex_timed_wait, and
3928 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3929 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3930 lll_private_futex_wake.
3931 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3932 * allocatestack.c: Adjust use of lll_futex_* macros.
3934 * lowlevellock.h: Likewise.
3935 * pthread_barrier_wait.c: Likewise.
3936 * pthread_cond_broadcast.c: Likewise.
3937 * pthread_cond_destroy.c: Likewise.
3938 * pthread_cond_signal.c: Likewise.
3939 * pthread_cond_timedwait.c: Likewise.
3940 * pthread_cond_wait.c: Likewise.
3941 * pthread_create.c: Likewise.
3942 * pthread_mutex_lock.c: Likewise.
3943 * pthread_mutex_setprioceiling.c: Likewise.
3944 * pthread_mutex_timedlock.c: Likewise.
3945 * pthread_mutex_unlock.c: Likewise.
3946 * pthread_rwlock_timedrdlock.c: Likewise.
3947 * pthread_rwlock_timedwrlock.c: Likewise.
3948 * pthread_rwlock_unlock.c: Likewise.
3949 * sysdeps/alpha/tls.h: Likewise.
3950 * sysdeps/i386/tls.h: Likewise.
3951 * sysdeps/ia64/tls.h: Likewise.
3952 * sysdeps/powerpc/tls.h: Likewise.
3953 * sysdeps/pthread/aio_misc.h: Likewise.
3954 * sysdeps/pthread/gai_misc.h: Likewise.
3955 * sysdeps/s390/tls.h: Likewise.
3956 * sysdeps/sh/tls.h: Likewise.
3957 * sysdeps/sparc/tls.h: Likewise.
3958 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3959 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3960 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3961 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3962 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3963 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3964 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3965 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3966 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3967 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3969 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3970 * sysdeps/x86_64/tls.h: Likewise.
3972 2007-05-29 Ulrich Drepper <drepper@redhat.com>
3974 * pthread_getattr_np.c: No need to install a cancellation handler,
3975 this is no cancellation point.
3976 * pthread_getschedparam.c: Likewise.
3977 * pthread_setschedparam.c: Likewise.
3978 * pthread_setschedprio.c: Likewise.
3979 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3981 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3982 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3983 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3984 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3985 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3986 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3987 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3988 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3989 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3990 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3991 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3992 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3994 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3995 whether there are more than one thread makes no sense here since
3996 we only call the slow path if the locks are taken.
3997 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3999 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
4000 COND_NWAITERS_SHIFT.
4001 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
4003 * pthread_cond_init.c: Likewise.
4004 * pthread_cond_timedwait.c: Likewise.
4005 * pthread_cond_wait.c: Likewise.
4006 * pthread_condattr_getclock.c: Likewise.
4007 * pthread_condattr_setclock.c: Likewise.
4008 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
4009 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4010 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4011 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4012 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4014 2007-05-28 Jakub Jelinek <jakub@redhat.com>
4016 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
4019 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
4021 (THREAD_GSCOPE_GET_FLAG): Remove.
4022 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
4023 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
4025 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
4026 (THREAD_GSCOPE_GET_FLAG): Remove.
4027 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
4028 instead of THREAD_GSCOPE_GET_FLAG.
4029 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
4031 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4032 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4033 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4034 THREAD_GSCOPE_WAIT): Define.
4035 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4036 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4037 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4038 THREAD_GSCOPE_WAIT): Define.
4039 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4040 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4041 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4042 THREAD_GSCOPE_WAIT): Define.
4043 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4044 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4045 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4046 THREAD_GSCOPE_WAIT): Define.
4048 2007-05-24 Richard Henderson <rth@redhat.com>
4050 * descr.h (struct pthread): Add header.gscope_flag.
4051 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4052 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4053 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4054 THREAD_GSCOPE_WAIT): Define.
4056 2007-05-27 Ulrich Drepper <drepper@redhat.com>
4058 * init.c: Make it compile with older kernel headers.
4060 * tst-initializers1.c: Show through exit code which test failed.
4062 * pthread_rwlock_init.c: Also initialize __shared field.
4063 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
4064 element in rwlock structure into four byte elements. One of them is
4065 the new __shared element.
4066 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
4068 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
4069 __shared, adjust names of other padding elements.
4070 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4071 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
4072 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
4073 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
4075 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
4076 futex to use private operations if possible.
4077 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4079 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4081 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4082 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4083 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4084 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4086 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4088 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4089 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4091 2007-05-26 Ulrich Drepper <drepper@redhat.com>
4093 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
4094 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
4095 * pthread_rwlock_timedrdlock.c: Likewise.
4096 * pthread_rwlock_tryrdlock.c: Likewise.
4098 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
4101 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
4102 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
4103 duplication of __sem_wait_cleanup.
4105 * allocatestack.c: Revert last change.
4107 * sysdeps/i386/tls.h: Likewise.
4108 * sysdeps/x86_64/tls.h: Likewise.
4109 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
4111 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
4113 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
4115 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
4116 * pthread_barrier_init.c: Set private flag if pshared and private
4117 futexes are supported.
4118 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
4119 private field in futex command setup.
4120 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4122 2007-05-25 Ulrich Drepper <drepper@redhat.com>
4124 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
4126 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4127 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4128 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4129 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4130 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4132 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
4133 * sem_init.c (__new_sem_init): Rewrite to initialize all three
4134 fields in the structure.
4135 (__old_sem_init): New function.
4136 * sem_open.c: Initialize all fields of the structure.
4137 * sem_getvalue.c: Adjust for renamed element.
4138 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
4139 (gen-as-const-headers): Add structsem.sym.
4140 * sysdeps/unix/sysv/linux/structsem.sym: New file.
4141 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
4142 struct new_sem. Add struct old_sem.
4143 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
4144 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4145 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4146 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
4147 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4148 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4149 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4150 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4151 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4152 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
4153 * tst-sem10.c: New file.
4154 * tst-sem11.c: New file.
4155 * tst-sem12.c: New file.
4156 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
4159 2007-05-25 Ulrich Drepper <drepper@redhat.com>
4160 Jakub Jelinek <jakub@redhat.com>
4162 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4163 Move __pthread_enable_asynccancel right before futex syscall.
4164 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4167 2007-05-24 Jakub Jelinek <jakub@redhat.com>
4169 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
4170 THREAD_COPY_PRIVATE_FUTEX): Define.
4171 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
4172 THREAD_COPY_PRIVATE_FUTEX): Define.
4173 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
4174 * init.c (__pthread_initialize_minimal_internal): Use
4175 THREAD_SET_PRIVATE_FUTEX.
4177 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
4178 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
4179 THREAD_GSCOPE_FLAG_WAIT): Define.
4180 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
4181 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
4182 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
4184 (THREAD_GSCOPE_GET_FLAG): Define.
4185 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
4186 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
4187 instead of ->header.gscope_flag directly.
4189 2007-05-23 Ulrich Drepper <drepper@redhat.com>
4191 * init.c (__pthread_initialize_minimal_internal): Check whether
4192 private futexes are available.
4193 * allocatestack.c (allocate_stack): Copy private_futex field from
4194 current thread into the new stack.
4195 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
4196 futexes if they are available.
4197 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
4198 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
4199 in libc-lowlevellock.S allow using private futexes.
4200 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4201 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
4203 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4204 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
4205 if they are available.
4206 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
4207 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
4208 * sysdeps/i386/tcb-offsets.sym: Likewise.
4209 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
4210 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
4212 2007-05-21 Ulrich Drepper <drepper@redhat.com>
4214 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4215 Remove ptr_wait_lookup_done again.
4216 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
4217 (__pthread_initialize_minimal_internal): Initialize
4218 _dl_wait_lookup_done pointer in _rtld_global directly.
4219 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4220 Remove code to code _dl_wait_lookup_done.
4221 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
4224 2007-05-21 Jakub Jelinek <jakub@redhat.com>
4226 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
4227 pthread_mutex_init failed with ENOTSUP.
4229 2007-05-19 Ulrich Drepper <drepper@redhat.com>
4231 * allocatestack.c (__wait_lookup_done): New function.
4232 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4233 Add ptr_wait_lookup_done.
4234 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
4235 * pthreadP.h: Declare __wait_lookup_done.
4236 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
4237 Define macros to implement reference handling of global scope.
4238 * sysdeps/x86_64/tls.h: Likewise.
4239 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4240 Initialize GL(dl_wait_lookup_done).
4242 2007-05-17 Ulrich Drepper <drepper@redhat.com>
4245 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
4247 * pthread_mutex_timedlock.c: Likewise.
4248 * pthread_mutex_trylock.c: Likewise.
4249 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4251 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
4252 * tst-robust9.c: New file.
4253 * tst-robustpi9.c: New file.
4255 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
4256 unnecessary extra cancellation test.
4258 2007-05-14 Ulrich Drepper <drepper@redhat.com>
4260 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
4261 extra cancellation test.
4262 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4264 2007-05-10 Ulrich Drepper <drepper@redhat.com>
4266 * descr.h (struct pthread): Rearrange members to fill hole in
4269 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4270 (__pthread_setaffinity_new): If syscall was successful and
4271 RESET_VGETCPU_CACHE is defined, use it before returning.
4272 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
4274 2007-05-10 Jakub Jelinek <jakub@redhat.com>
4277 * tst-align2.c: Include stackinfo.h.
4278 * tst-getpid1.c: Likewise.
4280 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
4283 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
4284 * tst-getpid1.c (do_test): Likewise.
4287 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
4288 (allocate_stack): Likewise.
4290 2007-05-07 Ulrich Drepper <drepper@redhat.com>
4292 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4293 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
4294 (__lll_robust_timedlock_wait): Likewise.
4295 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
4297 2007-05-06 Mike Frysinger <vapier@gentoo.org>
4300 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
4301 * tst-cancel4.c (tf_fdatasync): New test.
4303 2007-04-27 Ulrich Drepper <drepper@redhat.com>
4306 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
4307 check mutexes like normal mutexes.
4310 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
4311 Initialize the whole sigevent structure to appease valgrind.
4313 2007-04-25 Ulrich Drepper <drepper@redhat.com>
4315 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
4316 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
4318 2007-04-06 Ulrich Drepper <drepper@redhat.com>
4320 * tst-locale1.c: Avoid warnings.
4321 * tst-locale2.c: Likewise.
4323 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
4325 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4326 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
4328 2007-03-16 Jakub Jelinek <jakub@redhat.com>
4330 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
4331 __extern_always_inline where appropriate.
4332 * sysdeps/pthread/pthread.h: Likewise.
4334 2007-03-13 Richard Henderson <rth@redhat.com>
4336 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
4337 separate cfi regions for the two subsections.
4339 2007-02-25 Ulrich Drepper <drepper@redhat.com>
4341 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
4342 new thread, don't just decrement it.
4343 Patch by Suzuki K P <suzuki@in.ibm.com>.
4345 2007-02-21 Ulrich Drepper <drepper@redhat.com>
4347 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
4348 PTHFCT_CALL definition.
4350 2007-02-18 Ulrich Drepper <drepper@redhat.com>
4352 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
4353 available, don't use it.
4355 2007-02-09 Jakub Jelinek <jakub@redhat.com>
4357 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4358 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
4359 call into the kernel to delay.
4361 2007-01-18 Ulrich Drepper <drepper@redhat.com>
4363 * tst-initializers1.c: We want to test the initializers as seen
4364 outside of libc, so undefined _LIBC.
4366 * pthread_join.c (cleanup): Avoid warning.
4368 2007-01-17 Ulrich Drepper <drepper@redhat.com>
4370 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4371 (__lll_timedwait_tid): Add unwind info.
4373 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4374 function table, mangle the pointers.
4375 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
4376 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
4377 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
4378 demangle pointers before use.
4379 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
4381 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4382 * sysdeps/pthread/setxid.h: Likewise.
4384 2007-01-12 Ulrich Drepper <drepper@redhat.com>
4386 * tst-rwlock7.c: Show some more information in case of correct
4389 2007-01-11 Ulrich Drepper <drepper@redhat.com>
4391 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4392 (lll_futex_timed_wait): Undo part of last change, don't negate
4395 2007-01-10 Ulrich Drepper <drepper@redhat.com>
4397 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
4398 FUTEX_CMP_REQUEUE and lll_futex_requeue.
4400 2006-12-28 David S. Miller <davem@davemloft.net>
4402 * shlib-versions: Fix sparc64 linux target specification.
4404 2007-01-10 Jakub Jelinek <jakub@redhat.com>
4406 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4407 Adjust include path for pthread_barrier_wait.c move.
4409 2006-12-21 Jakub Jelinek <jakub@redhat.com>
4411 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
4412 tid isn't reread from pd->tid in between ESRCH test and the syscall.
4414 2006-12-06 Jakub Jelinek <jakub@redhat.com>
4416 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4417 6 argument cancellable syscalls.
4418 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4419 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4420 6 argument cancellable syscalls.
4421 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4423 2006-12-09 Ulrich Drepper <drepper@redhat.com>
4425 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4426 (__rtld_mrlock_initialize): Add missing closing parenthesis.
4428 2006-10-30 Jakub Jelinek <jakub@redhat.com>
4430 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4431 __sync_lock_release instead of __sync_lock_release_si.
4433 2006-10-29 Jakub Jelinek <jakub@redhat.com>
4435 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4437 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4438 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4439 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4440 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4441 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4442 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4443 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4444 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4445 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4446 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4447 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4449 2006-10-27 Ulrich Drepper <drepper@redhat.com>
4451 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4452 * pthread_barrier_wait.c: ...here.
4453 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4454 * pthread_cond_broadcast.c: ...here.
4455 * sysdeps/pthread/pthread_cond_signal.c: Move to...
4456 * pthread_cond_signal.c: ...here.
4457 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4458 * pthread_cond_timedwait.c: ...here.
4459 * sysdeps/pthread/pthread_cond_wait.c: Move to...
4460 * pthread_cond_wait.c: ...here.
4461 * sysdeps/pthread/pthread_once.c: Move to...
4462 * pthread_once.c: ...here.
4463 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4464 * pthread_rwlock_rdlock.c: ...here.
4465 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4466 * pthread_rwlock_timedrdlock.c: ...here.
4467 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4468 * pthread_rwlock_timedwrlock.c: ...here.
4469 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4470 * pthread_rwlock_unlock.c: ...here.
4471 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4472 * pthread_rwlock_wrlock.c: ...here.
4473 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4474 * pthread_spin_destroy.c: ...here.
4475 * sysdeps/pthread/pthread_spin_init.c: Move to...
4476 * pthread_spin_init.c: ...here.
4477 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4478 * pthread_spin_unlock.c: ...here.
4479 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4480 * pthread_getcpuclockid.c: ...here.
4482 * init.c: USE_TLS support is now always enabled.
4483 * tst-tls5.h: Likewise.
4484 * sysdeps/alpha/tls.h: Likewise.
4485 * sysdeps/i386/tls.h: Likewise.
4486 * sysdeps/ia64/tls.h: Likewise.
4487 * sysdeps/powerpc/tls.h: Likewise.
4488 * sysdeps/s390/tls.h: Likewise.
4489 * sysdeps/sh/tls.h: Likewise.
4490 * sysdeps/sparc/tls.h: Likewise.
4491 * sysdeps/x86_64/tls.h: Likewise.
4493 2006-10-27 Jakub Jelinek <jakub@redhat.com>
4495 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4496 __rtld_mrlock_change): Update oldval if atomic compare and exchange
4499 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4500 Define to THREAD_SELF->header.multiple_threads.
4501 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4503 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4505 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4506 (SINGLE_THREAD_P): Likewise.
4507 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4508 (SINGLE_THREAD_P): Likewise.
4509 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4510 (SINGLE_THREAD_P): Likewise.
4511 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4512 (SINGLE_THREAD_P): Likewise.
4513 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4515 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4516 (SINGLE_THREAD_P): Likewise.
4517 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4518 (SINGLE_THREAD_P): Likewise.
4519 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4522 2006-10-26 Jakub Jelinek <jakub@redhat.com>
4524 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4525 by default rather than 2_3_3.
4527 2006-10-17 Jakub Jelinek <jakub@redhat.com>
4529 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4530 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4531 atomic_* instead of catomic_* macros.
4533 2006-10-12 Ulrich Drepper <drepper@redhat.com>
4536 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4537 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4538 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4539 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4540 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4541 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4542 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4543 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4544 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4545 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4546 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4547 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4548 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4550 2006-10-11 Ulrich Drepper <drepper@redhat.com>
4552 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4553 cancelable syscalls with six parameters.
4555 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4556 operations instead of atomic_*.
4558 2006-10-09 Ulrich Drepper <drepper@redhat.com>
4560 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4562 2006-10-07 Ulrich Drepper <drepper@redhat.com>
4564 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4565 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4566 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4568 * pthread_attr_setstack.c: Allow overwriting the version number of the
4570 * pthread_attr_setstacksize.c: Likewise.
4571 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4573 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4574 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4576 2006-09-24 Ulrich Drepper <drepper@redhat.com>
4579 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4580 Patch by Petr Baudis.
4582 2006-09-18 Jakub Jelinek <jakub@redhat.com>
4584 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4586 * tst-cancel2.c (tf): Loop as long as something was written.
4588 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4590 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4591 mutexes wake all mutexes.
4592 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4593 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4594 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4596 2006-09-12 Ulrich Drepper <drepper@redhat.com>
4598 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4599 to guarantee the thread is always canceled.
4601 2006-09-08 Jakub Jelinek <jakub@redhat.com>
4603 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4605 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4606 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4607 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4608 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4609 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4611 2006-09-08 Ulrich Drepper <drepper@redhat.com>
4614 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4615 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4616 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4617 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4618 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4619 * Makefile (tests): Add tst-cond22.
4620 * tst-cond22.c: New file.
4622 2006-09-05 Ulrich Drepper <drepper@redhat.com>
4625 * descr.h (struct pthread): Add parent_cancelhandling.
4626 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4627 cancelhandling value to child.
4628 * pthread_create.c (start_thread): If parent thread was canceled
4629 reset the SIGCANCEL mask.
4630 * Makefile (tests): Add tst-cancel25.
4631 * tst-cancel25.c: New file.
4633 2006-09-05 Jakub Jelinek <jakub@redhat.com>
4634 Ulrich Drepper <drepper@redhat.com>
4636 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4637 counterp if it is already zero.
4638 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4640 2006-03-04 Jakub Jelinek <jakub@redhat.com>
4641 Roland McGrath <roland@redhat.com>
4643 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4644 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4645 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4646 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4647 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4648 lll_robust_mutex_timedlock, lll_mutex_unlock,
4649 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4650 Add _L_*_ symbols around the subsection.
4651 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4652 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4654 2006-03-03 Jakub Jelinek <jakub@redhat.com>
4655 Roland McGrath <roland@redhat.com>
4657 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4658 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4659 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4660 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4661 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4662 lll_robust_mutex_timedlock, lll_mutex_unlock,
4663 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4664 Add _L_*_ symbols around the subsection.
4665 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4666 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4668 2006-08-31 Ulrich Drepper <drepper@redhat.com>
4670 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4671 change because it can disturb too much existing code. If real hard
4672 reader preference is needed we'll introduce another type.
4673 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4674 (pthread_rwlock_timedwrlock): Likewise.
4675 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4678 2006-08-30 Ulrich Drepper <drepper@redhat.com>
4680 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4682 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4683 (pthread_rwlock_timedwrlock): Likewise.
4684 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4687 2006-08-25 Jakub Jelinek <jakub@redhat.com>
4689 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4690 Only define ifdef SHARED.
4692 2006-08-23 Ulrich Drepper <drepper@redhat.com>
4694 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4695 (free_stacks): ...here.
4696 (__free_stack_cache): New function.
4697 * pthreadP.h: Declare __free_stack_cache.
4698 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4700 * init.c (pthread_functions): Initialize ptr_freeres.
4701 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4702 New freeres function.
4704 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4707 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4709 2006-08-20 Ulrich Drepper <drepper@redhat.com>
4711 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4712 _XOPEN_REALTIME_THREADS.
4714 2006-08-15 Jakub Jelinek <jakub@redhat.com>
4716 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4717 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4718 HAVE_CLOCK_GETTIME_VSYSCALL.
4719 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4721 2006-08-14 Jakub Jelinek <jakub@redhat.com>
4723 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4724 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4725 * descr.h (struct priority_protection_data): New type.
4726 (struct pthread): Add tpp field.
4727 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4728 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4729 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4730 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4732 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4733 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4734 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4735 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4737 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4739 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4740 * pthread_mutexattr_getprioceiling.c
4741 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4742 in the SCHED_FIFO priority range.
4743 * pthread_mutexattr_setprioceiling.c
4744 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4745 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4746 if mutex is not TPP. Ceiling is now in __data.__lock.
4747 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4748 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4749 is now in __data.__lock. Add locking.
4750 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4751 * Makefile (libpthread-routines): Add tpp.
4752 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4753 * tst-tpp.h: New file.
4754 * tst-mutexpp1.c: New file.
4755 * tst-mutexpp6.c: New file.
4756 * tst-mutexpp10.c: New file.
4757 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4758 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4760 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4763 * pthread_join.c (pthread_join): Account for self being canceled
4764 when checking for deadlocks.
4765 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4766 (tf1): Don't print anything after pthread_join returns, this would be
4767 another cancellation point.
4769 * tst-join6.c: New file.
4770 * Makefile (tests): Add tst-join6.
4772 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4775 * pthread_setspecific.c (__pthread_setspecific): Check
4776 out-of-range index before checking for unused key.
4778 * sysdeps/pthread/gai_misc.h: New file.
4780 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4782 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4783 file. Don't use sysctl.
4784 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4785 overwrite the file if this is likely not true.
4787 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4789 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4790 * Makefile (tests): Add tst-getpid3.
4791 * tst-getpid3.c: New file.
4793 2006-07-30 Roland McGrath <roland@redhat.com>
4795 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4797 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4798 (pause_not_cancel): New macro.
4799 (nanosleep_not_cancel): New macro.
4800 (sigsuspend_not_cancel): New macro.
4801 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4802 nanosleep_not_cancel macro from <not-cancel.h>.
4803 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4804 macro from <not-cancel.h>.
4806 2006-07-28 Ulrich Drepper <drepper@redhat.com>
4807 Jakub Jelinek <jakub@redhat.com>
4809 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4810 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4811 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4812 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4813 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4814 * pthread_mutex_lock.c: Likewise.
4815 * pthread_mutex_timedlock.c: Likewise.
4816 * pthread_mutex_trylock.c: Likewise.
4817 * pthread_mutex_unlock.c: Likewise.
4818 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4820 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4821 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4822 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4823 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4824 pthread-pi-defines.sym.
4825 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4826 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4827 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4828 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4829 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4830 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4831 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4832 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4833 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4834 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4835 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4836 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4837 * tst-mutex2.c: Likewise.
4838 * tst-mutex3.c: Likewise.
4839 * tst-mutex4.c: Likewise.
4840 * tst-mutex5.c: Likewise.
4841 * tst-mutex6.c: Likewise.
4842 * tst-mutex7.c: Likewise.
4843 * tst-mutex7a.c: Likewise.
4844 * tst-mutex8.c: Likewise.
4845 * tst-mutex9.c: Likewise.
4846 * tst-robust1.c: Likewise.
4847 * tst-robust7.c: Likewise.
4848 * tst-robust8.c: Likewise.
4849 * tst-mutexpi1.c: New file.
4850 * tst-mutexpi2.c: New file.
4851 * tst-mutexpi3.c: New file.
4852 * tst-mutexpi4.c: New file.
4853 * tst-mutexpi5.c: New file.
4854 * tst-mutexpi6.c: New file.
4855 * tst-mutexpi7.c: New file.
4856 * tst-mutexpi7a.c: New file.
4857 * tst-mutexpi8.c: New file.
4858 * tst-mutexpi9.c: New file.
4859 * tst-robust1.c: New file.
4860 * tst-robust2.c: New file.
4861 * tst-robust3.c: New file.
4862 * tst-robust4.c: New file.
4863 * tst-robust5.c: New file.
4864 * tst-robust6.c: New file.
4865 * tst-robust7.c: New file.
4866 * tst-robust8.c: New file.
4867 * Makefile (tests): Add the new tests.
4869 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4870 * pthread_mutex_destroy.c: Remove unneeded label.
4872 2006-07-01 Ulrich Drepper <drepper@redhat.com>
4874 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4875 computations to compile time.
4877 2006-06-04 Ulrich Drepper <drepper@redhat.com>
4879 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4881 2006-05-15 Ulrich Drepper <drepper@redhat.com>
4883 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4885 2006-05-11 Ulrich Drepper <drepper@redhat.com>
4887 * pthread_key_create.c (__pthread_key_create): Do away with
4888 __pthread_keys_lock.
4890 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4891 (__kernel_cpumask_size): Mark as hidden.
4892 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4894 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4895 * semaphoreP.h (__sem_mappings_lock): Likewise.
4897 2006-05-10 Ulrich Drepper <drepper@redhat.com>
4899 * pthread_atfork.c: Mark __dso_handle as hidden.
4901 2006-05-09 Ulrich Drepper <drepper@redhat.com>
4904 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4905 the reload problem. Change the one path in pthread_cancel_init
4906 which causes the problem. Force gcc to reload. Simplify callers.
4907 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4908 (_Unwind_GetBSP): Undo last patch.
4910 2006-05-07 Ulrich Drepper <drepper@redhat.com>
4912 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4913 function pointer is reloaded after pthread_cancel_init calls.
4916 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4917 pointers are reloaded after pthread_cancel_init calls.
4919 2006-05-01 Ulrich Drepper <drepper@redhat.com>
4921 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4924 2006-04-27 Ulrich Drepper <drepper@redhat.com>
4926 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4927 Allocate new object which is passed to timer_sigev_thread so that
4928 the timer can be deleted before the new thread is scheduled.
4930 2006-04-26 Roland McGrath <roland@redhat.com>
4932 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4934 2006-04-08 Ulrich Drepper <drepper@redhat.com>
4936 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4937 suffix for conditional jumps.
4938 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4939 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4940 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4941 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4942 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4943 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4945 * init.c (sigcancel_handler): Compare with correct PID even if the
4946 thread is in the middle of a fork call.
4947 (sighandler_setxid): Likewise.
4948 Reported by Suzuki K P <suzuki@in.ibm.com> .
4950 2006-04-07 Jakub Jelinek <jakub@redhat.com>
4952 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4954 2006-04-06 Ulrich Drepper <drepper@redhat.com>
4956 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4957 fails [Coverity CID 105].
4959 2006-04-05 Ulrich Drepper <drepper@redhat.com>
4961 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4963 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4966 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4967 Define __lll_rel_instr using lwsync.
4969 2006-03-27 Ulrich Drepper <drepper@redhat.com>
4971 * allocatestack.c (allocate_stack): Always initialize robust_head.
4972 * descr.h: Define struct robust_list_head.
4973 (struct pthread): Use robust_list_head in robust mutex list definition.
4974 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4975 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4976 (__pthread_initialize_minimal_internal): Register robust_list with
4978 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4979 Declare __set_robust_list_avail.
4980 * pthread_create.c (start_thread): Register robust_list of new thread.
4981 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4983 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4984 number of users, it's unreliable.
4985 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4986 set_robust_list syscall is available.
4987 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4988 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4989 Set robust_head.list_op_pending before trying to lock a robust mutex.
4990 * pthread_mutex_timedlock.c: Likewise.
4991 * pthread_mutex_trylock.c: Likewise.
4992 * pthread_mutex_unlock.c: Likewise for unlocking.
4993 * Makefile (tests): Add tst-robust8.
4994 * tst-robust8.c: New file.
4996 2006-03-08 Andreas Schwab <schwab@suse.de>
4998 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4999 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
5001 2006-03-05 Roland McGrath <roland@redhat.com>
5003 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
5004 and $config_os doesn't match *linux*.
5006 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
5008 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
5009 Use __syscall_error.
5010 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5011 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
5012 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
5013 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5014 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
5015 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
5017 2006-03-02 Ulrich Drepper <drepper@redhat.com>
5019 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
5021 2006-03-01 Ulrich Drepper <drepper@redhat.com>
5023 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
5024 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
5026 (__lll_robust_timedlock_wait): Likewise.
5027 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
5028 (__lll_robust_lock_wait): Likewise.
5029 (__lll_robust_timedlock_wait): Likewise.
5030 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
5031 (__lll_robust_lock_wait): Likewise.
5032 (__lll_robust_timedlock_wait): Likewise.
5034 2006-03-01 Jakub Jelinek <jakub@redhat.com>
5036 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
5037 lll_robust_mutex_trylock, lll_robust_mutex_lock,
5038 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5039 lll_robust_mutex_unlock): Define.
5040 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5042 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
5044 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
5045 instead of <clone.S>.
5047 2006-02-27 Jakub Jelinek <jakub@redhat.com>
5049 * Makefile (libpthread-routines): Add
5050 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
5051 and pthread_mutex_[sg]etprioceiling.
5052 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
5053 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
5054 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
5055 pthread_mutex_setprioceiling.
5056 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
5057 PTHREAD_PRIO_PROTECT): New enum values.
5058 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
5059 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
5060 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
5062 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
5063 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
5064 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
5066 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
5067 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
5068 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
5069 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
5070 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
5071 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
5072 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
5074 * pthread_mutex_getprioceiling.c: New file.
5075 * pthread_mutex_setprioceiling.c: New file.
5076 * pthread_mutexattr_getprioceiling.c: New file.
5077 * pthread_mutexattr_setprioceiling.c: New file.
5078 * pthread_mutexattr_getprotocol.c: New file.
5079 * pthread_mutexattr_setprotocol.c: New file.
5081 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5083 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
5085 2006-02-27 Roland McGrath <roland@redhat.com>
5087 * sysdeps/pthread/Subdirs: List nptl here too.
5088 * configure (libc_add_on_canonical): New variable.
5090 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
5092 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
5093 self to get main source tree's file.
5094 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
5095 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
5096 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
5097 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
5098 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
5099 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
5100 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
5101 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
5102 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
5103 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
5104 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
5105 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
5106 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
5108 * Makefile: Use $(sysdirs) in vpath directive.
5110 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
5111 (CPPFLAGS-timer_routines.c): Likewise.
5113 * Makeconfig (includes): Variable removed.
5115 2006-02-26 Roland McGrath <roland@redhat.com>
5117 * sysdeps/generic/pt-raise.c: Moved to ...
5118 * pt-raise.c: ... here.
5119 * sysdeps/generic/lowlevellock.h: Moved to ...
5120 * lowlevellock.h: ... here.
5122 2006-02-23 Roland McGrath <roland@redhat.com>
5124 * descr.h (struct pthread): Add final member `end_padding'.
5125 (PTHREAD_STRUCT_END_PADDING): Use it.
5127 2006-02-20 Roland McGrath <roland@redhat.com>
5129 * sysdeps/mips: Directory removed, saved in ports repository.
5130 * sysdeps/unix/sysv/linux/mips: Likewise.
5132 2006-02-18 Ulrich Drepper <drepper@redhat.com>
5134 * tst-robust1.c: Add second mutex to check that the mutex list is
5137 2006-02-17 Jakub Jelinek <jakub@redhat.com>
5139 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
5140 lll_robust_mutex_trylock, lll_robust_mutex_lock,
5141 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5142 lll_robust_mutex_unlock): New macros.
5143 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5144 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5145 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5146 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5147 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
5149 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5151 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
5153 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
5155 2006-02-17 Ulrich Drepper <drepper@redhat.com>
5157 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5158 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
5159 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
5160 (lll_robust_mutex_unlock): Likewise.
5162 2006-02-13 Jakub Jelinek <jakub@redhat.com>
5164 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
5165 Set robust_list.__next rather than robust_list.
5166 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5167 (__pthread_list_t): New typedef.
5168 (pthread_mutex_t): Replace __next and __prev fields with __list.
5169 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
5170 (__pthread_list_t): New typedef.
5171 (pthread_mutex_t): Replace __next and __prev fields with __list.
5172 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5173 (__pthread_list_t, __pthread_slist_t): New typedefs.
5174 (pthread_mutex_t): Replace __next and __prev fields with __list.
5175 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
5176 (__pthread_list_t, __pthread_slist_t): New typedefs.
5177 (pthread_mutex_t): Replace __next and __prev fields with __list.
5178 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
5179 (__pthread_list_t, __pthread_slist_t): New typedefs.
5180 (pthread_mutex_t): Replace __next and __prev fields with __list.
5181 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
5182 (__pthread_slist_t): New typedef.
5183 (pthread_mutex_t): Replace __next field with __list.
5185 2006-02-15 Ulrich Drepper <drepper@redhat.com>
5187 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
5188 PTHREAD_MUTEX_OWNERDEAD.
5189 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
5190 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
5191 * Makefile (libpthread-routines): Add lowlevelrobustlock.
5192 * pthread_create.c (start_thread): Very much simplify robust_list loop.
5193 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
5194 to PTHREAD_MUTEX_INCONSISTENT.
5195 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
5196 * pthread_mutex_lock.c: Reimplement robust mutex handling.
5197 * pthread_mutex_trylock.c: Likewise.
5198 * pthread_mutex_timedlock.c: Likewise.
5199 * pthread_mutex_unlock.c: Likewise.
5200 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5201 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5202 lowlevelrobustlock.sym.
5203 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
5204 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
5206 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5207 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
5208 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
5209 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
5210 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
5212 2006-02-12 Ulrich Drepper <drepper@redhat.com>
5214 * allocatestack.c (allocate_stack): Initialize robust_list.
5215 * init.c (__pthread_initialize_minimal_internal): Likewise.
5216 * descr.h (struct xid_command): Pretty printing.
5217 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
5218 robust_list. Adjust macros.
5219 * pthread_create.c (start_thread): Adjust robust_list handling.
5220 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
5221 but the owner for all robust mutex types.
5222 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5223 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
5224 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5225 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
5227 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
5228 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
5230 2006-02-08 Jakub Jelinek <jakub@redhat.com>
5232 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
5233 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
5235 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5237 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
5239 (lll_futex_timed_wait): Define.
5241 2006-01-19 Ulrich Drepper <drepper@redhat.com>
5243 * tst-cancel4.c: Test ppoll.
5245 2006-01-18 Andreas Jaeger <aj@suse.de>
5248 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
5249 (pthread_mutex_t): Follow changes for other archs. Based on patch
5250 by Jim Gifford <patches@jg555.com>.
5252 2006-01-13 Richard Henderson <rth@redhat.com>
5254 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
5256 2006-01-10 Roland McGrath <roland@redhat.com>
5258 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
5259 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5260 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5261 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5262 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5263 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5264 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5265 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5266 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5267 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5269 2006-01-09 Roland McGrath <roland@redhat.com>
5271 * tst-initializers1-c89.c: New file.
5272 * tst-initializers1-c99.c: New file.
5273 * tst-initializers1-gnu89.c: New file.
5274 * tst-initializers1-gnu99.c: New file.
5275 * Makefile (tests): Add them.
5276 (CFLAGS-tst-initializers1-c89.c): New variable.
5277 (CFLAGS-tst-initializers1-c99.c): New variable.
5278 (CFLAGS-tst-initializers1-gnu89.c): New variable.
5279 (CFLAGS-tst-initializers1-gnu99.c): New variable.
5281 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5282 Use __extension__ on anonymous union definition.
5283 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5284 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5285 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5286 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5287 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5289 2006-01-08 Jakub Jelinek <jakub@redhat.com>
5291 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5292 Don't give the union a name because it changes the mangled name.
5293 Instead name the struct for __data.
5294 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
5296 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
5299 2006-01-09 Jakub Jelinek <jakub@redhat.com>
5301 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
5302 stack bias to mc_ftp field.
5304 2006-01-07 Ulrich Drepper <drepper@redhat.com>
5306 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
5307 being too clever and reloading the futex value where it shouldn't.
5309 2006-01-06 Ulrich Drepper <drepper@redhat.com>
5311 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
5314 2006-01-06 Jakub Jelinek <jakub@redhat.com>
5316 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5319 2006-01-06 Ulrich Drepper <drepper@redhat.com>
5321 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
5322 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
5323 rename in tcbhead_t.
5325 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5326 Don't give the union a name because it changes the mangled name.
5327 Instead name the struct for __data.
5328 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5329 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5330 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5331 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5332 * pthread_create.c (start_thread): Adjust robust mutex free loop.
5333 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
5335 2006-01-05 Ulrich Drepper <drepper@redhat.com>
5337 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5339 (lll_futex_timed_wait): Define.
5340 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5341 * sysdeps/pthread/aio_misc.h: New file.
5343 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
5345 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
5347 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
5349 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5350 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
5351 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5353 2006-01-04 Ulrich Drepper <drepper@redhat.com>
5355 * tst-cancel24.cc: Use C headers instead of C++ headers.
5357 2006-01-03 Jakub Jelinek <jakub@redhat.com>
5359 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
5360 sparc-linux configured glibc.
5361 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
5362 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
5363 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
5364 atomic_compare_and_exchange_val_24_acq instead of
5365 atomic_compare_and_exchange_val_acq.
5366 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
5367 instead of atomic_exchange_rel.
5368 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
5369 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
5371 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
5373 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
5374 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
5375 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
5376 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
5377 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
5378 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
5380 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
5382 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
5383 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
5384 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
5386 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
5388 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
5390 2006-01-03 Ulrich Drepper <drepper@redhat.com>
5392 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
5395 2006-01-02 Jakub Jelinek <jakub@redhat.com>
5397 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
5398 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5399 THREAD_COPY_POINTER_GUARD): Define.
5400 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
5401 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
5403 2006-01-01 Ulrich Drepper <drepper@redhat.com>
5405 * version.c: Update copyright year.
5407 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5409 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
5410 .eh_frame section, use cfi_* directives.
5411 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5413 2005-12-30 Ulrich Drepper <drepper@redhat.com>
5415 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5418 2005-12-29 Ulrich Drepper <drepper@redhat.com>
5420 * sysdeps/pthread/sigaction.c: Removed.
5421 * sigaction.c: New file.
5422 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5424 2005-12-28 Ulrich Drepper <drepper@redhat.com>
5426 * Makefile (tests): Add tst-signal7.
5427 * tst-signal7.c: New file.
5429 2005-12-27 Roland McGrath <roland@redhat.com>
5431 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5432 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5433 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5434 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5435 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5436 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5437 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5438 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5439 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5440 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5441 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5443 2005-12-27 Jakub Jelinek <jakub@redhat.com>
5445 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5446 and __prev field to pthread_mutex_t.
5447 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5448 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5449 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5450 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5451 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5454 2005-12-26 Ulrich Drepper <drepper@redhat.com>
5456 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5457 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5458 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5459 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5460 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5461 and PTHREAD_MUTEXATTR_FLAG_BITS.
5462 * descr.h (struct pthread): Add robust_list field and define
5463 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5464 * pthread_mutexattr_getrobust.c: New file.
5465 * pthread_mutexattr_setrobust.c: New file.
5466 * pthread_mutex_consistent.c: New file.
5467 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5468 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5469 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5470 Adjust pthread_mutex_t initializers.
5471 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5472 field to pthread_mutex_t.
5473 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5474 and __prev field to pthread_mutex_t.
5475 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5476 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5477 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5478 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5479 * pthread_mutexattr_gettype.c: Likewise.
5480 * pthread_mutexattr_setpshared.c: Likewise.
5481 * pthread_mutexattr_settype.c: Likewise.
5482 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5483 Initialize mutex kind according to robust flag.
5484 * pthread_mutex_lock.c: Implement local robust mutex.
5485 * pthread_mutex_timedlock.c: Likewise.
5486 * pthread_mutex_trylock.c: Likewise.
5487 * pthread_mutex_unlock.c: Likewise.
5488 * pthread_create.c (start_thread): Mark robust mutexes which remained
5490 * tst-robust1.c: New file.
5491 * tst-robust2.c: New file.
5492 * tst-robust3.c: New file.
5493 * tst-robust4.c: New file.
5494 * tst-robust5.c: New file.
5495 * tst-robust6.c: New file.
5496 * tst-robust7.c: New file.
5497 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5498 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5499 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5500 tst-robust5, tst-robust6, and tst-robust7.
5502 * tst-typesizes.c: New file.
5503 * Makefile (tests): Add tst-typesizes.
5505 * tst-once3.c: More debug output.
5507 2005-12-24 Ulrich Drepper <drepper@redhat.com>
5509 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5510 missing after last change.
5512 * version.c: Update copyright year.
5514 2005-12-23 Ulrich Drepper <drepper@redhat.com>
5516 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5517 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5518 * pthread_mutex_trylock.c: Likewise.
5519 * pthread_mutex_timedlock.c: Likewise.
5520 * pthread_mutex_unlock.c: Likewise.
5522 2005-12-22 Roland McGrath <roland@redhat.com>
5524 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5525 so that #include_next's search location is not reset to the -I..
5526 directory where <nptl/...> can be found.
5528 2005-12-22 Ulrich Drepper <drepper@redhat.com>
5531 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5532 Fix unwind info. Remove useless branch prediction prefix.
5533 * tst-cancel24.cc: New file.
5534 * Makefile: Add rules to build and run tst-cancel24.
5536 2005-12-21 Roland McGrath <roland@redhat.com>
5538 * libc-cancellation.c: Use <> rather than "" #includes.
5539 * pt-cleanup.c: Likewise.
5540 * pthread_create.c: Likewise.
5541 * pthread_join.c: Likewise.
5542 * pthread_timedjoin.c: Likewise.
5543 * pthread_tryjoin.c: Likewise.
5544 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5545 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5546 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5547 * unwind.c: Likewise.
5549 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5551 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5552 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5553 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5554 THREAD_COPY_POINTER_GUARD): Define.
5556 2005-12-19 Jakub Jelinek <jakub@redhat.com>
5558 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5560 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5561 THREAD_COPY_POINTER_GUARD): Define.
5562 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5563 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5564 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5565 THREAD_COPY_POINTER_GUARD): Define.
5566 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5567 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5568 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5569 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5570 Use PTR_DEMANGLE for B0 if defined.
5572 2005-12-17 Ulrich Drepper <drepper@redhat.com>
5574 * pthread_create.c (__pthread_create_2_1): Use
5575 THREAD_COPY_POINTER_GUARD if available.
5576 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5577 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5578 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5579 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5580 * sysdeps/x86_64/tls.h: Likewise.
5582 2005-12-15 Roland McGrath <roland@redhat.com>
5584 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5586 2005-12-13 Ulrich Drepper <drepper@redhat.com>
5588 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5590 * errno-loc.c: New file.
5592 2005-12-12 Roland McGrath <roland@redhat.com>
5594 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5595 adjustments before choosing stack size. Update minimum stack size
5596 calculation to match allocate_stack change.
5598 2005-12-12 Ulrich Drepper <drepper@redhat.com>
5600 * allocatestack.c (allocate_stack): Don't demand that there is an
5601 additional full page available on the stack beside guard, TLS, the
5604 2005-11-24 Ulrich Drepper <drepper@redhat.com>
5606 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5607 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5609 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5610 compiling 32-bit code we must define __cleanup_fct_attribute.
5612 005-11-24 Jakub Jelinek <jakub@redhat.com>
5615 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5616 __attribute__ instead of __attribute.
5617 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5618 (__cleanup_fct_attribute): Likewise.
5620 2005-11-17 Jakub Jelinek <jakub@redhat.com>
5622 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5623 a write barrier before writing libgcc_s_getcfa.
5625 2005-11-06 Ulrich Drepper <drepper@redhat.com>
5627 * sysdeps/unix/sysv/linux/configure: Removed.
5629 2005-11-05 Ulrich Drepper <drepper@redhat.com>
5631 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5632 optional init_array/fini_array support.
5634 2005-10-24 Roland McGrath <roland@redhat.com>
5636 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5637 versioned_symbol use.
5639 2005-10-16 Roland McGrath <roland@redhat.com>
5641 * init.c (__pthread_initialize_minimal_internal): Even when using a
5642 compile-time default stack size, apply the minimum that allocate_stack
5643 will require, and round up to page size.
5645 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5647 * Makefile ($(test-modules)): Remove static pattern rule.
5649 2005-10-14 Jakub Jelinek <jakub@redhat.com>
5650 Ulrich Drepper <drepper@redhat.com>
5652 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5653 alignment in callback function.
5654 * Makefile: Add rules to build and run tst-align3.
5655 * tst-align3.c: New file.
5657 2005-10-03 Jakub Jelinek <jakub@redhat.com>
5659 * allocatestack.c (setxid_signal_thread): Add
5660 INTERNAL_SYSCALL_DECL (err).
5662 2005-10-02 Jakub Jelinek <jakub@redhat.com>
5664 * allocatestack.c (setxid_signal_thread): Need to use
5665 atomic_compare_and_exchange_bool_acq.
5667 2005-10-01 Ulrich Drepper <drepper@redhat.com>
5668 Jakub Jelinek <jakub@redhat.com>
5670 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5672 (struct pthread): Move specific_used field to avoid padding.
5673 Add setxid_futex field.
5674 * init.c (sighandler_setxid): Reset setxid flag and release the
5676 * allocatestack.c (setxid_signal_thread): New function. Broken
5677 out of the bodies of the two loops in __nptl_setxid. For undetached
5678 threads check whether they are exiting and if yes, don't send a signal.
5679 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5680 * pthread_create.c (start_thread): For undetached threads, check
5681 whether setxid bit is set. If yes, wait until signal has been
5684 * allocatestack.c (STACK_VARIABLES): Initialize them.
5685 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5687 2004-09-02 Jakub Jelinek <jakub@redhat.com>
5689 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5690 waiters, awake all waiters on the associated mutex.
5692 2005-09-22 Roland McGrath <roland@redhat.com>
5694 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5695 ../sysdeps/x86_64/hp-timing.h).
5697 2005-08-29 Jakub Jelinek <jakub@redhat.com>
5699 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5700 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5701 (lll_futex_wake_unlock): Define.
5702 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5703 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5704 (lll_futex_wake_unlock): Define.
5705 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5706 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5707 (lll_futex_wake_unlock): Define.
5708 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5709 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5710 (lll_futex_wake_unlock): Define.
5711 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5712 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5713 (lll_futex_wake_unlock): Define.
5714 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5715 lll_futex_wake_unlock.
5716 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5717 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5718 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5719 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5720 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5721 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5723 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5725 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5726 Fix typo in register name.
5728 2005-08-23 Ulrich Drepper <drepper@redhat.com>
5730 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5731 Use __sigfillset. Document that sigfillset does the right thing wrt
5734 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5737 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5738 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5739 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5740 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5741 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5742 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5744 * Makefile (tests): Add tst-initializers1.
5745 (CFLAGS-tst-initializers1.c): Set.
5746 * tst-initializers1.c: New test.
5748 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5750 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5751 Make sure __flags are located at offset 48 from the start of the
5754 2005-07-02 Roland McGrath <roland@redhat.com>
5756 * Makeconfig: Comment fix.
5758 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5760 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5761 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5762 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5763 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5764 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5765 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5766 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5767 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5768 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5769 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5771 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5773 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5774 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5775 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5777 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5778 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5779 field. Put in sysinfo field unconditionally.
5780 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5781 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5782 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5783 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5785 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5786 * pthread_create.c (__pthread_create_2_1): Use
5787 THREAD_COPY_STACK_GUARD macro.
5788 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5790 * tst-stackguard1.c: New file.
5791 * tst-stackguard1-static.c: New file.
5793 2005-06-14 Alan Modra <amodra@bigpond.net.au>
5795 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5796 Invoke CGOTSETUP and CGOTRESTORE.
5797 (CGOTSETUP, CGOTRESTORE): Define.
5799 2005-05-29 Richard Henderson <rth@redhat.com>
5801 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5802 (tf_write, tf_writev): Use it.
5803 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5806 2005-05-23 Jakub Jelinek <jakub@redhat.com>
5808 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5809 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5810 __librt_*_asynccancel@local.
5812 2005-05-17 Alan Modra <amodra@bigpond.net.au>
5814 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5815 all occurrences of JUMPTARGET. Instead append @local to labels.
5817 2005-05-20 Jakub Jelinek <jakub@redhat.com>
5819 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5820 size/alignment of struct pthread rather than tcbhead_t.
5821 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5823 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5825 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5828 2005-05-19 Richard Henderson <rth@redhat.com>
5830 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5831 __sync_val_compare_and_swap, not explicit _si variant.
5832 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5834 2005-05-03 Ulrich Drepper <drepper@redhat.com>
5837 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5839 2005-05-03 Jakub Jelinek <jakub@redhat.com>
5841 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5842 .eh_frame section, use cfi_* directives.
5844 2005-04-27 Jakub Jelinek <jakub@redhat.com>
5846 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5849 2005-04-27 Ulrich Drepper <drepper@redhat.com>
5852 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5855 2005-04-27 Roland McGrath <roland@redhat.com>
5857 * Makefile (tests): Remove tst-clock2.
5859 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5860 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5861 translating to the kernel clockid_t for our own process/thread clock.
5863 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5865 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5867 * old_pthread_cond_init.c: Include <errno.h>.
5868 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5869 process shared or uses clock other than CLOCK_REALTIME.
5870 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5872 2005-04-13 David S. Miller <davem@davemloft.net>
5874 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5875 * sysdeps/sparc/sparc64/clone.S: New file.
5877 2005-04-05 Jakub Jelinek <jakub@redhat.com>
5880 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5881 __inline instead of inline.
5882 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5884 2005-03-31 Jakub Jelinek <jakub@redhat.com>
5886 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5887 functionally equivalent, but shorter instructions.
5888 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5889 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5890 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5892 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5893 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5894 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5895 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5896 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5897 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5898 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5900 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5901 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5902 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5903 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5904 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5906 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5908 * sysdeps/mips/Makefile: New file.
5909 * sysdeps/mips/nptl-sysdep.S: New file.
5910 * sysdeps/mips/tcb-offsets.sym: New file.
5911 * sysdeps/mips/pthread_spin_lock.S: New file.
5912 * sysdeps/mips/pthread_spin_trylock.S: New file.
5913 * sysdeps/mips/pthreaddef.h: New file.
5914 * sysdeps/mips/tls.h: New file.
5915 * sysdeps/mips/jmpbuf-unwind.h: New file.
5916 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5917 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5918 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5919 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5920 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5921 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5922 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5923 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5924 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5925 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5927 2005-03-23 Ulrich Drepper <drepper@redhat.com>
5930 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5933 2005-03-10 Jakub Jelinek <jakub@redhat.com>
5935 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5937 2005-02-25 Roland McGrath <roland@redhat.com>
5939 * alloca_cutoff.c: Correct license text.
5940 * tst-unload.c: Likewise.
5941 * sysdeps/pthread/allocalim.h: Likewise.
5942 * sysdeps/pthread/pt-initfini.c: Likewise.
5943 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5944 * sysdeps/pthread/bits/sigthread.h: Likewise.
5945 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5946 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5948 2005-02-16 Roland McGrath <roland@redhat.com>
5950 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5951 Use unsigned int * for ptr_nthreads.
5953 2005-02-14 Alan Modra <amodra@bigpond.net.au>
5956 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5959 2005-02-07 Richard Henderson <rth@redhat.com>
5962 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5965 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
5967 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5968 order of arguments in invocation of atomic_add_zero.
5970 2005-01-26 Jakub Jelinek <jakub@redhat.com>
5973 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5974 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5975 at least gotntpoff relocation and addition.
5976 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5978 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5980 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5983 2005-01-06 Ulrich Drepper <drepper@redhat.com>
5985 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5986 entry for static tls deallocation fix.
5987 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5988 also contains information whether the memory pointed to is static
5990 * sysdeps/i386/tls.h: Likewise.
5991 * sysdeps/ia64/tls.h: Likewise.
5992 * sysdeps/powerpc/tls.h: Likewise.
5993 * sysdeps/s390/tls.h: Likewise.
5994 * sysdeps/sh/tls.h: Likewise.
5995 * sysdeps/sparc/tls.h: Likewise.
5996 * sysdeps/x86_64/tls.h: Likewise.
5998 2004-12-27 Ulrich Drepper <drepper@redhat.com>
6000 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
6002 2004-12-21 Jakub Jelinek <jakub@redhat.com>
6004 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
6006 * Makefile (tests): Add tst-align2.
6007 * tst-align2.c: New test.
6008 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
6009 -mpreferred-stack-boundary=4.
6011 2004-12-18 Roland McGrath <roland@redhat.com>
6013 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
6014 New file removed withdrawn for the moment.
6016 2004-12-17 Richard Henderson <rth@redhat.com>
6018 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
6019 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
6021 2004-12-16 Ulrich Drepper <drepper@redhat.com>
6023 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
6024 Increased PTHREAD_STACK_MIN.
6026 * tst-context1.c (stacks): Use bigger stack size.
6028 2004-12-16 Jakub Jelinek <jakub@redhat.com>
6030 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
6031 * sysdeps/sparc/tcb-offsets.sym: Add TID.
6033 2004-12-15 Jakub Jelinek <jakub@redhat.com>
6035 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
6036 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
6037 * sysdeps/s390/tcb-offsets.sym (TID): Add.
6039 2004-12-15 Ulrich Drepper <drepper@redhat.com>
6041 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
6043 2004-12-14 Ulrich Drepper <drepper@redhat.com>
6045 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
6046 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
6048 * tst-getpid1.c: If child crashes, report this first. Print which
6051 2004-12-09 Ulrich Drepper <drepper@redhat.com>
6053 * init.c (__pthread_initialize_minimal_internal): Also unblock
6056 2004-12-01 Jakub Jelinek <jakub@redhat.com>
6058 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
6059 _POSIX_THREAD_CPUTIME): Define to 0.
6060 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
6061 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
6062 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
6063 __timer_signal_thread_tclk): Remove.
6064 (init_module): Remove their initialization.
6065 (thread_cleanup): Remove their cleanup assertions.
6066 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
6067 __timer_signal_thread_tclk): Remove.
6068 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
6069 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
6070 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
6072 2004-12-07 Jakub Jelinek <jakub@redhat.com>
6074 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
6075 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
6077 * Makefile (tests): Add tst-getpid2.
6078 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
6079 (do_test): Use it. Use __clone2 instead of clone on ia64.
6080 * tst-getpid2.c: New test.
6082 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6084 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
6086 2004-12-04 Ulrich Drepper <drepper@redhat.com>
6088 * Makefile (tests): Add tst-getpid1.
6089 * tst-getpid1.c: New file.
6090 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
6091 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
6093 2004-12-02 Roland McGrath <roland@redhat.com>
6095 * Makefile (libpthread-nonshared): Variable removed.
6096 ($(objpfx)libpthread_nonshared.a): Target removed.
6097 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
6098 These are now handled by generic magic from
6099 libpthread-static-only-routines being set.
6101 2004-11-27 Ulrich Drepper <drepper@redhat.com>
6103 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
6104 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
6105 _POSIX_THREAD_PRIO_PROTECT): Define.
6106 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6107 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6108 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6110 2004-11-26 Jakub Jelinek <jakub@redhat.com>
6112 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
6113 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
6114 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
6115 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
6116 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6117 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6118 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6120 2004-11-24 Ulrich Drepper <drepper@redhat.com>
6122 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
6124 * Makefile (libpthread-routines): Add pthread_setschedprio.
6125 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
6126 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
6127 * pthread_setschedprio.c: New file.
6129 2004-11-20 Jakub Jelinek <jakub@redhat.com>
6131 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
6132 * pthread_cancel.c (pthread_create): Likewise.
6134 * Makefile (libpthread-routines): Add vars.
6135 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
6136 * init.c (__default_stacksize, __is_smp): Remove.
6138 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
6139 and define a wrapper macro.
6140 (PTHREAD_STATIC_FN_REQUIRE): Define.
6141 * allocatestack.c (__find_thread_by_id): Undefine.
6142 * pthread_create (__pthread_keys): Remove.
6143 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
6144 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
6145 PTHREAD_STATIC_FN_REQUIRE.
6147 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6149 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
6150 parameter to REGISTER macro.
6152 2004-11-17 Roland McGrath <roland@redhat.com>
6154 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
6155 Make sure SIGCANCEL is blocked as well.
6157 2004-11-10 Jakub Jelinek <jakub@redhat.com>
6159 * sysdeps/pthread/setxid.h: New file.
6160 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
6161 (struct xid_command): Add forward decl.
6162 (struct pthread_functions): Change return type of __nptl_setxid hook
6164 * pthreadP.h (__nptl_setxid): Change return type to int.
6165 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
6166 calling thread, return its return value and set errno on failure.
6167 * descr.h (struct xid_command): Change id type to long array.
6169 * Makefile: Add rules to build and test tst-setuid1 and
6171 * tst-setuid1.c: New test.
6172 * tst-setuid1-static.c: New test.
6174 2004-11-10 Jakub Jelinek <jakub@redhat.com>
6176 * Makefile (tests): Add tst-exit3.
6177 * tst-exit3.c: New test.
6179 2004-11-09 Ulrich Drepper <drepper@redhat.com>
6181 * Makefile (tests): Add tst-exit2.
6182 * tst-exit2.c: New file.
6184 2004-11-09 Roland McGrath <roland@redhat.com>
6187 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
6188 here, before calling clone.
6189 * pthread_create.c (start_thread): Don't do it here.
6191 2004-11-02 Jakub Jelinek <jakub@redhat.com>
6193 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
6195 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6197 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6198 Set ETIMEDOUT to errno when time is up. Tweak to avoid
6201 2004-10-28 Jakub Jelinek <jakub@redhat.com>
6203 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
6204 if sched_priority is not between minprio and maxprio.
6206 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6208 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6209 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
6211 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6212 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
6214 2004-10-24 Ulrich Drepper <drepper@redhat.com>
6216 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
6217 not-cancelable I/O functions.
6219 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6221 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6222 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6223 make sure 2 is stored in the futex and we looked at the old value.
6224 Fix a few other problems to return the correct value.
6226 2004-10-14 Richard Henderson <rth@redhat.com>
6228 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
6231 2004-10-06 Jakub Jelinek <jakub@redhat.com>
6233 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
6234 of pthread-functions.h and pthreaddef.h.
6235 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
6237 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6238 Change __data.__nwaiters from int to unsigned int.
6240 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
6241 sysconf (_SC_THREAD_CPUTIME) returns negative value.
6243 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
6246 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
6247 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
6249 2004-10-06 Ulrich Drepper <drepper@redhat.com>
6251 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
6252 test fails, remove message queue.
6253 (tf_msgsnd): Likewise.
6255 2004-10-05 Jakub Jelinek <jakub@redhat.com>
6257 * tst-clock1.c: Change #ifdef to #if defined.
6258 * tst-clock2.c: Likewise.
6259 * tst-cond11.c: Likewise.
6261 * sysdeps/pthread/timer_create.c (timer_create): Use
6262 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
6263 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
6266 2004-10-05 Jakub Jelinek <jakub@redhat.com>
6268 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
6269 _POSIX_THREAD_CPUTIME): Define to 0.
6271 2004-10-04 Ulrich Drepper <drepper@redhat.com>
6273 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
6274 and _POSIX_THREAD_CPUTIME to zero.
6275 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6276 * tst-barrier2.c: Fix testing for POSIX feature.
6277 * tst-clock1.c: Likewise.
6278 * tst-clock2.c: Likewise.
6279 * tst-cond11.c: Likewise.
6280 * tst-cond4.c: Likewise.
6281 * tst-cond6.c: Likewise.
6282 * tst-flock2.c: Likewise.
6283 * tst-mutex4.c: Likewise.
6284 * tst-mutex9.c: Likewise.
6285 * tst-rwlock12.c: Likewise.
6286 * tst-rwlock4.c: Likewise.
6287 * tst-signal1.c: Likewise.
6288 * tst-spin2.c: Likewise.
6289 * sysdeps/pthread/posix-timer.h: Likewise.
6290 * sysdeps/pthread/timer_create.c: Likewise.
6291 * sysdeps/pthread/timer_routines.c: Likewise.
6293 2004-10-01 Ulrich Drepper <drepper@redhat.com>
6295 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6296 (__lll_mutex_timedlock_wait): Address futex correctly.
6298 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6299 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6300 make sure 2 is stored in the futex and we looked at the old value.
6301 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6302 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
6303 which might very well made the code not working at all before.
6306 2004-09-28 Ulrich Drepper <drepper@redhat.com>
6308 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6309 allow SIGSETXID to be sent.
6310 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
6311 for SIGSETXID to be defined.
6312 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
6313 SIGSETXID cannot be blocked.
6315 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6316 Add __extension__ to long long types.
6317 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6318 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6319 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6320 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6321 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6322 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6323 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6325 2004-09-25 Ulrich Drepper <drepper@redhat.com>
6327 * descr.h (struct pthread): Add stopped_start field.
6328 * sysdeps/pthread/createthread.c (create_thread): Set
6329 start_stopped flag in descriptor for new thread appropriately.
6330 * pthread_create.c (start_thread): Only take lock to be stopped on
6331 startup if stopped_start flag says so.
6333 2004-09-24 Ulrich Drepper <drepper@redhat.com>
6335 * pthread_create.c (__pthread_create_2_1): Remember whether thread
6336 is created detached and if yes, do not try to free the stack in case
6337 the thread creation failed.
6338 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
6339 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
6340 case there has been no error. [BZ #405]
6342 * pthread_create.c (start_thread): Don't wait for scheduler data
6343 etc to be set at the beginning of the function. The cancellation
6344 infrastructure must have been set up. And enable async
6345 cancellation before potentially going to sleep. [BZ #401]
6347 2004-09-20 Ulrich Drepper <drepper@redhat.com>
6349 * Versions: Remove exports for pthread_set*id_np functions.
6350 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
6352 * Makefile: Don't build pthread_set*id code for now.
6354 2004-09-19 Ulrich Drepper <drepper@redhat.com>
6356 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
6358 * allocatestack.c (__nptl_setxid): New function.
6359 * descr.h (struct xid_command): Define type.
6360 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
6361 (sighandler_setxid): New function.
6362 (__pthread_initialize_minimal): Register sighandler_setxid for
6364 * pt-allocrtsig.c: Update comment.
6365 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
6366 Declare __nptl_setxid.
6367 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
6368 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
6369 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6370 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6371 and pthread_setresuid_np.
6372 * pthread_setgid_np.c: New file.
6373 * pthread_setuid_np.c: New file.
6374 * pthread_setegid_np.c: New file.
6375 * pthread_seteuid_np.c: New file.
6376 * pthread_setregid_np.c: New file.
6377 * pthread_setreuid_np.c: New file.
6378 * pthread_setresgid_np.c: New file.
6379 * pthread_setresuid_np.c: New file.
6380 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
6381 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6382 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6383 and pthread_setresuid_np.
6384 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
6385 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
6386 pthread_setregid, and pthread_setresgid.
6388 2004-09-18 Ulrich Drepper <drepper@redhat.com>
6390 * allocatestack.c (allocate_stack): Return EAGAIN instead of
6391 ENOMEM when out of memory.
6393 2004-09-10 Roland McGrath <roland@redhat.com>
6396 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
6397 code, since we don't try to use the broken CLONE_STOPPED any more.
6398 * pthread_create.c (start_thread): Likewise.
6400 2004-09-15 Richard Henderson <rth@redhat.com>
6402 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
6404 2004-09-01 David Mosberger <davidm@hpl.hp.com>
6406 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
6407 (__libc_unwind_longjmp): Delete macro and declare as function.
6408 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
6409 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
6411 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
6412 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6413 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6415 2004-09-12 Ulrich Drepper <drepper@redhat.com>
6417 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6419 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6420 types also for __USE_XOPEN2K.
6421 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6422 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6423 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6424 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6425 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6426 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6427 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6430 2004-09-08 Ulrich Drepper <drepper@redhat.com>
6432 * sysdeps/pthread/pthread.h
6433 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6434 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6435 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6436 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6439 2004-09-07 Ulrich Drepper <drepper@redhat.com>
6441 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6442 PSEUDO to be used with . prefix.
6444 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6445 Use atomic_increment instead of atomic_exchange_and_add.
6446 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6448 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6450 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6453 * allocatestack.c (allocate_stack): Use atomic_increment_val
6454 instead of atomic_exchange_and_add.
6455 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6456 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6458 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6461 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6462 the initialization function might throw.
6464 2005-09-05 Richard Henderson <rth@redhat.com>
6466 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6467 Move definition inside libpthread, libc, librt check. Provide
6468 definition for rtld.
6470 2004-09-02 Ulrich Drepper <drepper@redhat.com>
6472 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6473 * sysdeps/i386/jmpbuf-unwind.h: Likewise
6474 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6475 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6476 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6477 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6478 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6479 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6482 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6483 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6484 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6486 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6487 Decrement __nwaiters. If pthread_cond_destroy has been called and
6488 this is the last waiter, signal pthread_cond_destroy caller and
6489 avoid using the pthread_cond_t structure after unlock.
6490 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6491 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6492 Read clock type from the least significant bits of __nwaiters instead
6494 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6495 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6497 2004-08-31 Jakub Jelinek <jakub@redhat.com>
6500 * Makefile (tests): Add tst-cond20 and tst-cond21.
6501 * tst-cond20.c: New test.
6502 * tst-cond21.c: New test.
6503 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6504 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6506 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6508 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6509 (pthread_cond_t): Likewise.
6510 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6512 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6514 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6516 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6517 (cond_nwaiters): New.
6519 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6520 if there are waiters not signalled yet.
6521 Wait until all already signalled waiters wake up.
6522 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6523 __nwaiters. If pthread_cond_destroy has been called and this is the
6524 last waiter, signal pthread_cond_destroy caller and avoid using
6525 the pthread_cond_t structure after unlock.
6526 (__pthread_cond_wait): Increment __nwaiters in the beginning,
6527 decrement it when leaving. If pthread_cond_destroy has been called
6528 and this is the last waiter, signal pthread_cond_destroy caller.
6529 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6530 Likewise. Read clock type from the least significant bits of
6531 __nwaiters instead of __clock.
6532 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6533 whether clock ID can be encoded in COND_CLOCK_BITS bits.
6534 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6535 clock type just from the last COND_CLOCK_BITS bits of value.
6536 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6537 instead of __clock, just from second bit of condattr's value.
6539 2004-08-30 Jakub Jelinek <jakub@redhat.com>
6541 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6542 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
6544 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6546 2004-08-15 Roland McGrath <roland@frob.com>
6548 * pthread_atfork.c: Update copyright terms including special exception
6549 for these trivial files, which are statically linked into executables
6550 that use dynamic linking for the significant library code.
6552 2004-08-09 Jakub Jelinek <jakub@redhat.com>
6554 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6555 pthread_rwlock_rdlock.
6556 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6557 Decrease __nr_readers_queued after reacquiring lock.
6558 * sysdeps/pthread/pthread_rwlock_timedrdlock
6559 (pthread_rwlock_timedrdlock): Likewise.
6560 Reported by Bob Cook <bobcook47@hotmail.com>.
6562 2004-08-11 Jakub Jelinek <jakub@redhat.com>
6564 * tst-rwlock14.c (tf): Read main thread handle from *ARG
6565 before pthread_barrier_wait.
6567 2004-08-07 Ulrich Drepper <drepper@redhat.com>
6569 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6570 Remove unnecessary exception handling data.
6572 2004-07-23 Jakub Jelinek <jakub@redhat.com>
6575 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6576 instead of clockid_t.
6578 2004-07-21 Roland McGrath <roland@redhat.com>
6580 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6582 2004-07-19 Roland McGrath <roland@redhat.com>
6584 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6586 2004-07-02 Roland McGrath <roland@redhat.com>
6588 * configure: Don't exit.
6590 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6592 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6593 (__pthread_cond_timedwait): Check for invalid nanosecond in
6596 2004-07-07 Ulrich Drepper <drepper@redhat.com>
6598 * Makefile: Add rules to build and run tst-fini1.
6599 * tst-fini1.c: New file.
6600 * tst-fini1mod.c: New file.
6602 2004-07-05 Ulrich Drepper <drepper@redhat.com>
6604 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6605 if no cancellation support is needed.
6606 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6607 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6608 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6609 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6610 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6611 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6612 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6613 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6614 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6616 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6617 only if not already defined.
6619 2004-07-05 Jakub Jelinek <jakub@redhat.com>
6621 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6622 constraint "m" instead of "0" for futex.
6624 * shlib-versions: Add powerpc64-.*-linux.*.
6626 2004-07-04 Jakub Jelinek <jakub@redhat.com>
6628 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6629 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6631 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6632 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6635 2004-06-29 Roland McGrath <roland@redhat.com>
6637 * Banner: NPTL no longer has its own version number.
6638 * Makefile (nptl-version): Variable removed.
6639 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6640 using $(version), the glibc version number.
6642 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6644 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6645 Fix branch offset for a PLT entry.
6646 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6648 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6650 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6652 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6655 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6657 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6660 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6662 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6663 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6665 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6666 (pthread_rwlock_timedrdlock): Likewise.
6668 2004-06-22 Jakub Jelinek <jakub@redhat.com>
6670 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6671 Set __r7 to val, not mutex.
6673 2004-06-27 Ulrich Drepper <drepper@redhat.com>
6675 * Makefile: Add rules to build tst-rwlock14.
6676 * tst-rwlock14.c: New file.
6678 2004-06-24 Boris Hu <boris.hu@intel.com>
6680 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6682 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6684 2004-06-19 Andreas Jaeger <aj@suse.de>
6686 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6687 assembler in last patch.
6689 2004-06-17 Ulrich Drepper <drepper@redhat.com>
6691 * sysdeps/pthread/pthread_cond_timedwait.c
6692 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6693 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6694 (__pthread_cond_timedwait): Check for invalid nanosecond in
6696 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6697 * tst-cond19.c: New file.
6698 * Makefile: Add rules to build and run tst-cond19.
6700 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6702 * tst-context1.c (GUARD_PATTERN): Defined.
6703 (tst_context_t): Define struct containing ucontext_t & guard words.
6704 (ctx): Declare as an array of tst_context_t.
6705 (fct): Verify uc_link & guard words are still valid.
6706 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6708 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6710 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6711 Add __data.__futex field, reshuffle __data.__clock.
6712 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6713 (__pthread_cond_signal): Increment __futex at the same time as
6714 __wakeup_seq or __total_seq. Pass address of __futex instead of
6715 address of low 32-bits of __wakeup_seq to futex syscall.
6716 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6717 (__pthread_cond_wait): Likewise. Pass __futex value from before
6718 releasing internal lock to FUTEX_WAIT.
6719 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6720 (__pthread_cond_timedwait): Likewise.
6721 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6722 (FUTEX_CMP_REQUEUE): Define.
6723 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6724 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6725 Pass __futex value from before the unlock and __futex address instead
6726 of address of low 32-bits of __wakeup_seq to futex syscall.
6727 Fallback to FUTEX_WAKE all on any errors.
6729 2004-06-08 Jakub Jelinek <jakub@redhat.com>
6731 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6733 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6734 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6735 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6736 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6737 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6739 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6741 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6742 Add memory clobber to inline assembly.
6743 (__lll_mutex_trylock): Likewise.
6744 (__lll_mutex_cond_trylock): Likewise.
6746 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6748 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6749 Pass val argument as 6th system call argument in %r7.
6751 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6753 * Makefile (tests): Add tst-cond16.
6754 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6755 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6756 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6757 Add __data.__futex field, reshuffle __data.__clock.
6758 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6759 (__pthread_cond_signal): Increment __futex at the same time as
6760 __wakeup_seq or __total_seq. Pass address of __futex instead of
6761 address of low 32-bits of __wakeup_seq to futex syscall.
6762 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6763 (__pthread_cond_wait): Likewise. Pass __futex value from before
6764 releasing internal lock to FUTEX_WAIT.
6765 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6766 (__pthread_cond_timedwait): Likewise.
6767 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6768 (FUTEX_CMP_REQUEUE): Define.
6769 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6770 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6771 Pass __futex value from before the unlock and __futex address instead
6772 of address of low 32-bits of __wakeup_seq to futex syscall.
6773 Fallback to FUTEX_WAKE all on any errors.
6774 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6776 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6777 internally. Return non-zero if error, zero if success.
6778 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6779 Add __data.__futex field, reshuffle __data.__clock.
6780 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6782 (lll_futex_requeue): Add val argument, return 1 unconditionally
6784 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6785 Add __data.__futex field, reshuffle __data.__clock.
6786 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6788 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6789 internally. Return non-zero if error, zero if success.
6790 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6791 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6792 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6794 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6795 internally. Return non-zero if error, zero if success.
6796 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6797 Add __data.__futex field, reshuffle __data.__clock.
6798 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6800 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6801 internally. Return non-zero if error, zero if success.
6802 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6803 Add __data.__futex field, reshuffle __data.__clock.
6804 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6805 Add __data.__futex field, reshuffle __data.__clock.
6806 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6807 Increment __futex at the same time as __wakeup_seq or __total_seq.
6808 Pass address of __futex instead of address of low 32-bits of
6809 __wakeup_seq to futex syscall.
6810 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6811 Pass __futex value from before releasing internal lock
6813 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6814 Likewise. Avoid unnecessary shadowing of variables.
6815 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6816 Set __futex to 2 * __total_seq. Pass __futex value from before the
6817 unlock and __futex address instead of address of low 32-bits of
6818 __wakeup_seq to futex_requeue macro, adjust for new return value
6820 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6821 (__pthread_cond_signal): Increment __futex at the same time as
6822 __wakeup_seq or __total_seq. Pass address of __futex instead of
6823 address of low 32-bits of __wakeup_seq to futex syscall.
6824 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6825 (__pthread_cond_wait): Likewise. Pass __futex value from before
6826 releasing internal lock to FUTEX_WAIT.
6827 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6828 (__pthread_cond_timedwait): Likewise.
6829 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6830 (FUTEX_CMP_REQUEUE): Define.
6831 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6832 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6833 Pass __futex value from before the unlock and __futex address instead
6834 of address of low 32-bits of __wakeup_seq to futex syscall.
6835 Fallback to FUTEX_WAKE all on any errors.
6837 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6839 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6840 Add nop to align the end of critical section.
6841 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6843 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6845 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6846 Add __broadcast_seq field.
6847 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6848 all waiters as woken with woken_seq and bump broadcast counter.
6849 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6850 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6851 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6852 Comment typo fixes. Avoid returning -ETIMEDOUT.
6854 2004-06-01 Ulrich Drepper <drepper@redhat.com>
6856 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6857 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6858 Reported by Kaz Kojima.
6860 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6862 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6864 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6866 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6867 __broadcast_seq with bc_seq after acquiring internal lock instead of
6870 2004-05-18 Jakub Jelinek <jakub@redhat.com>
6872 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6874 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6875 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6876 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6877 (pthread_cond_t): Add __data.__broadcast_seq field.
6878 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6879 (FRAME_SIZE): Define.
6880 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6882 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6884 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6886 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6887 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6890 2004-05-18 Ulrich Drepper <drepper@redhat.com>
6892 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6893 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6894 Add __broadcast_seq field.
6895 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6896 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6897 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6898 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6899 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6900 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6901 all waiters as woken with woken_seq and bump broadcast counter.
6902 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6903 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6904 __broadcast_seq field.
6905 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6906 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6907 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6908 * pthread_cond_init.c: Initialize __broadcast_seq field.
6909 * Makefile (tests): Add tst-cond17 and tst-cond18.
6910 Add .NOTPARALLEL goal.
6911 * tst-cond16.c: New file. From Jakub.
6912 * tst-cond17.c: New file. From Jakub.
6913 * tst-cond18.c: New file. From Jakub.
6915 2004-05-16 Ulrich Drepper <drepper@redhat.com>
6917 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6920 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6921 Parametrize frame size. Correct some unwind info.
6922 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6924 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6926 * tst-stack3.c: Note testing functionality beyond POSIX.
6928 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6930 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6931 Change conditional from ifdef to if.
6933 2004-04-23 Jakub Jelinek <jakub@redhat.com>
6935 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6936 SYSDEP_CANCEL_ERROR): Define.
6939 2004-05-01 Jakub Jelinek <jakub@redhat.com>
6941 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6943 2004-04-20 Jakub Jelinek <jakub@redhat.com>
6945 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6947 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6949 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6950 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6951 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6952 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6954 2004-04-19 Ulrich Drepper <drepper@redhat.com>
6956 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6957 thread has all signals blocked.
6959 2004-04-18 Andreas Jaeger <aj@suse.de>
6961 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6962 (SEM_VALUE_MAX): Add missing brace.
6964 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6966 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6968 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6969 * sysdeps/pthread/tst-mqueue8x.c: New test.
6970 * tst-cancel4.c: Update comment about message queues.
6972 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6973 return it_value { 0, 0 }.
6974 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6976 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6977 assertion for SIGEV_NONE.
6978 (thread_attr_compare): Compare all attributes, not just a partial
6981 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6983 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6985 2004-04-17 Ulrich Drepper <drepper@redhat.com>
6987 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6988 Just use a plain number.
6989 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6990 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6991 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6992 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6993 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6994 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6995 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6997 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6999 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
7001 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7003 2004-04-15 Jakub Jelinek <jakub@redhat.com>
7005 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
7006 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
7007 of calling sigwaitinfo.
7009 2004-04-16 Ulrich Drepper <drepper@redhat.com>
7011 * allocatestack.c (allocate_stack): Set reported_guardsize
7013 * pthread_getattr_np.c (pthread_getattr_np): Use
7014 reported_guardsize instead of guardsize.
7015 * descr.h (struct pthread): Add reported_guardsize field.
7017 2004-04-13 Jakub Jelinek <jakub@redhat.com>
7019 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
7021 2004-04-12 Ulrich Drepper <drepper@redhat.com>
7023 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
7025 2004-04-08 Jakub Jelinek <jakub@redhat.com>
7027 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
7028 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
7029 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
7030 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
7031 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
7033 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
7034 (_POSIX_MESSAGE_PASSING): Define.
7035 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
7036 (_POSIX_MESSAGE_PASSING): Define.
7037 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
7038 (_POSIX_MESSAGE_PASSING): Define.
7040 2004-04-04 Ulrich Drepper <drepper@redhat.com>
7042 * tst-context1.c (fct): Check whether correct stack is used.
7044 2004-04-03 Ulrich Drepper <drepper@redhat.com>
7046 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
7047 matching constraints for asm mem parameters.
7049 * tst-clock2.c (tf): Don't define unless needed.
7051 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
7053 * Makefile (link-libc-static): Use $(static-gnulib) instead of
7056 2004-03-30 Ulrich Drepper <drepper@redhat.com>
7058 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
7059 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
7060 * pthreadP.h: Declare __nptl_deallocate_tsd.
7061 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
7064 * Makefile (tests): Add tst-tsd5.
7065 * tst-tsd5.c: New file.
7067 2004-03-29 Ulrich Drepper <drepper@redhat.com>
7069 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7070 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
7071 is SHLIB_COMPAT check.
7072 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7073 (__pthread_attr_getaffinity_old): Likewise.
7074 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7075 (__pthread_getaffinity_old): Likewise.
7076 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7077 (__pthread_setaffinity_old): Likewise.
7079 2004-03-26 Ulrich Drepper <drepper@redhat.com>
7081 * allocatestack.c (_make_stacks_executable): Call
7082 _dl_make_stack_executable first.
7084 2004-03-24 Roland McGrath <roland@redhat.com>
7086 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
7087 constraint instead of "0".
7089 2004-03-24 Ulrich Drepper <drepper@redhat.com>
7091 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7092 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
7094 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
7095 code to avoid warning.
7097 2004-03-24 Andreas Jaeger <aj@suse.de>
7099 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7100 (__pthread_attr_setaffinity_old): Remove const.
7102 2004-03-23 Ulrich Drepper <drepper@redhat.com>
7104 * sysdeps/unix/sysv/linux/smp.h: New file.
7105 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
7106 * init.c: Define __is_smp.
7107 (__pthread_initialize_minimal_internal): Call is_smp_system to
7108 initialize __is_smp.
7109 * pthreadP.h: Declare __is_smp.
7110 Define MAX_ADAPTIVE_COUNT is necessary.
7111 * pthread_mutex_init.c: Add comment regarding __spins field.
7112 * pthread_mutex_lock.c: Implement adaptive mutex type.
7113 * pthread_mutex_timedlock.c: Likewise.
7114 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
7115 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
7117 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7118 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7119 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7120 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7121 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7122 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7123 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7124 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
7125 lll_mutex_cond_trylock.
7126 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7127 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7128 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7129 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7130 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7131 Define BUSY_WAIT_NOP.
7132 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7133 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7135 * tst-mutex5.c: Add support for testing adaptive mutexes.
7136 * tst-mutex7.c: Likewise.
7137 * tst-mutex5a.c: New file.
7138 * tst-mutex7a.c: New file.
7139 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
7141 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7142 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
7143 vgettimeofday call might destroy the content.
7145 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
7148 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7149 No need to restrict type of ret. Make it int. Add comment.
7151 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7152 Remove unnecessary setne instruction.
7154 2004-03-22 Jakub Jelinek <jakub@redhat.com>
7156 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7157 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
7158 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
7159 If realloc fails, break out of the loop.
7161 2004-03-20 Andreas Jaeger <aj@suse.de>
7163 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7164 (__pthread_setaffinity_old): Fix interface.
7165 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7166 (__pthread_getaffinity_old): Likewise.
7168 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7169 (__pthread_setaffinity_new): Remove duplicate declaration.
7171 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7173 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
7174 the return value to a safe register.
7175 (CDISABLE): Set the function argument correctly.
7177 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7179 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
7180 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
7181 Rewrite so that only one locked memory operation per round is needed.
7182 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
7183 (pthread_barrier_wait): After wakeup, release lock only when the
7184 last thread stopped using the barrier object.
7185 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
7186 (__pthread_cond_wait): Don't store mutex address if the current
7187 value is ~0l. Add correct cleanup support and unwind info.
7188 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7189 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
7190 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
7191 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
7192 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
7193 Add correct cleanup support and unwind info.
7194 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
7195 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
7196 information for syscall wrappers.
7198 2004-03-18 Ulrich Drepper <drepper@redhat.com>
7200 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7201 cpusetsize field, remove next.
7202 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
7203 parameter for size of the CPU set.
7204 (pthread_setaffinity_np): Likewise.
7205 (pthread_attr_getaffinity_np): Likewise.
7206 (pthread_attr_setaffinity_np): Likewise.
7207 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
7208 interface change, keep compatibility code.
7209 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
7210 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
7211 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
7212 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
7213 __pthread_getaffinity_np.
7214 * Versions: Add version for changed interfaces.
7215 * tst-attr3.c: Adjust test for interface change.
7216 * pthread_getattr_np.c: Query the kernel about the affinity mask with
7217 increasing buffer sizes.
7218 * pthread_attr_destroy.c: Remove unused list handling.
7219 * pthread_attr_init.c: Likewise.
7221 2004-03-17 Roland McGrath <roland@redhat.com>
7223 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
7224 first argument to clock_getres so we ever enable kernel timers.
7226 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
7228 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
7230 2004-03-12 Richard Henderson <rth@redhat.com>
7232 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
7233 oldvalue from CENABLE to CDISABLE.
7235 2004-03-12 Ulrich Drepper <drepper@redhat.com>
7237 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
7238 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
7239 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
7240 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
7242 2004-03-11 Richard Henderson <rth@redhat.com>
7244 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
7245 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
7246 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
7248 2004-03-11 Jakub Jelinek <jakub@redhat.com>
7250 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
7251 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
7252 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
7254 2004-03-11 Jakub Jelinek <jakub@redhat.com>
7256 * forward.c (__pthread_cond_broadcast_2_0,
7257 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
7258 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
7259 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
7261 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7263 * sysdeps/sh/tcb-offsets.sym: Add PID.
7264 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
7265 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
7267 2004-03-10 Ulrich Drepper <drepper@redhat.com>
7269 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
7270 include <sysdep-cancel.h>, vfork is no cancellation point.
7271 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
7272 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
7273 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
7275 2004-03-10 Jakub Jelinek <jakub@redhat.com>
7277 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
7279 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
7280 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
7282 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
7284 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
7285 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
7286 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
7287 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
7288 of DO_CALL_VIA_BREAK. Work around a gas problem.
7290 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
7291 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
7292 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
7293 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
7294 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
7295 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
7297 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
7298 a local register for saving old PID. Negate PID in parent upon exit.
7300 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
7302 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7303 before syscall, set to the old value in the parent afterwards.
7304 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
7305 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
7307 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7308 before syscall, set to the old value in the parent afterwards.
7309 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
7310 * sysdeps/s390/tcb-offsets.sym: Add PID.
7312 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
7313 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
7314 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
7315 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
7316 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
7317 * sysdeps/sparc/tcb-offsets.sym: Add PID.
7319 2004-03-10 Andreas Schwab <schwab@suse.de>
7321 * sysdeps/ia64/tcb-offsets.sym: Add PID.
7322 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
7323 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
7325 2004-03-09 Jakub Jelinek <jakub@redhat.com>
7327 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
7328 * tst-cancel21.c (do_one_test): Likewise.
7329 Reported by Gordon Jin <gordon.jin@intel.com>.
7331 2004-02-09 Jakub Jelinek <jakub@redhat.com>
7333 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
7334 if non-zero and set to INT_MIN if zero.
7335 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
7336 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
7337 (SAVE_PID, RESTORE_PID): Define.
7339 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
7340 Use relative path to avoid including NPTL i386/vfork.S.
7341 (SAVE_PID, RESTORE_PID): Define.
7342 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
7343 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
7344 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
7346 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
7347 * tst-vfork1.c: New test.
7348 * tst-vfork2.c: New test.
7349 * tst-vfork1x.c: New test.
7350 * tst-vfork2x.c: New test.
7352 2004-03-08 Ulrich Drepper <drepper@redhat.com>
7354 * sysdeps/i386/tcb-offsets.sym: Add PID.
7355 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7356 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
7357 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
7359 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
7361 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
7363 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
7365 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7368 2004-03-07 Ulrich Drepper <drepper@redhat.com>
7370 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7373 * tst-once4.c: Remove unnecessary macro definition.
7375 * tst-mutex7.c (do_test): Limit thread stack size.
7376 * tst-once2.c (do_test): Likewise.
7377 * tst-tls3.c (do_test): Likewise.
7378 * tst-tls1.c (do_test): Likewise.
7379 * tst-signal3.c (do_test): Likewise.
7380 * tst-kill6.c (do_test): Likewise.
7381 * tst-key4.c (do_test): Likewise.
7382 * tst-join4.c (do_test): Likewise.
7383 * tst-fork1.c (do_test): Likewise.
7384 * tst-context1.c (do_test): Likewise.
7385 * tst-cond2.c (do_test): Likewise.
7386 * tst-cond10.c (do_test): Likewise.
7387 * tst-clock2.c (do_test): Likewise.
7388 * tst-cancel10.c (do_test): Likewise.
7389 * tst-basic2.c (do_test): Likewise.
7390 * tst-barrier4.c (do_test): Likewise.
7392 2004-03-05 Ulrich Drepper <drepper@redhat.com>
7394 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
7396 2004-03-01 Ulrich Drepper <drepper@redhat.com>
7398 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7399 (__pthread_cond_timedwait): Optimize wakeup test.
7400 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7401 (__pthread_cond_wait): Likewise.
7402 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7403 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7406 2004-02-29 Ulrich Drepper <drepper@redhat.com>
7408 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7409 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
7410 the atomic instruction needed.
7411 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7412 (__lll_mutex_lock_wait): Likewise.
7414 2004-02-28 Ulrich Drepper <drepper@redhat.com>
7416 * Makefile (tests): Add tst-cond14 and tst-cond15.
7417 * tst-cond14.c: New file.
7418 * tst-cond15.c: New file.
7420 2004-02-27 Ulrich Drepper <drepper@redhat.com>
7422 * sysdeps/pthread/createthread.c (create_thread): Remove use of
7423 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
7424 needs to be implemented differently to be useful.
7426 2004-02-26 Ulrich Drepper <drepper@redhat.com>
7428 * pthread_attr_setschedparam.c: Don't test priority against limits
7429 here. Set ATTR_FLAG_SCHED_SET flag.
7430 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7431 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7432 from parent thread to child. If attribute is used and scheduling
7433 parameters are not inherited, copy parameters from attribute or
7434 compute them. Check priority value.
7435 * pthread_getschedparam.c: If the parameters aren't known yet get
7436 them from the kernel.
7437 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7438 ATTR_FLAG_POLICY_SET flag for thread.
7439 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7440 and ATTR_FLAG_POLICY_SET.
7442 * sysdeps/pthread/createthread.c: Use tgkill if possible.
7444 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7445 fail if stack address hasn't been set. Just return 0.
7447 2004-02-25 Ulrich Drepper <drepper@redhat.com>
7449 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
7450 libpthread for the files in this list.
7451 (CFLAGS-tst-unload): Removed.
7452 * tst-unload.c (do_test): Don't use complete path for
7455 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7458 2004-02-22 Ulrich Drepper <drepper@redhat.com>
7460 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7461 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7462 operation per round is needed.
7463 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7464 (__lll_mutex_lock_wait): Likewise.
7466 2004-02-20 Ulrich Drepper <drepper@redhat.com>
7468 * tst-cancel9.c (cleanup): Don't print to stderr.
7470 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7472 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7474 2004-02-20 Jakub Jelinek <jakub@redhat.com>
7476 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7477 (__syscall_error_handler2): Call CDISABLE.
7478 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7479 (__syscall_error_handler2): Call CDISABLE.
7481 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7482 Release lock before the loop, don't reacquire it.
7484 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7486 2004-02-19 Andreas Schwab <schwab@suse.de>
7488 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7491 2004-02-18 Ulrich Drepper <drepper@redhat.com>
7493 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7494 (pthread_barrier_wait): After wakeup, release lock only when the
7495 last thread stopped using the barrier object.
7496 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7497 (pthread_barrier_wait): Likewise.
7498 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7500 * Makefile (tests): Add tst-barrier4.
7501 * tst-barrier4.c: New file.
7503 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7504 (__pthread_cond_timedwait): Perform timeout test while holding
7505 internal lock to prevent wakeup race.
7506 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7507 * sysdeps/pthread/pthread_cond_timedwait.c
7508 (__pthread_cond_timedwait): Likewise.
7509 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7510 (__pthread_cond_timedwait): Likewise.
7512 2004-02-18 Jakub Jelinek <jakub@redhat.com>
7514 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7515 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7516 * Makefile (tests): Add tst-rwlock13.
7517 * tst-rwlock13.c: New test.
7519 2004-02-16 Ulrich Drepper <drepper@redhat.com>
7521 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7522 (__condvar_tw_cleanup): Little optimization.
7523 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7525 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
7527 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7528 libpthread as "lib" parameter to SHLIB_COMPAT.
7529 (__novmx_siglongjmp): Fix typo in function name.
7530 (__novmx_longjmp): Fix typo in function name.
7532 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7534 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7537 * sysdeps/generic/pt-longjmp.c: Moved to...
7538 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
7540 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
7542 * Makefile (libpthread-routines): Add pt-cleanup.
7543 * pt-longjmp.c: Removed.
7544 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7545 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7546 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7547 Version longjmp, siglongjmp for GLIBC_2.3.4.
7548 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7550 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7552 * sysdeps/pthread/pthread_cond_timedwait.c
7553 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
7554 Reuse code. Add __builtin_expects.
7556 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7557 (__pthread_cond_timedwait): Get internal lock in case timeout has
7558 passed before the futex syscall.
7559 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7561 2004-01-20 Ulrich Drepper <drepper@redhat.com>
7563 * allocatestack.c: Pretty printing.
7565 * sysdeps/pthread/createthread.c (create_thread): Don't add
7566 CLONE_DETACHED bit if it is not necessary.
7568 2004-01-16 Ulrich Drepper <drepper@redhat.com>
7570 * pthread_getattr_np.c: Include ldsodefs.h.
7572 2004-01-16 Richard Henderson <rth@redhat.com>
7574 * allocatestack.c: Don't declare __libc_stack_end.
7575 * init.c (__pthread_initialize_minimal_internal): Likewise.
7576 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7578 2004-01-15 Richard Henderson <rth@redhat.com>
7580 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7581 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7582 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7583 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7584 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7585 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7586 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7587 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7589 2004-01-14 Ulrich Drepper <drepper@redhat.com>
7591 * init.c (pthread_functions): Make array const.
7593 2004-01-13 Ulrich Drepper <drepper@redhat.com>
7595 * allocatestack.c (__make_stacks_executable): Change interface.
7596 Check parameters. Pass parameter on to libc counterpart.
7597 * pthreadP.h: Change declaration.
7599 2004-01-13 Richard Henderson <rth@redhat.com>
7601 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7603 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7606 * sysdeps/alpha/Makefile: New file.
7607 * sysdeps/alpha/tcb-offsets.sym: New file.
7608 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7609 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7611 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7614 2004-01-08 Jakub Jelinek <jakub@redhat.com>
7616 * Makefile (tests): Add tst-backtrace1.
7617 * tst-backtrace1.c: New test.
7619 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7621 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7622 register as second parameter to the REGISTER macro.
7623 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7624 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7625 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7626 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7627 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7628 of thread register as second parameter to REGISTER macro in 64 case.
7630 2004-01-03 Ulrich Drepper <drepper@redhat.com>
7632 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7633 (CFLAGS-getpid.o): Defined.
7634 (CFLAGS-getpid.os): Defined.
7636 2003-12-31 Ulrich Drepper <drepper@redhat.com>
7638 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7639 returned for main thread does not overlap with any other VMA.
7640 Patch by Jakub Jelinek.
7642 2003-12-29 Jakub Jelinek <jakub@redhat.com>
7644 * tst-raise1.c: Include stdio.h.
7646 2003-12-23 Jakub Jelinek <jakub@redhat.com>
7648 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7649 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7650 If pid is 0, set it to selftid.
7651 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7652 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7653 != 0, return self->tid without doing a syscall.
7654 * descr.h (struct pthread): Move pid field after tid.
7656 * Makefile (tests): Add tst-raise1.
7657 * tst-raise1.c: New file.
7659 2003-12-23 Roland McGrath <roland@redhat.com>
7661 * tst-oddstacklimit.c: New file.
7662 * Makefile (tests): Add it.
7663 (tst-oddstacklimit-ENV): New variable.
7665 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7666 value up to page size for __default_stacksize.
7668 2003-12-21 Ulrich Drepper <drepper@redhat.com>
7670 * Makefile (tests): Add tst-eintr5.
7671 * tst-eintr5.c: New file.
7673 * eintr.c (eintr_source): Prevent sending signal to self.
7675 * tst-eintr2.c (tf1): Improve error message.
7677 2003-12-20 Ulrich Drepper <drepper@redhat.com>
7679 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7680 * sysdeps/unix/sysv/linux/getpid.c: New file.
7681 * pthread_cancel.c: Add comment explaining use of PID field.
7682 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7683 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7684 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7685 temporarily to signal the field must not be relied on and updated
7687 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7688 temporarily negative.
7689 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7691 2003-12-19 Ulrich Drepper <drepper@redhat.com>
7693 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7694 (eintr_source): If ARG != NULL, use pthread_kill.
7695 * tst-eintr1.c: Adjust for this change.
7696 * tst-eintr2.c: Likewise.
7697 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7698 * tst-eintr3.c: New file.
7699 * tst-eintr4.c: New file.
7701 2003-12-19 Jakub Jelinek <jakub@redhat.com>
7703 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7704 if CANCELSTATE_BITMASK is set.
7705 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7708 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7709 (tests-reverse): Add tst-cancel23.
7710 * tst-cancel22.c: New test.
7711 * tst-cancel23.c: New test.
7713 2003-12-18 Ulrich Drepper <drepper@redhat.com>
7715 * tst-eintr1.c: Better error messages.
7717 * Makefile (tests): Add tst-eintr2.
7718 * tst-eintr2.c: New file.
7720 2003-12-18 Jakub Jelinek <jakub@redhat.com>
7722 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7723 (CFLAGS-tst-cancelx21.c): Set.
7724 * tst-cancel21.c: New test.
7725 * tst-cancelx21.c: New test.
7727 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7729 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7730 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7731 * pt-longjmp.c: Include jmpbuf-unwind.h.
7732 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7733 _JMPBUF_UNWINDS. Adjust compared pointers.
7734 * init.c (__pthread_initialize_minimal_internal): Initialize
7735 pd->stackblock_size.
7736 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7737 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7738 * sysdeps/i386/jmpbuf-unwind.h: New file.
7739 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7740 * sysdeps/s390/jmpbuf-unwind.h: New file.
7741 * sysdeps/sh/jmpbuf-unwind.h: New file.
7742 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7743 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7744 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7745 (_JMPBUF_CFA_UNWINDS): Remove.
7746 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7748 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7750 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7751 (CFLAGS-tst-cancelx20.c): Set.
7752 * tst-cancel20.c: New test.
7753 * tst-cancelx20.c: New test.
7755 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7757 * init.c (__pthread_initialize_minimal_internal): Don't treat
7758 architectures with separate register stack special here when
7759 computing default stack size.
7761 2003-12-17 Roland McGrath <roland@redhat.com>
7763 * Makefile (tst-cancelx7-ARGS): New variable.
7764 Reportd by Greg Schafer <gschafer@zip.com.au>.
7766 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7768 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7769 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7770 (tst-stack3-ENV): Set.
7771 ($(objpfx)tst-stack3-mem): New.
7772 * tst-stack3.c: New test.
7774 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7776 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7777 Add unwind directives. Drop unused .regstk directive.
7778 (_fini_EPILOG_BEGINS): Add unwind directives.
7780 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7782 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7783 Assume parameter is a pointer.
7784 (lll_futex_wake): Likewise.
7785 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7787 (lll_futex_wake): Likewise.
7788 Reported by Boris Hu.
7789 * sysdeps/unix/sysv/linux/unregister-atfork.c
7790 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7792 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7794 2003-12-10 Ulrich Drepper <drepper@redhat.com>
7796 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7797 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7798 __rtld_lock_initialize for ld.so lock.
7799 Patch in part by Adam Li <adam.li@intel.com>.
7801 2003-12-02 David Mosberger <davidm@hpl.hp.com>
7803 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7804 in $(gnulib). Also, remove stale comment.
7806 2003-11-12 David Mosberger <davidm@hpl.hp.com>
7808 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7809 advantage of new syscall stub and optimize accordingly.
7811 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7812 from SYS_futex, to match expectations of
7813 sysdep.h:DO_INLINE_SYSCALL.
7814 (lll_futex_clobbers): Remove.
7815 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7816 (lll_futex_wake): Likewise.
7817 (lll_futex_requeue): Likewise.
7818 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7819 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7821 (__lll_mutex_lock): Likewise.
7822 (__lll_mutex_cond_lock): Likewise.
7823 (__lll_mutex_timed_lock): Likewise.
7824 (__lll_mutex_unlock): Likewise.
7825 (__lll_mutex_unlock_force): Likewise.
7827 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7828 comes before the include of <sysdep.h>.
7829 (THREAD_SELF_SYSINFO): New macro.
7830 (THREAD_SYSINFO): Likewise.
7831 (INIT_SYSINFO): New macro.
7832 (TLS_INIT_TP): Call INIT_SYSINFO.
7834 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7836 * sysdeps/pthread/createthread.c (create_thread): Use
7837 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7838 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7839 THREAD_SELF_SYSINFO instead of open code.
7840 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7841 (THREAD_SYSINFO): Likewise.
7843 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7845 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7847 2003-12-06 Ulrich Drepper <drepper@redhat.com>
7849 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7850 instead of .init. Patch by David Mosberger.
7852 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
7854 * sysdeps/pthread/configure.in: Remove broken declaration in C
7855 cleanup handling check.
7857 2003-11-30 Andreas Jaeger <aj@suse.de>
7859 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7860 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7863 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7865 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7866 * pthread_attr_destroy.c: Include shlib-compat.h.
7867 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7868 is set in iattr->flags.
7869 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7871 2003-11-21 Jakub Jelinek <jakub@redhat.com>
7873 * Makefile (distribute): Add tst-cleanup4aux.c.
7875 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7878 2003-11-21 Ulrich Drepper <drepper@redhat.com>
7880 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7881 pthread_cond_signal.
7883 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7884 store mutex address if the current value is ~0l.
7885 * sysdeps/pthread/pthread_cond_timedwait.c
7886 (__pthread_cond_timedwait): Likewise.
7887 * sysdeps/pthread/pthread_cond_broadcast.c
7888 (__pthread_cond_broadcast): Don't use requeue for pshared
7891 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7892 (__pthread_cond_wait): Don't store mutex address if the current
7894 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7895 (__pthread_cond_timedwait): Likewise.
7896 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7897 (__pthread_cond_broadcast): Don't use requeue for pshared
7900 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7901 element with ~0l for pshared condvars, with NULL otherwise.
7903 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7904 (__pthread_cond_wait): Don't store mutex address if the current
7906 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7907 (__pthread_cond_timedwait): Likewise.
7908 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7909 (__pthread_cond_broadcast): Don't use requeue for pshared
7912 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7913 * tst-cond12.c: New file.
7914 * tst-cond13.c: New file.
7916 2003-11-17 Ulrich Drepper <drepper@redhat.com>
7918 * sysdeps/pthread/configure.in: Make missing forced unwind support
7921 2003-11-11 Ulrich Drepper <drepper@redhat.com>
7923 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7925 2003-11-06 Ulrich Drepper <drepper@redhat.com>
7927 * Makefile: Add magic to clean up correctly.
7929 2003-11-05 Jakub Jelinek <jakub@redhat.com>
7931 * unwind.c (FRAME_LEFT): Define.
7932 (unwind_stop): Handle old style cleanups here.
7933 (__pthread_unwind): Handle old style cleanups only if
7934 !HAVE_FORCED_UNWIND.
7935 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7936 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7937 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7938 ($(objpfx)tst-cleanupx4): Likewise.
7939 * tst-cleanup4.c: New test.
7940 * tst-cleanup4aux.c: New.
7941 * tst-cleanupx4.c: New test.
7943 2003-11-04 Ulrich Drepper <drepper@redhat.com>
7945 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7946 lll_mutex_*lock macros to skip atomic operations on some archs.
7948 2003-11-03 Ulrich Drepper <drepper@redhat.com>
7950 * sysdeps/pthread/tst-timer.c (main): Initialize
7951 sigev2.sigev_value as well.
7953 2003-10-15 Roland McGrath <roland@redhat.com>
7955 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7957 * sysdeps/pthread/configure: Regenerated.
7959 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7961 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7962 locking macros. No distinction between normal and mutex locking
7964 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7965 Merge bits from lowlevelmutex.S we still need.
7966 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7967 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7968 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7969 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7970 new mutex implementation.
7971 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7972 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7973 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7974 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7975 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7976 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7977 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7978 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7979 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7980 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7981 symbol for entry point to avoid cancellation.
7983 2003-10-07 Jakub Jelinek <jakub@redhat.com>
7985 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7987 (SAVE_OLDTYPE_0): Fix a typo.
7989 2003-10-03 Ulrich Drepper <drepper@redhat.com>
7991 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7992 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7994 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7996 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7999 2003-10-02 Jakub Jelinek <jakub@redhat.com>
8001 * Makefile (tests): Add tst-cancel19.
8002 * tst-cancel19.c: New test.
8004 2003-10-02 Ulrich Drepper <drepper@redhat.com>
8006 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
8007 restoring of the old cancellation type.
8009 2003-09-30 Jakub Jelinek <jakub@redhat.com>
8011 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
8013 2003-09-27 Wolfram Gloger <wg@malloc.de>
8015 * sysdeps/pthread/malloc-machine.h: New file
8017 2003-09-24 Roland McGrath <roland@redhat.com>
8019 * allocatestack.c (__make_stacks_executable): Don't ignore return
8020 value from _dl_make_stack_executable.
8022 2003-09-24 Ulrich Drepper <drepper@redhat.com>
8024 * allocatestack.c (__make_stacks_executable): Also change
8025 permission of the currently unused stacks.
8027 * allocatestack.c (change_stack_perm): Split out from
8028 __make_stacks_executable.
8029 (allocate_stack): If the required permission changed between the time
8030 we started preparing the stack and queueing it, change the permission.
8031 (__make_stacks_executable): Call change_stack_perm.
8033 * Makefile: Build tst-execstack-mod locally.
8034 * tst-execstack-mod.c: New file.
8036 2003-09-23 Jakub Jelinek <jakub@redhat.com>
8038 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
8040 2003-09-23 Roland McGrath <roland@redhat.com>
8042 * tst-execstack.c: New file.
8043 * Makefile (tests): Add it.
8044 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
8045 (LDFLAGS-tst-execstack): New variable.
8047 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
8048 whether to use PROT_EXEC for stack mmap.
8049 (__make_stacks_executable): New function.
8050 * pthreadP.h: Declare it.
8051 * init.c (__pthread_initialize_minimal_internal): Set
8052 GL(dl_make_stack_executable_hook) to that.
8054 2003-09-22 Ulrich Drepper <drepper@redhat.com>
8056 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
8057 recommendation from AMD re avoidance of lock prefix.
8059 2003-09-22 Jakub Jelinek <jakub@redhat.com>
8061 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
8062 lll_futex_timed_wait instead of lll_futex_wait.
8063 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
8064 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
8065 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
8066 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
8067 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
8068 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
8069 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
8070 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
8071 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
8072 Completely revamp the locking macros. No distinction between
8073 normal and mutex locking anymore.
8074 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
8075 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
8076 __lll_lock_timedwait): Fix prototypes.
8077 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
8078 __lll_lock_timedwait): Likewise.
8079 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
8080 macros, add __builtin_expect.
8081 (lll_mutex_timedlock): Likewise. Fix return value.
8082 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
8083 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
8084 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
8085 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
8086 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
8087 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
8088 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
8089 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
8091 2003-09-22 Ulrich Drepper <drepper@redhat.com>
8093 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8094 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
8095 operation if possible.
8097 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
8098 like jumping over the lock prefix.
8100 2003-09-21 Ulrich Drepper <drepper@redhat.com>
8102 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
8103 locking macros. No distinction between normal and mutex locking
8105 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8106 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8107 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8108 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
8109 locking. Merge bits from lowlevelmutex.S we still need.
8110 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8111 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
8112 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
8113 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
8114 * Makefile (routines): Remove libc-lowlevelmutex.
8115 (libpthread-rountines): Remove lowlevelmutex.
8116 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
8117 for new mutex implementation.
8118 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8119 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8120 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8121 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8122 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8124 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8126 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8127 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8128 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
8129 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8130 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8131 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8132 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8133 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8135 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8137 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
8138 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8139 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8141 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8142 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
8144 2003-09-20 Ulrich Drepper <drepper@redhat.com>
8146 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
8147 in parameters of asm with output parameters.
8149 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
8150 type of DECR parameter to int.
8151 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
8153 2003-09-18 Jakub Jelinek <jakub@redhat.com>
8155 * tst-attr3.c (tf, do_test): Print stack start/end/size and
8156 guardsize for each thread.
8158 2003-09-17 Jakub Jelinek <jakub@redhat.com>
8160 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
8161 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
8162 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
8164 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
8165 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
8167 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
8168 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
8169 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
8170 (pthread_getaffinity_np): Add hidden_def.
8172 * Makefile (tests): Add tst-attr3.
8173 * tst-attr3.c: New test.
8175 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
8177 2003-09-15 Jakub Jelinek <jakub@redhat.com>
8179 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
8180 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
8182 2003-09-17 Jakub Jelinek <jakub@redhat.com>
8184 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
8185 * tst-align.c: Include tst-stack-align.h.
8186 (tf, do_test): Use TEST_STACK_ALIGN macro.
8188 2003-09-17 Ulrich Drepper <drepper@redhat.com>
8190 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
8193 2003-09-16 Ulrich Drepper <drepper@redhat.com>
8195 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
8196 stack-related values for the initial thread.
8198 2003-09-15 Jakub Jelinek <jakub@redhat.com>
8200 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
8202 2003-09-11 Ulrich Drepper <drepper@redhat.com>
8204 * pthread_mutex_lock.c: Minor code rearrangements.
8206 2003-09-05 Roland McGrath <roland@redhat.com>
8208 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
8209 Instead, include ../nptl_db/db_info.c to do its magic.
8210 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
8211 (__pthread_pthread_key_2ndlevel_size): Likewise.
8212 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
8213 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
8214 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
8215 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
8216 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
8217 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
8218 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
8219 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
8220 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
8221 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
8222 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
8223 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
8224 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
8225 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
8226 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
8227 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
8228 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
8230 2003-09-08 Ulrich Drepper <drepper@redhat.com>
8232 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
8233 of pthread_t to be compatible with LT.
8234 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
8235 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8236 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8237 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8238 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
8239 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8240 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
8242 2003-09-04 Ulrich Drepper <drepper@redhat.com>
8244 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
8246 2003-09-04 Jakub Jelinek <jakub@redhat.com>
8248 * unwind-forcedunwind.c: Move to...
8249 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
8250 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
8251 * sysdeps/pthread/jmpbuf-unwind.h: New file.
8252 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
8253 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
8254 * unwind.c: Include jmpbuf-unwind.h.
8255 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
8257 2003-09-02 Jakub Jelinek <jakub@redhat.com>
8259 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
8260 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
8261 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
8262 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
8263 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8264 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
8265 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
8266 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
8267 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
8268 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
8269 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
8271 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
8272 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
8273 * Makefile (tests): Add tst-stack2.
8274 * tst-stack2.c: New test.
8275 * tst-stack1.c: Include limits.h and sys/param.h.
8276 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
8278 * pthread_condattr_setpshared.c: Include errno.h.
8279 (pthread_condattr_setpshared): Return EINVAL if pshared
8280 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
8282 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
8283 defined symbol for entry point to avoid cancellation.
8284 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8286 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
8288 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8290 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
8292 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
8294 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
8295 __close_nocancel, __read_nocancel, __write_nocancel,
8296 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
8297 libpthread.so or librt.so, define to corresponding function
8298 without _nocancel suffix.
8299 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
8300 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
8301 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
8303 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
8305 2003-09-02 Ulrich Drepper <drepper@redhat.com>
8307 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
8308 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8310 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
8311 in subsections has a symbol associated with it.
8313 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
8314 defined symbol for entry point to avoid cancellation.
8315 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
8317 2003-09-01 Jakub Jelinek <jakub@redhat.com>
8319 * Makefile (tests): Add tst-tls5.
8320 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
8321 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
8322 ($(objpfx)tst-tls5): New.
8323 ($(objpfx)tst-tls6.out): Likewise.
8324 (tests): Depend on $(objpfx)tst-tls6.out.
8325 * tst-tls3.c: Include stdint.h and pthreaddef.h.
8326 (do_test): Check pthread_self () return value alignment.
8327 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
8328 (tf): Check pthread_self () return value alignment.
8329 * tst-tls5.c: New test.
8331 * tst-tls5mod.c: New.
8332 * tst-tls5moda.c: New.
8333 * tst-tls5modb.c: New.
8334 * tst-tls5modc.c: New.
8335 * tst-tls5modd.c: New.
8336 * tst-tls5mode.c: New.
8337 * tst-tls5modf.c: New.
8338 * tst-tls6.sh: New test.
8340 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
8341 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
8342 * init.c (pthread_functions): Initialize them.
8343 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
8344 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
8345 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
8346 pthread_cond_timedwait@@GLIBC_2.3.2.
8348 2003-09-01 Jakub Jelinek <jakub@redhat.com>
8350 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
8351 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
8352 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
8353 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
8354 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
8355 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8357 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
8359 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
8360 _POSIX_THREAD_PRIORITY_SCHEDULING.
8361 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
8363 2003-08-31 Ulrich Drepper <drepper@redhat.com>
8365 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
8366 nested function, use static inline function from libio.h.
8367 Code by Richard Henderson.
8369 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
8372 2003-08-30 Jakub Jelinek <jakub@redhat.com>
8374 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
8375 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
8376 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
8377 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
8378 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
8379 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
8380 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
8381 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
8382 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
8383 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
8384 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
8385 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
8386 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
8387 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
8388 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
8389 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
8390 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
8391 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
8392 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
8393 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
8394 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
8395 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
8396 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
8397 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
8398 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
8399 * sysdeps/sparc/tls.h: New file.
8400 * sysdeps/sparc/tcb-offsets.sym: New file.
8401 * sysdeps/sparc/Makefile: New file.
8402 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
8403 * init.c [__sparc__] (__NR_set_tid_address): Define.
8405 2003-08-29 Jakub Jelinek <jakub@redhat.com>
8407 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
8408 _IO_release_lock): Define.
8410 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
8412 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
8413 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
8415 2003-08-27 Ulrich Drepper <drepper@redhat.com>
8417 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8418 (__pthread_cleanup_class): Add missing return types of member
8421 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
8423 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8424 (lll_mutex_unlock_force): Add memory barrier between store and futex
8427 2003-08-25 Ulrich Drepper <drepper@redhat.com>
8429 * tst-cancel4.c (do_test): Also unlink tempfname and remove
8430 tempmsg in first loop.
8432 2003-08-18 Ulrich Drepper <drepper@redhat.com>
8434 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8435 _POSIX_THREAD_PRIORITY_SCHEDULING.
8436 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8438 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8440 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8441 (__rtld_lock_default_lock_recursive,
8442 __rtld_lock_default_unlock_recursive): Define.
8443 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8444 __rtld_lock_unlock_recursive): Define using
8445 GL(_dl_rtld_*lock_recursive).
8446 * init.c (__pthread_initialize_minimal_internal): Initialize
8447 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8448 Lock GL(_dl_load_lock) the same number of times as
8449 GL(_dl_load_lock) using non-mt implementation was nested.
8451 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8452 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8454 2003-08-06 Jakub Jelinek <jakub@redhat.com>
8456 * tst-cancel17.c (do_test): Make len2 maximum of page size and
8459 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8461 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8463 2003-08-03 Jakub Jelinek <jakub@redhat.com>
8465 * sysdeps/pthread/createthread.c (do_clone): Move error handling
8466 to first syscall error check. Move syscall error check for tkill
8467 into __ASSUME_CLONE_STOPPED #ifdef.
8469 2003-08-02 Ulrich Drepper <drepper@redhat.com>
8471 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8472 is not defined, do explicit synchronization.
8473 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
8474 is not defined also unlock pd->lock for non-debugging case in case
8476 * pthread_create.c (start_thread): Always get and release pd->lock
8477 if __ASSUME_CLONE_STOPPED is not defined.
8478 (start_thread_debug): Removed. Adjust users.
8479 * allocatestack.c (allocate_stack): Always initialize lock if
8480 __ASSUME_CLONE_STOPPED is not defined.
8481 * Makefile (tests): Add tst-sched1.
8482 * tst-sched1.c: New file.
8484 * sysdeps/pthread/createthread.c (do_clone): Only use
8485 sched_setschduler and pass correct parameters.
8487 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8489 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8490 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8491 PTHREAD_STACK_MIN in comments.
8493 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8495 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8496 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8498 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8499 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8500 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8501 (__pthread_cleanup_upto): Fix prototype.
8502 (_longjmp_unwind): Adjust caller.
8503 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8504 Change second argument to const struct pointer.
8505 * tst-sem8.c (main): Remove unused s2 and s3 variables.
8506 * tst-sem9.c (main): Likewise.
8507 * unwind.c: Include string.h for strlen prototype.
8509 2003-07-31 Ulrich Drepper <drepper@redhat.com>
8511 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8512 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8513 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8515 Patch by Nicholas Miell <nmiell@attbi.com>.
8517 2003-07-30 Jakub Jelinek <jakub@redhat.com>
8519 * init.c (__pthread_initialize_minimal_internal): Initialize
8520 GL(dl_init_static_tls).
8521 * pthreadP.h (__pthread_init_static_tls): New prototype.
8522 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8524 * Makefile (tests): Add tst-tls4.
8525 (modules-names): Add tst-tls4moda and tst-tls4modb.
8526 ($(objpfx)tst-tls4): Link against libdl and libpthread.
8527 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8529 * tst-tls4.c: New file.
8530 * tst-tls4moda.c: New file.
8531 * tst-tls4modb.c: New file.
8533 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
8535 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8536 before __timer_dealloc.
8537 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8538 Don't call list_unlink.
8540 2003-07-29 Roland McGrath <roland@redhat.com>
8542 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8544 2003-07-25 Jakub Jelinek <jakub@redhat.com>
8546 * tst-cancel17.c (do_test): Check if aio_cancel failed.
8547 Don't reuse struct aiocb A if it failed.
8548 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8549 not just one byte, as that does not block.
8551 2003-07-22 Jakub Jelinek <jakub@redhat.com>
8553 * sysdeps/pthread/unwind-resume.c: New file.
8554 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8555 unwind-resume in csu subdir.
8556 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8558 (librt-sysdep_routines, librt-shared-only-routines): Add
8560 * sysdeps/pthread/rt-unwind-resume.c: New file.
8561 * unwind-forcedunwind.c: New file.
8562 * Makefile (libpthread-routines): Add unwind-forcedunwind.
8563 (libpthread-shared-only-routines): Likewise.
8564 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8565 * pthreadP.h (pthread_cancel_init): New prototype.
8566 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8568 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8569 attr argument const struct pthread_attr *.
8571 * res.c (__res_state): Return __resp.
8572 * descr.h: Include resolv.h.
8573 (struct pthread): Add res field.
8574 * pthread_create.c: Include resolv.h.
8575 (start_thread): Initialize __resp.
8576 * Makefile (tests): Add tst-_res1.
8577 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8578 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8579 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8581 * tst-_res1.c: New file.
8582 * tst-_res1mod1.c: New file.
8583 * tst-_res1mod2.c: New file.
8585 2003-07-21 Ulrich Drepper <drepper@redhat.com>
8587 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8589 * Makefile: Define various *-no-z-defs variables for test DSOs
8590 which has undefined symbols.
8592 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8594 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8595 Retry if the stwcx fails to store once_control.
8597 2003-07-20 Ulrich Drepper <drepper@redhat.com>
8599 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8600 pthread_attr_setaffinity.
8601 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8602 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8603 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8604 * pthread_attr_destroy.c: Free cpuset element if allocated.
8605 * pthread_create.c: Pass iattr as additional parameter to
8607 * sysdeps/pthread/createthread.c: If attribute is provided and
8608 a new thread is created with affinity set or scheduling parameters,
8609 start thread with CLONE_STOPPED.
8610 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8611 pthread_attr_setaffinity.
8612 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8615 2003-07-15 Ulrich Drepper <drepper@redhat.com>
8617 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8619 2003-07-14 Ulrich Drepper <drepper@redhat.com>
8621 * sysdeps/pthread/configure.in: Require CFI directives also for
8624 2003-07-15 Jakub Jelinek <jakub@redhat.com>
8626 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8629 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8631 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8633 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8634 registers as variables. Call __pthread_mutex_unlock_usercnt.
8635 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8636 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8637 not self pointer in __writer. Compare with TID to determine
8639 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8640 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8642 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8644 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8645 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8646 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8647 macros also when compiling librt.
8649 2003-07-11 Jakub Jelinek <jakub@redhat.com>
8651 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8652 -fasynchronous-unwind-tables.
8653 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8654 (PSEUDO): Add cfi directives.
8655 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8657 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8660 2003-07-08 Jakub Jelinek <jakub@redhat.com>
8662 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8663 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8664 * unwind.c (__pthread_unwind_next): Add hidden_def.
8665 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8667 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8668 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8669 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8671 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8672 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8674 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8675 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8676 __pthread_unregister_cancel and __pthread_unwind_next.
8678 2003-07-04 Jakub Jelinek <jakub@redhat.com>
8680 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8681 different symbol for the cancellation syscall wrapper and
8682 non-cancellation syscall wrapper.
8683 (PSEUDO_END): Define.
8685 2003-07-05 Richard Henderson <rth@redhat.com>
8687 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8688 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8689 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8690 return actual return value from the syscall, not 0.
8692 2003-07-07 Ulrich Drepper <drepper@redhat.com>
8694 * descr.h (struct pthread): Add pid field.
8695 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8696 (__reclaim_stacks): Likewise.
8697 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8698 also check for PID of the signal source.
8699 (__pthread_initialize_minimal_internal): Also initialize pid field
8700 of initial thread's descriptor.
8701 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8702 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8703 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8704 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8705 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8707 2003-07-05 Ulrich Drepper <drepper@redhat.com>
8709 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8710 Fix use of parameter.
8711 (__libc_cleanup_pop): Likewise.
8713 2003-07-04 Ulrich Drepper <drepper@redhat.com>
8715 * init.c (sigcancel_handler): Change parameters to match handler
8716 for SA_SIGACTION. Check signal number and code to recognize
8717 invalid invocations.
8719 2003-07-03 Roland McGrath <roland@redhat.com>
8721 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8722 Apply sizeof (struct pthread) bias to r13 value.
8724 2003-07-03 Ulrich Drepper <drepper@redhat.com>
8726 * sysdeps/pthread/configure.in: Require CFI directives.
8728 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8730 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8731 libpthread compilation.
8732 * unwind.c (__pthread_unwind): Add hidden_def.
8733 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8735 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8737 * libc-cancellation.c (__libc_cleanup_routine): Define.
8738 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8739 (__pthread_cleanup_pop): Define.
8741 2003-07-01 Richard Henderson <rth@redhat.com>
8743 * sysdeps/alpha/elf/pt-initfini.c: New file.
8744 * sysdeps/alpha/pthread_spin_lock.S: New file.
8745 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8746 * sysdeps/alpha/pthreaddef.h: New file.
8747 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8748 * sysdeps/alpha/tls.h: New file.
8749 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8750 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8751 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8752 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8753 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8754 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8755 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8756 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8757 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8758 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8760 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8762 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8763 cleanup support and unwind info.
8765 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8767 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8768 Use correct cleanup handler registration. Add unwind info.
8769 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8770 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8771 * tst-once3.c: Add cleanup handler and check it is called.
8772 * tst-once4.c: Likewise.
8773 * tst-oncex3.c: New file.
8774 * tst-oncex4.c: New file.
8775 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8777 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8779 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8781 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8783 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8784 (tf_msgsnd): Likewise.
8786 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8787 premature returns a bit more.
8789 2003-06-26 Ulrich Drepper <drepper@redhat.com>
8791 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8792 definition to the front.
8794 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8795 the cleanup functions to make the names unique. Fix dwarf opcode
8797 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8798 functions to make the names unique. Fix CFA offset for two blocks.
8800 2003-06-25 Ulrich Drepper <drepper@redhat.com>
8802 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8803 missing closing braces.
8804 Patch by Christophe Saout <christophe@saout.de>.
8806 2003-06-24 Roland McGrath <roland@redhat.com>
8808 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8810 2003-06-24 Ulrich Drepper <drepper@redhat.com>
8812 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8813 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8815 * pthreadP.h: Declare __find_thread_by_id.
8816 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8817 * pthread_clock_gettime.c: Allow using other thread's clock.
8818 * pthread_clock_settime.c: Likewise.
8819 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8820 * Makefile: Add rules to build and run tst-clock2.
8821 * tst-clock2.c: New file.
8823 2003-06-23 Ulrich Drepper <drepper@redhat.com>
8825 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8826 to use exception-based cleanup handler.
8827 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8829 * tst-cond8.c (ch): Announce that we are done.
8831 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8833 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8834 Also test aio_suspend with timeout value.
8836 2003-06-22 Ulrich Drepper <drepper@redhat.com>
8838 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8839 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8842 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8843 (__pthread_mutex_lock_internal): Likewise.
8844 (__pthread_mutex_unlock_internal): Likewise.
8845 (__pthread_mutex_unlock_usercnt): Declare.
8846 * pthread_mutex_destroy.c: Always fail if used in any way.
8847 * pthread_mutex_init.c: Update comment.
8848 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8849 * pthread_mutex_timedlock.c: Adjust __nusers.
8850 * pthread_mutex_trylock.c: Adjust __nusers.
8851 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8852 and public interfaces are wrapper with pass additional parameter.
8853 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8855 * tst-mutex8.c: New file.
8856 * Makefile (tests): Add tst-mutex8.
8857 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8858 __pthread_mutex_unlock_usercnt.
8859 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8860 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8861 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8862 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8863 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8864 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8865 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8867 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8868 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8869 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8870 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8871 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8873 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8874 * pthread_mutex_timedlock.c: Likewise.
8875 * pthread_mutex_trylock.c: Adjust __nusers.
8876 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8877 * tst-mutex9.c: New file.
8878 * Makefile (tests): Add tst-mutex9.
8879 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8880 * sysdeps/ia64/tls.h: Likewise.
8881 * sysdeps/powerpc/tls.h: Likewise.
8882 * sysdeps/s390/tls.h: Likewise.
8883 * sysdeps/sh/tls.h: Likewise.
8884 * sysdeps/x86_64/tls.h: Likewise.
8885 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8886 Change type of __owner.
8887 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8888 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8889 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8890 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8891 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8893 2003-06-19 Jakub Jelinek <jakub@redhat.com>
8895 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8896 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8898 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8899 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8900 instead of nr to lll_futex_wake. Only set errno and return -1
8903 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8904 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8905 return actual return value from the syscall, not 0.
8907 2003-06-18 Ulrich Drepper <drepper@redhat.com>
8909 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8910 find a random value.
8911 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8914 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8915 compat_timer_settime.
8916 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8917 compat_timer_gettime.
8918 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8919 compat_timer_getoverrun.
8920 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8921 compat_timer_delete.
8923 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8924 error-checking mutex detect busy mutexes.
8926 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8928 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8929 Add ax to clobber list.
8930 (lll_mutex_cond_lock): Likewise.
8931 (lll_mutex_unlock): Likewise.
8932 (lll_lock): Likewise.
8933 (lll_unlock): Likewise.
8935 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8936 * tst-cancel18.c: New file.
8937 * tst-cancelx18.c: New file.
8939 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8942 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8943 * tst-cancel17.c: New file.
8944 * tst-cancelx17.c: New file.
8946 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8947 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8948 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8950 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8952 2003-06-16 Jakub Jelinek <jakub@redhat.com>
8954 * sysdeps/pthread/createthread.c (create_thread): Set
8955 header.multiple_threads unconditionally.
8956 * allocatestack.c (allocate_stack): Likewise.
8957 * descr.h (struct pthread): Add header.multiple_threads
8959 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8960 Define for librt. #error if neither libpthread, libc nor librt.
8961 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8963 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8964 CDISABLE): Likewise.
8965 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8966 CDISABLE): Likewise.
8967 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8968 CDISABLE): Likewise.
8969 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8970 CDISABLE): Likewise. Access header.multiple_threads outside of
8971 libc and libpthread.
8972 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8974 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8975 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8977 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8979 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8980 Also test early cancellation before the thread reaches the cancellation
8983 * Makefile: Compile forward.c with exceptions.
8985 * sysdeps/unix/sysv/linux/sleep.c: New file.
8987 2003-06-16 Ulrich Drepper <drepper@redhat.com>
8989 * Makefile: Add CFLAGS definition to compile function wrappers
8990 duplicated from libc with exceptions.
8991 * tst-cancel4.c: Also check cancellation handlers.
8993 * Makefile: Add rules to build and run tst-cancel16 and
8994 tst-cancelx16. Add missing CFLAGS definitions.
8995 * tst-cancel16.c: New file.
8996 * tst-cancelx16.c: New file.
8998 2003-06-15 Ulrich Drepper <drepper@redhat.com>
9000 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9001 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
9002 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9003 (DL_SYSINFO_IMPLEMENTATION): Likewise.
9005 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
9006 (LIBC_CANCEL_RESET): Likewise.
9007 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
9008 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
9010 (CFLAGS-libcrt-cancellation.c): Define.
9011 * sysdeps/pthread/librt-cancellation.c: New file.
9012 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
9013 macros also when compiling librt.
9014 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
9015 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
9016 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
9017 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
9018 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
9019 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
9020 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9022 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
9023 compat_timer_create.
9025 2003-06-14 Ulrich Drepper <drepper@redhat.com>
9027 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
9029 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9031 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
9032 Add libc_hidden_def.
9034 2003-06-13 Roland McGrath <roland@redhat.com>
9036 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
9037 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
9039 2003-06-11 Ulrich Drepper <drepper@redhat.com>
9041 * allocatestack.c (queue_stack): Always inline.
9042 * ptreadhP.h (__do_cancel): Likewise.
9044 2003-06-10 Jakub Jelinek <jakub@redhat.com>
9046 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
9049 2003-06-10 Ulrich Drepper <drepper@redhat.com>
9051 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9052 (__pthread_cond_signal): Remove incorrect second addition for
9055 2003-06-09 Ulrich Drepper <drepper@redhat.com>
9057 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9058 (__pthread_cond_signal): Use correct futex pointer in
9059 __lll_mutex_lock_wait call.
9061 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9062 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
9064 2003-06-08 Ulrich Drepper <drepper@redhat.com>
9066 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
9068 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9071 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
9072 hand-written CFI generation code. Since ENTRY/END also initiated
9073 CFI frames this caused two CFI sets to be generated.
9075 2003-06-07 Ulrich Drepper <drepper@redhat.com>
9077 * cleanup_routine.c: New file.
9078 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
9079 * sysdeps/pthread/pthread.h: Add support for fully exception-based
9081 * Makefile (libpthread-routines): Add cleanup_routine.
9082 Add more CFLAGS variables to compile with exceptions. Add comments
9083 why which file needs unwind tables.
9084 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
9086 * tst-cancelx1.c: New file.
9087 * tst-cancelx2.c: New file.
9088 * tst-cancelx3.c: New file.
9089 * tst-cancelx4.c: New file.
9090 * tst-cancelx5.c: New file.
9091 * tst-cancelx6.c: New file.
9092 * tst-cancelx7.c: New file.
9093 * tst-cancelx8.c: New file.
9094 * tst-cancelx9.c: New file.
9095 * tst-cancelx10.c: New file.
9096 * tst-cancelx11.c: New file.
9097 * tst-cancelx12.c: New file.
9098 * tst-cancelx13.c: New file.
9099 * tst-cancelx14.c: New file.
9100 * tst-cancelx15.c: New file.
9101 * tst-cleanupx0.c: New file.
9102 * tst-cleanupx0.expect: New file.
9103 * tst-cleanupx1.c: New file.
9104 * tst-cleanupx2.c: New file.
9105 * tst-cleanupx3.c: New file.
9107 * tst-cleanup0.c: Make standard compliant.
9108 * tst-cleanup1.c: Likewise.
9110 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
9111 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9112 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9113 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9114 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9115 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9116 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
9118 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9119 * tst-cancel12.c: New file.
9120 * tst-cancel13.c: New file.
9121 * tst-cancel14.c: New file.
9122 * tst-cancel15.c: New file.
9123 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
9126 * tst-cancel1.c: Add some comments.
9128 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
9131 2003-06-06 Ulrich Drepper <drepper@redhat.com>
9133 * Makefile (CFLAGS-pthread_cancel.c): Define.
9135 2003-06-05 Ulrich Drepper <drepper@redhat.com>
9137 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
9138 Change type of __writer element to int.
9139 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9140 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9141 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9142 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9143 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9144 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
9145 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9146 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
9147 Compare with TID to determine deadlocks.
9148 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9149 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9150 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
9151 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9152 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9153 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9155 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9157 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9158 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9159 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
9161 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
9163 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9164 * Makefile (tests): Add tst-rwlock12.
9165 * tst-rwlock12.c: New file.
9167 2003-06-05 Jakub Jelinek <jakub@redhat.com>
9169 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
9170 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
9171 Remove bogus hidden_proto.
9172 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9174 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
9175 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
9176 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
9177 ___lll_mutex_timedlock): Likewise.
9179 2003-06-04 Ulrich Drepper <drepper@redhat.com>
9181 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9182 (__pthread_cond_signal): Add some code to eventually handle
9185 2003-06-01 Ulrich Drepper <drepper@redhat.com>
9187 * Makefile (tests): Add tst-exec4.
9188 (tst-exec4-ARGS): Define.
9189 * tst-exec4.c: New file.
9191 2003-05-31 Ulrich Drepper <drepper@redhat.com>
9193 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9194 Also fail if tv_nsec < 0.
9195 (__lll_timedwait_tid): Likewise.
9196 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
9197 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
9199 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
9201 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
9203 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9205 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
9207 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
9210 * Makefile (tests): Add tst-sem8 and tst-sem9.
9211 * tst-sem8.c: New file.
9212 * tst-sem9.c: New file.
9213 * sem_open.c: Fix creation of in_use record if the file exists but
9216 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
9219 * sysdeps/pthread/timer_create.c (timer_create): In case
9220 evp==NULL, assign timer ID to sival_ptr.
9222 * descr.h (struct pthread_unwind_buf): Change type of prev element to
9223 struct pthread_unwind_buf *.
9224 (struct pthread): Likewise for cleanup_jmp_buf element.
9226 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
9227 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
9228 * unwind.c (__pthread_unwind_next): Likewise.
9230 2003-05-30 Ulrich Drepper <drepper@redhat.com>
9232 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9233 (lll_futex_timed_wait): Use int for futex value parameter.
9234 (lll_futex_wake): Likewise.
9235 (lll_futex_requeue): Likewise.
9237 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9238 Replace one memory operation with one register operation.
9240 * tst-join4.c (do_test): Fix error message.
9242 * tst-rwlock6.c (do_test): Use correct format specifier.
9244 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9245 (__lll_mutex_lock_wait): Replace one memory operation with one
9247 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
9248 (__lll_mutex_lock_wait): Likewise.
9250 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9251 (__lll_mutex_cond_lock): Add one to value parameter of
9252 __lll_lock_wait to reflect reality in the futex syscall.
9253 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9254 (lll_mutex_cond_lock): Likewise.
9256 2003-05-30 Jakub Jelinek <jakub@redhat.com>
9258 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
9260 (lll_mutex_cond_lock): Define.
9262 2003-05-29 Ulrich Drepper <drepper@redhat.com>
9264 * Makefile (tests): Add tst-signal6.
9265 * tst-signal6.c: New file.
9267 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
9268 (__lll_mutex_unlock_force): New function
9269 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9271 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9272 (__lll_mutex_unlock_force): New function.
9273 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9275 * tst-rwlock7.c (do_test): Use correct format specifier.
9277 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
9278 Find break parameter in correct asm argument.
9280 2003-05-27 Jakub Jelinek <jakub@redhat.com>
9282 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
9284 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
9286 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9288 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
9289 lll_futex_requeue, lll_mutex_unlock_force): Define.
9291 2003-05-30 Jakub Jelinek <jakub@redhat.com>
9293 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9294 (pthread_cond_t): Add __mutex.
9295 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
9296 lll_futex_requeue, lll_mutex_unlock_force): Define.
9298 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9300 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
9301 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
9303 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
9305 (lll_futex_wait, lll_futex_wake): Define.
9306 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
9307 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
9308 FUTEX_REQUEUE instead of FUTEX_WAIT.
9309 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
9310 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
9311 mutex which was used in condvar structure. Call
9312 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
9313 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
9315 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
9316 include tcb-offsets.h. Read wakeup value in locked region.
9317 Use the value of gbr register as THREAD_ID.
9318 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9319 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9320 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9322 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
9325 2003-05-28 Ulrich Drepper <drepper@redhat.com>
9327 * sysdeps/pthread/pthread_cond_broadcast.c
9328 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
9330 2003-05-26 Ulrich Drepper <drepper@redhat.com>
9332 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
9333 typo in register name.
9334 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
9335 correctly. Actually use requeue. Little optimization.
9336 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
9337 mutex address early. Handle cancellation state as 32-bit value.
9338 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9339 Remove unnecessary label.
9341 2003-05-25 Ulrich Drepper <drepper@redhat.com>
9343 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
9344 instead of FUTEX_WAIT.
9345 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
9346 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9347 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9348 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
9349 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9350 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
9351 used in condvar structure. Call __pthread_mutex_cond_lock instead
9352 of __pthread_mutex_lock_internal.
9353 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9354 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9355 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9356 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
9357 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9358 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9359 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
9360 Add pthread_mutex_cond_lock.
9361 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
9362 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
9363 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
9364 lll_mutex_cond_lock.
9365 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
9366 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9367 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9369 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9370 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9372 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
9373 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9375 * pthreadP.h: Declare __pthread_mutex_cond_lock.
9376 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
9377 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
9378 macro don't define aliases.
9380 * cancellation.c: Remove __pthread_enable_asynccancel_2.
9381 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
9382 * sysdeps/pthread/pthread_cond_timedwait.c: Use
9383 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
9384 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9385 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9386 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9387 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9388 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9390 2003-05-17 Ulrich Drepper <drepper@redhat.com>
9392 * sem_open.c: Fix one endless loop. Implement correct semantics
9393 wrt opening the same semaphore more then once.
9394 * sem_close.c: Adjust for sem_open change.
9395 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
9396 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
9397 * Makefile (tests): Add tst-sem7.
9398 * tst-sem7.c: New file.
9400 2003-05-16 Roland McGrath <roland@redhat.com>
9402 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
9403 uninitialized variable braino.
9405 2003-05-16 Ulrich Drepper <drepper@redhat.com>
9407 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
9408 test for syscall availability.
9410 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
9411 __no_posix_timers to -1 if the syscalls don't exist.
9413 * pthread_join.c (pthread_join): Set tid field of the joined
9414 thread to -1. This isn't necessary but helps to recognize some
9415 error conditions with almost no cost.
9417 * allocatestack.c (FREE_P): Also negative values indicate an
9420 * unwind.c: Include <unistd.h>.
9422 2003-05-14 Ulrich Drepper <drepper@redhat.com>
9424 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9426 2003-05-14 Jakub Jelinek <jakub@redhat.com>
9428 * Makefile (crti-objs, crtn-objs): New variables.
9429 (omit-deps, extra-objs): Add crtn.
9430 ($(objpfx)libpthread.so): Depend on both crti and crtn
9431 and links to them in multidir.
9432 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9434 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
9436 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9437 (lll_mutex_unlock): Use atomic_exchange_rel.
9439 2003-05-11 Ulrich Drepper <drepper@redhat.com>
9441 * cond-perf.c (cons): Add missing locking around setting of alldone.
9443 2003-05-10 Ulrich Drepper <drepper@redhat.com>
9445 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9447 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9449 2003-05-09 Ulrich Drepper <drepper@redhat.com>
9451 * tst-sem6.c: New file.
9452 * Makefile (tests): Add tst-sem6.
9454 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9455 Use atomic_exchange_rel instead of atomic_exchange.
9456 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9459 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9460 code for lll_futex_wait and lll_futex_wake in static apps. Use
9461 vsyscall is possible.
9463 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9464 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9465 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9466 pthread_setaffinity_np.
9467 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9468 and pthread_setaffinity_np.
9469 * Makefile (libpthread-routines): Add pthread_getaffinity and
9470 pthread_setaffinity.
9472 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9473 use it in case mmap to allocate the stack fails.
9474 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9475 ARCH_MAP_FLAGS here.
9476 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9479 2003-05-08 Ulrich Drepper <drepper@redhat.com>
9481 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9482 handler implementation. It is now lockless in fork().
9483 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9484 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9485 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
9486 declare the __fork_*_lists.
9487 (struct fork_handler): Include pointers to all three functions.
9488 Add next, refcntr and need_signal elements.
9489 (__fork_handlers): New declaration.
9490 (__register_atfork_malloc): Remove declaration.
9491 (HAVE_register_atfork_malloc): Remove definition.
9492 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9493 __pthread_child_handler variable.
9494 (__libc_pthread_init): Use __register_atfork instead of explicitly
9496 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9498 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9500 * unwind.c (unwind_cleanup): Print error message and then abort. This
9501 function must never be reached.
9503 * cond-perf.c: New file.
9505 2003-05-05 Ulrich Drepper <drepper@redhat.com>
9507 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9509 2003-05-04 Roland McGrath <roland@redhat.com>
9511 * Makefile ($(objpfx)../libc.so): New target.
9513 2003-05-02 Ulrich Drepper <drepper@redhat.com>
9515 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9516 (pthread_condattr_t): Size is only an int, don't use long for
9518 (pthread_mutexattr_t): Likewise.
9519 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9520 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9521 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9523 2003-05-01 Ulrich Drepper <drepper@redhat.com>
9525 * sysdeps/i386/tls.h: Define THREAD_ID.
9526 * sysdeps/ia64/tls.h: Likewise.
9527 * sysdeps/powerpc/tls.h: Likewise.
9528 * sysdeps/s390/tls.h: Likewise.
9529 * sysdeps/sh/tls.h: Likewise.
9530 * sysdeps/x86_64/tls.h: Likewise.
9531 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9533 * pthread_mutex_timedlock.c: Likewise.
9534 * pthread_mutex_trylock.c: Likewise.
9535 * pthread_mutex_unlock.c: Likewise.
9536 * pthread_rwlock_trywrlock.c: Likewise.
9537 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9538 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9539 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9540 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9542 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9545 2003-04-29 Jakub Jelinek <jakub@redhat.com>
9547 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9548 (__SIZEOF_PTHREAD_COND_T): Define to 48.
9549 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9550 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9551 Make __align long long instead of long.
9552 (pthread_rwlock_t): Formatting.
9553 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9554 (pthread_rwlock_t): Formatting.
9555 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9556 (pthread_cond_t): Make __align long long instead of long.
9557 (pthread_rwlock_t): Move __flags field to the same position as in
9560 2003-04-30 Ulrich Drepper <drepper@redhat.com>
9562 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9563 * tst-rwlock7.c (do_test): Likewise.
9565 2003-04-26 Roland McGrath <roland@redhat.com>
9567 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9569 2003-04-22 Jakub Jelinek <jakub@redhat.com>
9571 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9572 sizeof (struct pthread).
9573 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9575 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9577 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9579 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9581 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9583 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9585 (NO_TLS_OFFSET): Define.
9586 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9587 add TLS_TCB_SIZE unnecessarily.
9589 2003-04-22 Roland McGrath <roland@redhat.com>
9591 * Makeconfig (shared-thread-library): Reverse link order to work
9594 2003-04-22 Ulrich Drepper <drepper@redhat.com>
9596 * semaphore.h: Fix typo in comment.
9598 2003-04-21 Ulrich Drepper <drepper@redhat.com>
9600 * sysdeps/pthread/sigfillset.c: New file.
9602 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9603 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9604 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9605 * sysdeps/pthread/sigaction.c: Likewise.
9606 * sysdeps/pthread/sigprocmask.c: New file.
9607 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9609 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9610 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9613 2003-04-19 Ulrich Drepper <drepper@redhat.com>
9615 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9616 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9618 * sysdeps/unix/sysv/linux/unregister-atfork.c
9619 (__unregister_atfork): Don't free memory not allocated dynamically.
9621 * semaphore.h: Remove __THROW marker from cancellation points.
9622 * nptl/sysdeps/pthread/pthread.h: Likewise.
9624 2003-04-18 Ulrich Drepper <drepper@redhat.com>
9626 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9627 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9630 2003-04-16 Jakub Jelinek <jakub@redhat.com>
9632 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9634 2003-04-15 Roland McGrath <roland@redhat.com>
9636 * forward.c (__pthread_unwind): Tweak to avoid warning.
9638 2003-04-15 Ulrich Drepper <drepper@redhat.com>
9640 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9642 2003-04-14 Ulrich Drepper <drepper@redhat.com>
9644 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9645 overflow CFA advance instructions.
9646 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9648 2003-04-14 Jakub Jelinek <jakub@redhat.com>
9650 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9651 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9652 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9655 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9656 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9657 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9658 DW_CFA_advance_loc for .Laddl-.Lsubl.
9660 2003-04-13 Ulrich Drepper <drepper@redhat.com>
9662 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9663 position-independent unwind data for static libraries.
9664 Add missing unwind info. Add comments.
9666 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9667 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9668 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9669 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9671 2003-04-12 Ulrich Drepper <drepper@redhat.com>
9673 * Makefile: Make sure all cancellation points are compiled with
9674 exception and asynchronous unwind tables.
9676 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9677 which mishandles loading of global object addresses in PIC.
9678 (THREAD_SETMEM_NC): Likewise.
9680 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9682 * pthread.h: Define new data structure for cleanup buffer. Declare
9683 new cleanup handler interfaces.
9684 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9685 (struct pthread): Add cleanup_jmp_buf pointer. Define
9686 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9687 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9688 it. Declare old cleanup handler installation functions.
9689 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9691 * cleanup_defer.c: Likewise.
9692 * cleanup_compat.c: New file. Old cleanup code.
9693 * cleanup_def_compat.c: New file. Old cleanup code.
9694 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9695 if own thread descriptor.
9696 * unwind.c: New file.
9697 * forward.c: Add __pthread_unwind.
9698 * init.c (pthread_functions): Add __pthread_unwind.
9699 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9700 Add ptr___pthread_unwind.
9701 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9702 and unwind function.
9703 * Makefile (libpthread-routines): Add cleanup_compat,
9704 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9705 table generation if necessary.
9706 * version.c: Record whether unwind support is compiled in.
9707 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9708 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9710 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9711 complication to generate unwind information for syscall wrappers.
9712 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9713 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9714 __cleanup_fct_attribute.
9716 * Makefile: Add rules to build and run tst-cleanup0.
9717 * tst-cleanup0.c: New file.
9718 * tst-cleanup0.expect: New file.
9720 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9721 caller. Optimize to avoid often unecessary local variable.
9723 2003-04-11 Roland McGrath <roland@redhat.com>
9725 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9726 sets variable `multidir'; include that.
9727 (generated): Add it.
9728 ($(objpfx)$(multidir)/crti.o): New target.
9729 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9731 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9733 * tst-attr2.c (do_test): Add cast to avoid warning.
9734 * tst-mutex4.c (do_test): Likewise.
9736 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9738 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9741 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9743 * Makefile (tests): Add tst-detach1.
9744 * tst-detach1.c: New file.
9746 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9748 * sysdeps/pthread/pthread.h: Remove duplicate
9749 pthread_cleanup_{push,pop} definitions.
9751 * tst-barrier2.c: Eliminate warnings.
9752 * tst-cancel4.c: Likewise.
9753 * tst-cond4.c: Likewise.
9754 * tst-cond6.c: Likewise.
9755 * tst-detach1.c: Likewise.
9756 * tst-rwlock4.c: Likewise.
9757 * tst-rwlock6.c: Likewise.
9758 * tst-rwlock7.c: Likewise.
9759 * tst-sem3.c: Likewise.
9760 * tst-spin2.c: Likewise.
9761 * tst-umask1.c: Likewise.
9763 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9765 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9767 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9769 * descr.h (struct pthread): Move cancelhandling member to the front.
9771 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9773 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9774 malloc_parent, and malloc_child statically.
9775 (__register_atfork_malloc): New function.
9776 (free_mem): Don't free any of the malloc_* variables on the list.
9777 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9778 Define HAVE_register_atfork_malloc.
9780 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9782 * sysdeps/pthread/createthread.c (create_thread): Add some more
9783 comments explaining when to set multiple_threads and when not.
9785 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9786 THREAD_ATOMIC_BIT_SET if not already defined.
9787 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9788 THREAD_ATOMIC_BIT_SET:
9789 * sysdeps/x86_64/tls.h: Likewise.
9790 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9791 THREAD_ATOMIC_CMPXCHG_VAL.
9792 (_pthread_cleanup_pop_restore): Likewise.
9793 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9794 (__pthread_enable_asynccancel_2): Likewise.
9795 (__pthread_disable_asynccancel): Likewise.
9796 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9797 (__libc_disable_asynccancel): Likewise.
9798 * init.c (sigcancel_handler): Likewise.
9799 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9800 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9802 2003-04-03 Ulrich Drepper <drepper@redhat.com>
9804 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9805 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9806 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9807 * Makefile (tests): Add tst-cancel11.
9808 * tst-cancel11.c: New file.
9810 2003-04-01 Ulrich Drepper <drepper@redhat.com>
9812 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9813 round, not the first. Use specific_used flag instead of local
9814 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9815 (__free_tcb): Don't call deallocate_tsd here.
9816 (start_thread): Call deallocate_tsd here.
9817 * pthread_setspecific.c: Set specific_used flag really only when
9819 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9820 * tst-tsd3.c: New file.
9821 * tst-tsd4.c: New file.
9823 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9825 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9826 Use atomic_exchange_and_add instead of __lll_add.
9827 (__lll_mutex_timedlock): Likewise.
9828 Patch by Ian Wienand.
9830 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9832 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9833 (SINGLE_THREAD_P): Fix typo.
9834 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9836 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9838 * Makefile (tests): Add tst-align.
9839 * tst-align.c: New file.
9840 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9842 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9845 * tst-tsd2.c: Add casts to avoid warnings.
9847 2003-03-30 Ulrich Drepper <drepper@redhat.com>
9849 * descr.h (struct pthread): Move most often used elements to the front.
9851 2003-03-29 Ulrich Drepper <drepper@redhat.com>
9853 * Makefile (libpthread-routines): Add pthread_atfork.
9854 (libpthread-static-only-routines): Add pthread_atfork.
9856 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9858 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9860 (INSTALL_DTV): Add parens.
9861 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9862 Use passed descr instead of THREAD_SELF.
9863 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9864 (__lll_mutex_timedlock_wait): Correct expected value after
9866 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9867 Release lock before waking up the waiters.
9868 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9869 criteria. Reorderstruct passed to cleanup handler. Fix
9870 handling of cancellation and failung pthread_mutex_unlock call.
9871 Use __pthread_enable_asynccancel_2 instead of
9872 __pthread_enable_asynccancel.
9873 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9874 Return result of lock re-get if it fails.
9875 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9876 for __pthread_cleanup_push.
9877 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9878 completely broken rwlock implementation.
9879 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9880 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9881 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9882 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9883 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9884 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9885 versioned_symbol macro.
9886 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9887 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9889 2003-03-27 Ulrich Drepper <drepper@redhat.com>
9891 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9892 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9894 (struct timer): Remove th and bar field.
9895 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9896 debugging code. Create only one helper thread.
9897 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9899 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9900 Renamed. Define statically. Use thread info from siginfo.
9901 (__helper_once): New variable.
9902 (__helper_tid): New variable.
9903 (__reset_helper_control): New function.
9904 (__start_helper_thread): New function.
9906 * pthread_create.c (start_thread): Don't use setjmp inside
9907 __builtin_expect to work around gcc bug.
9909 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9910 timer_delete syscall fails, but not with ENOSYS, set
9913 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9914 (timer_settime): Fix typo.
9915 * sysdeps/unix/sysv/linux/timer_getoverr.c
9916 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9918 2003-03-27 Jakub Jelinek <jakub@redhat.com>
9920 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9921 offset of cleanupbuf.__prev.
9923 2003-03-26 Jakub Jelinek <jakub@redhat.com>
9925 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9928 2003-03-26 Ulrich Drepper <drepper@redhat.com>
9930 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9931 NULL provide default definition to syscall.
9933 2003-03-25 Roland McGrath <roland@redhat.com>
9935 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9936 (timer_id2ptr): Fix typo.
9938 2003-03-25 Ulrich Drepper <drepper@redhat.com>
9940 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9941 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9942 * sysdeps/ia64/pthreaddef.h: Likewise.
9943 * sysdeps/powerpc/pthreaddef.h: Likewise.
9944 * sysdeps/s390/pthreaddef.h: Likewise.
9945 * sysdeps/sh/pthreaddef.h: Likewise.
9946 * sysdeps/x86_64/pthreaddef.h: Likewise.
9947 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9948 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9950 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9951 SIGTIMER is not unblocked.
9952 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9954 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9956 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9957 pass pointer through as ID.
9958 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9959 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9960 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9961 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9962 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9963 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9964 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9965 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9966 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9967 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9968 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9969 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9970 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9971 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9972 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9973 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9974 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9975 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9976 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9977 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9978 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9979 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9980 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9981 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9982 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9983 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9984 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9985 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9986 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9987 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9988 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9989 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9990 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9992 * pthreadP.h: Remove FRAME_LEFT definition.
9993 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9994 already left frame. Programs which have this problem are not POSIX
9996 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9998 2003-03-24 Ulrich Drepper <drepper@redhat.com>
10000 * sysdeps/pthread/tst-timer.c: Check return values of the
10003 2003-03-23 Roland McGrath <roland@redhat.com>
10005 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
10006 * tst-tls3mod.c: Likewise.
10007 * tst-tls1.c: Likewise.
10008 * tst-tls2.c: Likewise.
10010 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
10011 undefined behavior.
10013 * tst-join5.c (tf1, tf2): Add a cast.
10015 * Makeconfig (includes): Append -I$(..)nptl to this variable.
10017 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
10018 Don't test anything.
10019 * tst-cond4.c: Likewise.
10020 * tst-cond6.c: Likewise.
10021 * tst-flock2.c: Likewise.
10022 * tst-mutex4.c: Likewise.
10023 * tst-rwlock4.c: Likewise.
10024 * tst-signal1.c: Likewise.
10025 * tst-spin2.c: Likewise.
10026 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
10028 * tst-mutex4.c: Use test-skeleton.c.
10029 * tst-spin2.c: Likewise.
10030 * tst-sysconf.c: Likewise.
10031 * tst-barrier2.c: Likewise.
10032 * tst-cond4.c: Likewise.
10033 * tst-cond6.c: Likewise.
10034 * tst-rwlock4.c: Likewise.
10035 * tst-unload.c: Likewise.
10036 * tst-flock2.c (do_test): Use return instead of exit.
10038 2003-03-22 Jakub Jelinek <jakub@redhat.com>
10040 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
10042 2003-03-21 Ulrich Drepper <drepper@redhat.com>
10044 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
10045 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
10046 instead of __lll_compare_and_swap.
10047 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
10049 Removed definition if __lll_compare_and_swap.
10051 * cancellation.c: Adjust for new form of compare&exchange macros.
10052 * cleanup_defer.c: Likewise.
10053 * init.c: Likewise.
10054 * libc-cancellation.c: Likewise.
10055 * old_pthread_cond_broadcast.c: Likewise.
10056 * old_pthread_cond_signal.c: Likewise.
10057 * old_pthread_cond_timedwait.c: Likewise.
10058 * old_pthread_cond_wait.c: Likewise.
10059 * pthread_cancel.c: Likewise.
10060 * pthread_create.c: Likewise.
10061 * pthread_detach.c: Likewise.
10062 * pthread_join.c: Likewise.
10063 * pthread_key_delete.c: Likewise.
10064 * pthread_setcancelstate.c: Likewise.
10065 * pthread_setcanceltype.c: Likewise.
10066 * pthread_timedjoin.c: Likewise.
10067 * pthread_tryjoin.c: Likewise.
10068 * sysdeps/pthread/createthread.c: Likewise.
10070 2003-03-20 Ulrich Drepper <drepper@redhat.com>
10072 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
10073 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
10074 definitions. Replace uses with calls to atomic_* functions.
10075 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
10076 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
10077 __lll_test_and_set calls with atomic_exchange_and_add and
10078 atomic_exchange calls respectively.
10079 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
10080 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
10081 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
10082 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
10083 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
10084 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
10085 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
10087 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
10088 returns the old value.
10090 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
10092 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
10093 int for variable OLDVAL and correct inline assembler contraint.
10094 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
10095 type int for variable OLD.
10097 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
10099 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10100 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
10101 instead of multiple_threads field in the TCB.
10103 2003-03-19 Ulrich Drepper <drepper@redhat.com>
10105 * sysdeps/i386/i686/bits/atomic.h: Removed.
10106 * sysdeps/i386/i586/bits/atomic.h: Removed.
10107 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
10108 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
10109 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
10110 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
10111 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
10112 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
10113 * atomic.h: Removed. Moved to glibc.
10115 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
10116 support for clock selection.
10118 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
10119 signalling waiters.
10121 2003-03-18 Roland McGrath <roland@redhat.com>
10123 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10124 Add __lll_rel_instr first. Add memory clobber.
10125 (lll_mutex_unlock): Use __lll_test_and_set.
10126 From Paul Mackerras <paulus@samba.org>.
10128 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
10130 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10131 (SINGLE_THREAD_P): Add `header.' prefix.
10132 From Paul Mackerras <paulus@samba.org>.
10134 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
10135 pthread_timedjoin_np to ...
10136 (libpthread: GLIBC_2.3.3): ... here.
10137 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
10139 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10140 Avoid shadowing VAL variable.
10142 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10145 2003-03-18 Ulrich Drepper <drepper@redhat.com>
10147 * Makefile (tests): Add tst-cond11.
10148 * tst-cond11.c: New file.
10150 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
10151 struct passed to cleanup handler to eliminate one more
10153 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10155 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10156 (pthrad_cond_t): Replace __unused field with __clock.
10158 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
10159 waken all waiters in cleanup handler.
10160 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10161 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10163 * pthread_condattr_getclock.c: New file.
10164 * pthread_condattr_setclock.c: New file.
10165 * sysdeps/pthread/pthread.h: Declare these new functions.
10166 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
10167 * Makefile (libpthread-routines): Add the new functions.
10168 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
10169 Renamed field to value. Document use of the bits.
10170 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
10172 * pthread_condattr_setpshared.c: Likewise.
10173 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
10174 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
10175 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10177 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
10178 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
10179 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
10180 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
10181 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
10182 Implement clock selection.
10183 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10184 * pthread-errnos.sym: Add ENOSYS.
10185 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10186 _POSIX_CLOCK_SELECTION.
10187 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10189 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
10190 invalid .size directive.
10192 2003-03-17 Roland McGrath <roland@redhat.com>
10194 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
10197 2003-03-17 Ulrich Drepper <drepper@redhat.com>
10199 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
10200 Use __lll_add instead of spelling it out. Use protected symbol names.
10201 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
10203 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
10204 Renamed from lll_compare_and_swap. Use new name where necessary.
10205 (__lll_add): Defined.
10206 (__lll_dec_if_positive): Defined.
10207 (__lll_test_and_set): Defined.
10208 * sysdeps/ia64/pthread_spin_init.c: Removed.
10209 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
10210 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
10211 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
10212 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
10213 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
10214 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
10215 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
10216 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
10217 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
10218 __sync_lock_release_si.
10219 Patch by Jakub Jelinek.
10221 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
10222 Fix timeout handling.
10223 (__lll_timedwait_tid): Likewise.
10224 (lll_unlock_wake_cb): Wake up other waiters if necessary.
10225 Patch by Jakub Jelinek.
10227 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
10229 2003-03-17 Roland McGrath <roland@redhat.com>
10231 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
10232 * sysdeps/pthread/pthread_spin_init.c: New file.
10233 * sysdeps/pthread/pthread_spin_unlock.c: New file.
10234 * sysdeps/powerpc/Makefile: New file.
10235 * sysdeps/powerpc/pthread_spin_lock.c: New file.
10236 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
10237 * sysdeps/powerpc/pthreaddef.h: New file.
10238 * sysdeps/powerpc/tcb-offsets.sym: New file.
10239 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
10240 * sysdeps/powerpc/tls.h: New file.
10241 * sysdeps/powerpc/bits/atomic.h: New file.
10242 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
10243 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
10244 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
10246 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
10247 * sysdeps/unix/sysv/linux/sem_post.c: New file.
10248 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
10249 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
10250 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
10251 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
10252 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
10253 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
10254 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
10255 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
10256 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
10257 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
10258 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
10259 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
10260 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
10262 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
10264 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
10265 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10266 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
10267 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
10268 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10270 2003-03-17 Ulrich Drepper <drepper@redhat.com>
10272 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
10273 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10274 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10275 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10276 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
10278 2003-03-16 Roland McGrath <roland@redhat.com>
10280 * tst-fork4.c: Include <string.h>.
10281 * tst-signal2.c: Likewise.
10282 * tst-mutex5.c (do_test): exit -> return.
10283 * tst-mutex2.c: Include <stdlib.h>.
10285 2003-03-16 Ulrich Drepper <drepper@redhat.com>
10287 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10288 (__lll_mutex_timedlock_wait): Correct expected value after
10289 spurious wakeup. Otherwise we would never wait again.
10291 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
10292 zone versus inline asm stupidity. Use correct instructions.
10294 * tst-rwlock6.c: Add some more status output.
10296 2003-03-15 Roland McGrath <roland@redhat.com>
10298 * sysdeps/pthread/configure.in: New file.
10299 * sysdeps/pthread/configure: New file (generated).
10301 2003-03-15 Ulrich Drepper <drepper@redhat.com>
10303 * allocatestack.c (allocate_stack): Store the exact stack size of
10304 user allocated stacks.
10306 2003-03-15 Jakub Jelinek <jakub@redhat.com>
10308 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
10309 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
10310 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10311 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
10312 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
10313 Use `header.' prefix.
10314 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10316 2003-03-15 Ulrich Drepper <drepper@redhat.com>
10318 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
10319 __builtin_frame_address, use stack pointer.
10321 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
10322 instead of __builtin_frame_pointer.
10324 2003-03-14 Ulrich Drepper <drepper@redhat.com>
10326 * tst-basic1.c (do_test): Add cast to avoid warning.
10327 * tst-basic2.c (do_test): Likewise.
10329 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
10330 amount of stack correction.
10332 * tst-fork4.c: Use test-skeleton.c.
10334 2003-03-14 Roland McGrath <roland@redhat.com>
10336 * init.c: Fix typo "#eli" for "#else".
10338 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
10340 * allocatestack.c (__stack_user): Use hidden_data_def.
10341 * pthread_create.c (__pthread_keys): Likewise.
10343 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
10345 2003-03-14 Roland McGrath <roland@redhat.com>
10347 * tst-fork4.c: New file.
10348 * Makefile (tests): Add it.
10350 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
10351 we always define the padding space.
10352 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
10353 stopped supporting its own extensions fully.
10354 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
10355 struct also called `header', so `header.multiple_threads' is the field
10356 name to use on all machines.
10357 * allocatestack.c (allocate_stack): Use `header.' prefix.
10358 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10359 * pthread_create.c (__pthread_create_2_1): Likewise.
10360 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
10361 (THREAD_SELF): Likewise.
10362 * sysdeps/x86_64/tls.h: Likewise.
10363 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10364 (SINGLE_THREAD_P): Likewise.
10365 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10366 (SINGLE_THREAD_P): Likewise.
10367 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10368 (SINGLE_THREAD_P): Likewise.
10370 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
10373 2003-03-14 Ulrich Drepper <drepper@redhat.com>
10375 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
10376 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
10378 * pthread_create.c (start_thread): setjmp is expected to return 0.
10380 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
10381 (THREAD_GETMEM_NC): Likewise.
10383 2003-03-13 Ulrich Drepper <drepper@redhat.com>
10385 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
10386 and the size of the stack which must be allocated is a multiple,
10387 allocate one more page.
10388 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
10389 MULTI_PAGE_ALIASING.
10391 2003-03-13 Roland McGrath <roland@redhat.com>
10393 * pthread_create.c (start_thread): Set EXITING_BIT after the
10394 event-reporting (and destructors), not before.
10396 2003-03-13 Jakub Jelinek <jakub@redhat.com>
10398 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
10399 lll_futex_wake): Declare register variables as long int instead of
10400 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
10401 Make syscall arguments clobbered by the syscall.
10402 (lll_futex_wait): Define using lll_futex_timed_wait.
10404 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
10407 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
10408 PPID if [! NDEBUG].
10410 * allocatestack.c (nptl_ncreated): Only declare if
10411 COLORING_INCREMENT != 0.
10413 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10414 (__libc_enable_asynccancel_2): Remove prototype.
10416 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10417 ctid to match kernel.
10419 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10421 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10422 libc_multiple_threads.
10423 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10424 __libc_multiple_threads to...
10425 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
10427 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10429 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10430 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10432 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10433 (__pthread_once_internal): Define.
10435 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10436 macros instead of .symver directly.
10437 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10438 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10440 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10441 * sysdeps/x86_64/tcb-offsets.sym: New file.
10442 * sysdeps/x86_64/Makefile: New file.
10444 * sysdeps/i386/tcb-offsets.sym: Add SELF.
10445 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10446 to access own pthread_t in TCB.
10447 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10449 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10451 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10453 2003-03-12 Roland McGrath <roland@redhat.com>
10455 * pthread-errnos.sym: New file.
10456 * Makefile (gen-as-const-headers): New variable, list that file.
10457 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10458 header <pthread-errnos.h> instead of defining errno values here.
10459 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10460 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10461 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10462 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10463 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10465 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10467 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10468 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10469 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10470 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10471 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10472 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10473 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10474 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10475 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10476 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10477 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10478 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10479 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10480 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10481 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10482 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10483 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10484 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10485 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10486 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10487 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10488 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10489 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10490 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10491 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10492 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10493 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10495 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10496 CLONE_CHILD_SETTID worked.
10498 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10500 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10502 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10505 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10506 (pthread_cond_t): Add padding.
10508 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10509 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10510 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10512 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10513 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10514 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10515 (__pthread_rwlock_timedrdlock): Likewise.
10516 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10517 (__pthread_rwlock_wrlock): Likewise.
10518 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10519 (__pthread_rwlock_rdlock): Likewise.
10521 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10523 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10524 result of lock re-get if it fails.
10526 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10528 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10529 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10530 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10531 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10532 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10533 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10534 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10535 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10536 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10537 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10539 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10540 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10542 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10543 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10544 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10545 (create_thread): Likewise.
10546 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10547 * init.c (__pthread_initialize_minimal_internal): Initialize
10548 __libc_multiple_threads_ptr if necessary.
10549 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
10550 __pthread_multiple_threads and __libc_multiple_threads_ptr.
10551 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10552 __libc_multiple_threads.
10553 (__libc_pthread_init): Return pointer to __libc_pthread_init if
10556 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10557 (THREAD_SETMEM_NC): Likewise.
10559 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10560 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10561 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10562 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10564 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10565 Eliminate one entire instruction.
10567 * cancellation.c (__pthread_enable_asynccancel_2): New function.
10568 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10569 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10570 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10571 instead of __pthread_enable_asynccancel.
10572 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10573 (__pthread_cond_wait): Likewise.
10574 * sysdeps/pthread/pthread_cond_timedwait.c
10575 (__pthread_cond_timedwait): Likewise.
10576 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10578 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10579 (__condvar_cleanup): Wake up all waiters in case we got signaled
10580 after being woken up but before disabling asynchronous
10582 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10583 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10584 (__condvar_cleanup): Likewise.
10586 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10587 Make it an error if architecture has no #if case. Add x86-64.
10589 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10590 pt-initfini.s generation.
10592 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10593 (TLS_INIT_TP): Fix typo.
10595 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10597 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10598 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10600 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10601 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10602 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10603 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10604 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10605 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10606 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10607 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10609 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10611 * sysdeps/pthread/pthread_cond_timedwait.c
10612 (__pthread_cond_timedwait): Return the result of the final
10613 locking. If it succeeds, the regular function return value.
10615 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10616 Return result of the final locking.
10617 * version.c (__nptl_main): Work around problems with the strange
10618 INTERNAL_SYSCALL macro on ppc32.
10619 * init.c (__pthread_initialize_minimal_internal): Unblock
10620 SIGCANCEL in case the parent blocked it.
10621 Reported by Paul Mackerras <paulus@samba.org>.
10623 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10624 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10625 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10627 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10629 * sysdeps/pthread/pthread_cond_timedwait.c
10630 (__pthread_cond_timedwait): Unlock and fail if
10631 __pthread_mutex_unlock_internal failed.
10633 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10634 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10636 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10637 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10638 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10639 ALLOCATE_STACK): New macros.
10640 (TLS_TPADJ): New macro.
10641 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10642 (allocate_stack): Handle TLS_DTV_AT_TP and
10643 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10644 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10645 Don't set PD->self.
10646 * init.c [__ia64__] (__NR_set_tid_address): Define.
10648 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10649 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10650 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10651 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10652 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10653 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10654 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10655 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10656 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10657 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10658 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10659 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10660 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10661 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10662 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10663 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10664 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10665 * sysdeps/ia64/bits/atomic.h: New file.
10666 * sysdeps/ia64/Makefile: New file.
10667 * sysdeps/ia64/pthread_spin_init.c: New file.
10668 * sysdeps/ia64/pthread_spin_lock.c: New file.
10669 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10670 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10671 * sysdeps/ia64/pthreaddef.h: New file.
10672 * sysdeps/ia64/tcb-offsets.sym: New file.
10673 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10674 * sysdeps/ia64/tls.h: New file.
10676 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10677 to syscall instead of no arguments.
10679 2003-03-10 Ulrich Drepper <drepper@redhat.com>
10681 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10682 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10683 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10684 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10686 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10689 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10691 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10692 lowlevelbarrier.sym.
10693 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10694 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10695 Include lowlevelbarrier.h and don't define offsets locally.
10696 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10698 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10699 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10700 (__lll_mutex_timedlock_wait): Likewise.
10701 (lll_mutex_lock): Adjust asm for that.
10702 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10703 (lll_lock): Adjust asm for operand order change.
10704 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10705 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10707 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10708 Reverse order of parameters.
10709 (__lll_timedwait_tid): Remove regparms attribute.
10710 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10711 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10713 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10714 (__lll_timedwait_tid): Remove one unnecessary instruction.
10716 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10717 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10718 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10721 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10722 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10724 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10727 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10728 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10730 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10731 define LOCK here (if UP is not defined). The actual code is in
10734 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10735 LOCK is already defined. Don't define lll_unlock_wake_cb and
10736 __lll_timedwait_tid for libc.so.
10737 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10738 define LOCK here (if UP is not defined). The actual code is in
10741 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10742 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10743 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10744 instead of lowlevelsem.h.
10745 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10746 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10747 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10749 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10750 lowlevelrwlock.sym.
10751 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10752 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10753 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10755 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10757 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10758 last changed. D'oh.
10760 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10762 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10763 of __libc_locking_needed.
10764 (lll_trylock): Initialize %eax to zero.
10766 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10767 pthread_cond_t definition.
10769 2003-03-10 Roland McGrath <roland@redhat.com>
10771 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10772 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10773 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10774 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10775 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10777 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10778 Instead of setting PD->multiple_threads, set globals
10779 __pthread_multiple_threads and __libc_multiple_threads.
10780 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10781 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10782 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10784 * descr.h (struct pthread): Conditionalize first member on
10785 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10786 containing an anonymous tcbhead_t. Move `list' member out.
10787 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10788 * allocatestack.c: Remove use of `header.data.' prefix.
10789 * pthread_create.c: Likewise.
10790 * init.c (__pthread_initialize_minimal_internal): Likewise.
10791 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10792 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10793 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10794 * sysdeps/x86_64/tls.h: Likewise.
10795 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10796 (SINGLE_THREAD_P): Likewise.
10797 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10798 (SINGLE_THREAD_P): Likewise.
10799 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10800 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10802 2003-03-09 Ulrich Drepper <drepper@redhat.com>
10804 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10806 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10807 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10809 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10810 leftovers from the ia32 code.
10812 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10814 (clear_once_control): Don't load %esi.
10816 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10819 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10821 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10822 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10824 * Makefile (tests): Add tst-cond10.
10825 * tst-cond10.c: New file.
10827 2003-03-08 Ulrich Drepper <drepper@redhat.com>
10829 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10830 * tst-signal3.c (do_test): Likewise.
10831 * tst-sem5.c (do_test): Likewise.
10832 * tst-kill6.c (do_test): Likewise.
10833 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10835 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10837 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10838 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10839 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10840 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10841 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10842 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10843 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10845 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10847 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10848 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10849 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10850 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10851 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10852 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10853 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10854 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10856 * allocatestack.c (allocate_stack): If mprotect() fails free the
10859 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10861 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10863 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10864 lll_wake_tid. This was used only to work around kernel limits in
10866 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10867 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10868 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10869 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10871 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10872 (__pthread_initialize_minimal_internal): Change initialization of
10873 __static_tls_align_m1 appropriately.
10874 * pthreadP.h (__static_tls_align_m1): Renamed from
10875 __static_tls_align.
10876 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10877 instead of __static_tls_align-1.
10879 2003-03-04 Ulrich Drepper <drepper@redhat.com>
10881 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10883 * pthread_create.c: Define __pthread_keys using nocommon
10884 attribute, not by placing it explicitly in bss.
10885 Remove DEFINE_DEALLOC definition. Not needed anymore.
10887 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10888 Use it in mmap call to allocate stacks.
10890 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10892 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10893 result of the thread function.
10895 2003-03-03 Ulrich Drepper <drepper@redhat.com>
10897 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10898 version is just fine.
10900 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10901 (__pthread_child_handler): Renamed from pthread_child_handler,
10902 exported, and marked hidden. Change all users.
10903 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10904 free __pthread_child_handler from child list.
10906 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10908 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10910 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10911 Fix handling of cancellation and failing pthread_mutex_unlock call.
10912 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10913 (__pthread_cond_wait): Likewise.
10915 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10916 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10917 lll_futex_timed_wait call.
10918 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10919 (pthread_rwlock_timedwrlock): Likewise.
10921 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10922 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10923 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10925 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10926 check of lll_futex_wake return value.
10928 2003-03-03 Roland McGrath <roland@redhat.com>
10930 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10932 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10933 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10934 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10936 2003-03-02 Ulrich Drepper <drepper@redhat.com>
10938 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10939 error for CPU clocks.
10941 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10942 _POSIX_MONOTONIC_CLOCK.
10943 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10945 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10948 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10950 * descr.h (struct pthread): Move cleanup field to the front.
10952 2003-03-01 Roland McGrath <roland@redhat.com>
10954 * sem_open.c (sem_open): Braino fix.
10956 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10958 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10959 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10960 __pthread_cleanup_pop functionality.
10961 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10963 * descr.h (struct pthread): Move tid field to the front now that
10966 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10967 (__lll_mutex_timedlock_wait): Remove.
10968 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10969 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10970 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10971 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10972 (lll_unlock_wake_cb): Don't save and restore %esi.
10973 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10975 (__lll_timedwait_tid): Add alignment.
10976 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10977 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10979 (__lll_timedwait_tid): Removed.
10980 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10981 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10982 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10983 (pthread_barrier_wait): Don't save, load, and restore %esi for
10985 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10986 (__pthread_cond_signal): Don't save, load, and restore %esi.
10987 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10988 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10989 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10990 Don't save, load, and restore %esi.
10992 2003-02-27 Ulrich Drepper <drepper@redhat.com>
10994 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10995 Release lock before waking up the waiters.
10997 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10999 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
11000 (reader_thread): Likewise.
11002 * sysdeps/pthread/pthread_rwlock_unlock.c
11003 (__pthread_rwlock_unlock): Release internal lock early. Don't try
11004 to wake up readers if there are none.
11006 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
11007 Release internal lock before wake threads.
11009 2003-02-26 Ulrich Drepper <drepper@redhat.com>
11011 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
11012 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
11014 * tst-rwlock9.c: Likewise.
11015 * tst-rwlock10.c: New file.
11016 * tst-rwlock11.c: New file.
11018 * Makefile (tests): Add tst-dlsym1.
11019 * tst-dlsym1.c: New file.
11021 * init.c (__pthread_initialize_minimal_internal): Set
11022 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
11023 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
11025 2003-02-24 Ulrich Drepper <drepper@redhat.com>
11027 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
11029 * tst-cond2.c: Fix sychronization with child.
11031 * tst-rwlock8.c (reader_thread): Remove unused variable.
11033 * Makefile: Add rules to build and run tst-tls3.
11034 * tst-tls3.c: New file.
11035 * tst-tls3mod.c: New file.
11037 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
11038 * tst-rwlock8.c: New file.
11039 * tst-rwlock9.c: New file.
11040 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
11041 complete broken rwlock implementation.
11042 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11044 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11046 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
11047 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
11048 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
11049 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
11050 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
11051 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
11052 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
11054 2003-02-23 Roland McGrath <roland@redhat.com>
11056 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
11058 2003-02-23 Ulrich Drepper <drepper@redhat.com>
11060 * Makefile (tests): Add tst-context1.
11061 * tst-context1.c: New file.
11063 * Makefile (tests): Add tst-tls1 and tst-tls2.
11064 * tst-tls1.c: New file.
11065 * tst-tls2.c: New file.
11067 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
11068 for failed cmpxchg.
11070 * pthread_create.c (start_thread): Set EXITING_BIT early.
11072 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
11073 (THREAD_GETMEM_NC): Likewise.
11075 2003-02-22 Ulrich Drepper <drepper@redhat.com>
11077 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
11078 off 3 more bytes by using offset-less instructions when possible.
11080 * Makefile: Add dependency for $(objpfx)version.d.
11082 * eintr.c (eintr_source): Add unnecessary return but the compiler
11085 * tst-kill3.c: Include <unistd.h>.
11087 2003-02-21 Roland McGrath <roland@redhat.com>
11089 * pthread_create.c (start_thread): Call __libc_thread_freeres.
11091 2003-02-21 Ulrich Drepper <drepper@redhat.com>
11093 * Makefile (tests): Add tst-eintr1.
11094 (distribute): Add eintr.c.
11095 * tst-eintr1.c: New file.
11096 * eintr.c: New file.
11098 * pthread_cancel.c (pthread_cancel): Use tkill directly.
11100 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
11101 Disallow sending SIGCANCEL.
11103 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
11104 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
11105 * tst-kill1.c: New file.
11106 * tst-kill2.c: New file.
11107 * tst-kill3.c: New file.
11108 * tst-kill5.c: New file.
11109 * tst-kill6.c: New file.
11110 * tst-basic7.c: Renamed to...
11111 * tst-kill4.c: ...this.
11113 2003-02-21 Roland McGrath <roland@redhat.com>
11115 * Makefile (install-lib-ldscripts): New variable.
11117 2003-02-21 Ulrich Drepper <drepper@redhat.com>
11119 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
11120 * pthread_cancel.c: Use INVALID_TD_P.
11121 * pthread_detach.c: Likewise.
11122 * pthread_getschedparam.c: Likewise.
11123 * pthread_setschedparam.c: Likewise.
11124 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
11125 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
11126 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
11127 * pthread_timedjoin.c: Likewise.
11129 * tst-basic7.c: Include <signal.h>.
11131 * pthread_join.c (pthread_join): Limited checking for invalid
11133 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
11135 2003-02-20 Ulrich Drepper <drepper@redhat.com>
11137 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
11138 beginning of the loop. Clear the entire first block of TSD.
11139 * Makefile (tests): Add tst-key4.
11140 * tst-key4.c: New file.
11142 2003-02-18 Ulrich Drepper <drepper@redhat.com>
11144 * Makefile (tests): Add tst-basic7.
11145 * tst-basic7.c: New file.
11147 * pthread_create.c (deallocate_tsd): Mark as internal_function.
11148 Add some more __builtin_expect.
11150 * pthreadP.h: Define dummy version of DEBUGGING_P.
11152 2003-02-17 Ulrich Drepper <drepper@redhat.com>
11154 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
11155 _POSIX_THREAD_PRIORITY_SCHEDULING.
11156 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
11157 _XOPEN_REALTIME_THREADS.
11158 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
11160 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
11161 kernel returns EINVAL for PID <= 0, work around it.
11163 * Makefile (tests): Add tst-signal5.
11164 * tst-signal5.c: New file.
11166 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
11167 and LOGIN_NAME_MAX.
11169 * tst-cancel1.c (tf): Block all signals.
11171 * Makefile (tests): Add tst-basic6.
11172 * tst-basic6.c: New file.
11174 * tst-basic1.c: Add test for process ID.
11176 * Makefile (tests): Add tst-cancel10.
11177 * tst-cancel10.c: New file.
11179 * Makefile (tests): Add tst-signal4.
11180 * tst-signal4.c: New file.
11182 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
11183 __sigismember instead of sigismember. Add __builtin_expect.
11185 2003-02-16 Ulrich Drepper <drepper@redhat.com>
11187 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
11188 pthread_setcancelstate, and pthread_rwlock_setpshared.
11190 * tst-cancel7.c (do_test): Make sure the pid file exists before
11191 canceling the thread.
11193 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
11194 pthread_rwlock_timedrdlock tests.
11195 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
11196 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11197 Check for invalid tv_nsec field.
11198 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11201 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
11202 recursive mutex of overflow.
11204 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
11206 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
11207 going into an endless loop.
11208 * Makefile (tests): Add tst-cancel9.
11209 * tst-cancel9.c: New file.
11211 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
11213 2003-02-15 Ulrich Drepper <drepper@redhat.com>
11215 * tst-mutex5.c (do_test): Add more timedlock tests.
11217 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
11218 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
11220 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
11221 use INLINE_SYSCALL. Error number is returned, not -1.
11223 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
11224 and __deallocate_stack with internal_function.
11225 * pthread_create.c: Adjust definitions appropriately.
11226 * allocatestack.c: Likewise.
11228 * pthread_join.c: Add one more __builtin_expect.
11229 * pthread_timedjoin.c: Likewise.
11231 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
11232 not data of sequence number does not match.
11233 Add one __builtin_expect.
11235 * Makefile (tests): Add tst-clock1.
11236 * tst-clock1.c: New file.
11238 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
11239 negative arguments.
11240 * Makefile (tests): Add tst-basic5.
11241 * tst-basic5.c: New file.
11243 2003-02-14 Ulrich Drepper <drepper@redhat.com>
11245 * Makefile (tests): Add tst-basic4.
11246 * tst-basic4.c: New file.
11248 * pthreadP.h: Add declaraction for __nptl_nthreads.
11249 * pthread_create.c: Define __nptl_nthreads
11250 (start_thread): Increment __nptl_nthreads at beginning. Decrement
11251 after thread is done. If then zero, call exit(0).
11252 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11253 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
11254 * init.c (pthread_functions): Initialize ptr_nthreads.
11255 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
11256 (__reclaim_stacks): Decrement __nptl_nthreads.
11257 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
11259 * Makefile (tests): Add tst-basic3.
11260 * tst-basic3.c: New file.
11262 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
11263 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
11264 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
11265 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
11266 if asynchronous canceling is enabled.
11267 * pthread_join.c (pthread_join): When recognizing circular joins,
11268 take into account the other thread might be already canceled.
11269 * Makefile (tests): Add tst-join5.
11270 * tst-join5.c: New file.
11272 * Makefile (tests): Add tst-join4.
11273 * tst-join4.c: New file.
11275 2003-02-13 Ulrich Drepper <drepper@redhat.com>
11277 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
11279 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
11281 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
11282 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
11283 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
11285 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
11287 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
11288 error if lll_futex_wake failed.
11290 2003-02-13 Ulrich Drepper <drepper@redhat.com>
11292 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
11293 handling of cancellation and failung pthread_mutex_unlock call.
11294 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11295 * Makefile (tests): Add tst-cond8 and tst-cond9.
11296 * tst-cond8.c: New file.
11297 * tst-cond9.c: New file.
11299 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
11301 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
11302 non-standard initializers with __USE_GNU.
11304 * Makefile (tests): Add tst-cleanup3.
11305 * tst-cleanup3.c: New file.
11307 2003-02-12 Ulrich Drepper <drepper@redhat.com>
11309 * Makefile (tests): Add tst-attr1 and tst-attr2.
11310 * tst-attr1.c: New file.
11311 * tst-attr2.c: New file.
11313 * Makefile: Add rules to build and run tst-atfork2 test.
11314 * tst-atfork2.c: New file.
11315 * tst-atfork2mod.c: New file.
11317 * sysdeps/unix/sysv/linux/unregister-atfork.c
11318 (__unregister_atfork): Free the memory allocated for the handlers
11319 after removing them from the lists.
11321 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
11324 * tst-atfork1.c (do_test): Wait for the child we forked.
11325 Report error in child.
11327 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
11329 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
11331 2003-02-10 Ulrich Drepper <drepper@redhat.com>
11333 * Makefile (tests): Add tst-cancel8.
11334 * tst-cancel8.c: New file.
11336 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
11337 clearing of control variable.
11338 * Makefile (tests): Add tst-once3 and tst-once4.
11339 * tst-once3.c: New file.
11340 * tst-once4.c: New file.
11342 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
11344 * sysdeps/sh/Makefile: New file.
11345 * sysdeps/sh/bits/atomic.h: New file.
11346 * sysdeps/sh/pthread_spin_init.c: New file.
11347 * sysdeps/sh/pthread_spin_lock.c: New file.
11348 * sysdeps/sh/pthread_spin_trylock.S: New file.
11349 * sysdeps/sh/pthread_spin_unlock.S: New file.
11350 * sysdeps/sh/pthreaddef.h: New file.
11351 * sysdeps/sh/tcb-offsets.sym: New file.
11352 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
11353 * sysdeps/sh/tls.h: New file.
11354 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
11355 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
11356 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
11357 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
11358 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
11359 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
11360 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
11361 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
11362 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
11363 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
11364 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
11365 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
11366 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
11367 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
11368 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
11369 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
11370 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
11371 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
11372 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
11373 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
11374 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
11375 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
11376 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
11377 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
11378 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
11379 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
11380 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
11381 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
11382 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
11383 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
11385 2003-02-08 Ulrich Drepper <drepper@redhat.com>
11387 * tst-cond2.c: Rearrange code to not rely on behavior undefined
11388 according to POSIX.
11390 * tst-basic2.c (do_test): Lock mutex before creating the thread.
11392 2003-02-07 Ulrich Drepper <drepper@redhat.com>
11394 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
11395 (TLS_GET_FS): New #define.
11396 (TLS_SET_FS): New #define.
11397 Correct value of __NR_set_thread_area.
11399 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
11401 2003-02-06 Ulrich Drepper <drepper@redhat.com>
11403 * Makefile (tests): Add tst-popen1.
11404 * tst-popen1.c: New file.
11406 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
11407 but inactive generalization.
11408 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11409 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11410 Minor optimization, remove one instruction.
11411 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11413 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
11415 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11417 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
11419 * init.c (__NR_set_tid_address): Add #ifdef for s390.
11420 * sysdeps/pthread/pthread_barrier_wait.c: New file.
11421 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11422 * sysdeps/pthread/pthread_cond_signal.c: New file.
11423 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11424 * sysdeps/pthread/pthread_cond_wait.c: New file.
11425 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11426 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11427 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11428 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11429 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11430 * sysdeps/s390/Makefile: New file.
11431 * sysdeps/s390/bits/atomic.h: New file.
11432 * sysdeps/s390/pthread_spin_init.c: New file.
11433 * sysdeps/s390/pthread_spin_lock.c: New file.
11434 * sysdeps/s390/pthread_spin_trylock.c: New file.
11435 * sysdeps/s390/pthread_spin_unlock.c: New file.
11436 * sysdeps/s390/pthreaddef.h: New file.
11437 * sysdeps/s390/tcb-offsets.sym: New file.
11438 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11439 * sysdeps/s390/tls.h: New file.
11440 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11441 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11442 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11443 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11444 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11445 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11446 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11447 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11448 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11449 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11450 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11451 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11452 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11453 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11454 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11455 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11456 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11457 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11458 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11459 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11460 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11461 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11462 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11464 2003-02-04 Ulrich Drepper <drepper@redhat.com>
11466 * atomic.h: Add a couple more default implementations.
11467 (atomic_compare_and_exchange_acq): Use
11468 __arch_compare_and_exchange_32_acq in return value definition. It
11470 (atomic_bit_set): Renamed from atomic_set_bit.
11471 Add missing atomic_ prefixes.
11473 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11474 thread library is available, use correct value to mark initialized
11477 2003-02-03 Ulrich Drepper <drepper@redhat.com>
11479 * allocatestack.c (allocate_stack): Use __getpagesize instead of
11480 __sysconf to determine pagesize.
11482 * pthread_create.c: Include <atomic.h>.
11483 * allocatestack.c (allocate_stack): Implement coloring of the
11484 allocated stack memory. Rename pagesize to pagesize_m1. It's the
11485 size minus one. Adjust users.
11486 * sysdeps/i386/i686/Makefile: New file.
11488 2003-02-02 Ulrich Drepper <drepper@redhat.com>
11490 * allocatestack.c: Improve comment throughout the file.
11492 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11493 (__lll_lock_wait): Add branch prediction.
11494 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11495 (__lll_lock_wait): Likewise.
11496 (lll_unlock_wake_cb): Removed.
11498 2003-01-31 Ulrich Drepper <drepper@redhat.com>
11500 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11501 _POSIX_THREAD_PRIORITY_SCHEDULING.
11503 2003-01-30 Jakub Jelinek <jakub@redhat.com>
11505 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11506 Fix return type of ptr___pthread_getspecific.
11508 2003-01-29 Ulrich Drepper <drepper@redhat.com>
11510 * Makefile (tests): Add tst-umask1.
11511 (tst-umask1-ARGS): Define.
11512 * tst-umask1.c: New file.
11514 2003-01-28 Ulrich Drepper <drepper@redhat.com>
11516 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
11517 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11518 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11519 pthread_rwlock_unlock.
11520 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11521 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11522 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11523 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11524 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11526 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11527 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11529 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11530 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11531 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11533 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11534 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11536 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11537 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11538 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11540 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11541 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11543 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11545 * Makefile (libpthread-routines): Remove lowlevelcond and
11546 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11547 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11548 and pthread_cond_broadcast.
11549 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11550 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11551 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11552 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11553 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11554 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11555 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11556 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11557 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11558 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11559 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11560 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11561 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11562 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11563 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11564 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11565 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11566 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11567 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11568 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11569 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11570 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11571 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11572 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11573 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11574 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11575 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11576 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11577 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11578 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11579 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11581 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11582 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11583 of the code is moved to ...
11584 * sysdeps/pthread/createthread.c: ...here. New file.
11586 2003-01-27 Ulrich Drepper <drepper@redhat.com>
11588 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11589 (__new_sem_post): Clear %eax before returning.
11590 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11592 * Makefile (tests): Add tst-cleanup2.
11593 * tst-cleanup2.c: New file.
11595 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11596 Interpret first parameter correctly.
11598 2003-01-17 Ulrich Drepper <drepper@redhat.com>
11600 * Makefile (headers): Add bits/semaphore.h.
11602 2003-01-16 Jakub Jelinek <jakub@redhat.com>
11604 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11607 2003-01-14 Ulrich Drepper <drepper@redhat.com>
11609 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11610 must be used and mapping failed.
11611 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11613 * Makefile (CFLAGS-pthread_self.os): Define this, not
11614 CFLAGS-pthread_self.c.
11616 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11618 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11619 lll_unlock_wake_cb.
11621 * Makefile (libpthread-routines): Add version. Add rules to build
11622 version.os and banner.h.
11623 * version.c: New file.
11625 2003-01-13 Jakub Jelinek <jakub@redhat.com>
11627 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11628 the alias unconditional.
11629 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11631 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11633 * Makefile (CFLAGS-pthread_self.c): New definition.
11635 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11637 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11638 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11639 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11640 * init.c (__pthread_initialize_minimal_internal): Likewise.
11642 2003-01-07 Jakub Jelinek <jakub@redhat.com>
11644 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11646 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11647 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11648 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11649 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11650 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11651 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11653 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11655 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11656 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11657 * tst-cancel-wrappers.sh: Remove all exceptions.
11659 2003-01-05 Ulrich Drepper <drepper@redhat.com>
11661 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11662 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11664 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11665 Use __libc_pthread_functions array if SHARED.
11667 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11668 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11670 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11671 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11672 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11673 __libc_ptf_call instead of __libc_maybe_call.
11674 (PTF): New #define.
11675 (__libc_cleanup_region_start): Wrap function name with PTF call.
11676 (__libc_cleanup_region_end): Likewise.
11677 (__libc_cleanup_end): Likewise.
11679 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11680 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11681 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11682 * pthreadP.h: Add prototypes.
11684 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11685 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11686 __pthread_rwlock_unlock aliases.
11687 * pthreadP.h: Add prototypes for new aliases.
11689 * pthreadP.h (struct pthead_functions): Moved to...
11690 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11691 * init.c (pthread_functions): Add initializers for new elements.
11693 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11694 __pthread_cleanup_pop_restore aliases.
11695 * pthreadP.h: Add prototypes.
11697 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11698 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11699 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11700 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11701 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11702 * pthreadP.h: Adjust prototypes and callers.
11704 2003-01-04 Ulrich Drepper <drepper@redhat.com>
11706 * Makefile (tests): Add tst-cancel7.
11707 (tst-cancel7-ARGS): New variable.
11708 * tst-cancel7.c: New file.
11710 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11711 around gcc defficiencies.
11712 * old_pthread_cond_signal.c: Likewise.
11713 * old_pthread_cond_timedwait.c: Likewise.
11714 * old_pthread_cond_wait.c: Likewise.
11716 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11718 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11720 * Makefile (tests): Add tst-cond7.
11721 * tst-cond7.c: New file.
11723 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11724 (condvar_cleanup): Get condvar address from the right place.
11726 * atomic.h: Correct definitions of atomic_full_barrier,
11727 atomic_read_barrier, atomic_write_barrier.
11729 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11731 * old_pthread_cond_signal.c: Likewise.
11732 * old_pthread_cond_timedwait.c: Likewise.
11733 * old_pthread_cond_wait.c: Likewise.
11735 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11737 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11739 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11741 * pthreadP.h (pthread_cond_2_0_t): New type.
11742 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11743 Use new type for the 2.0 condvar function prototypes.
11744 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11745 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11747 * old_pthread_cond_destroy.c: Likewise.
11748 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11749 * old_pthread_cond_signal.c: Likewise.
11750 * old_pthread_cond_timedwait.c: Likewise.
11751 * old_pthread_cond_wait.c: Likewise.
11753 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11754 (__pthread_cond_wait): Don't save cancellation mode and seq value
11757 * herrno.c (__h_errno_location): Don't define as weak.
11759 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11761 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11762 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11763 and pthread_cond_wait.
11764 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11766 (__pthread_cond_broadcast_2_0): ... this.
11767 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11769 (__pthread_cond_destroy_2_0): ... this.
11770 * old_pthread_cond_init.c (__old_pthread_cond_init):
11772 (__pthread_cond_init_2_0): ... this.
11773 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11775 (__pthread_cond_signal_2_0): ... this.
11776 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11778 (__pthread_cond_wait_2_0): ... this.
11779 * pthread_cond_destroy.c: Include shlib-compat.h.
11780 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11781 * pthread_cond_init.c: Include shlib-compat.h.
11782 (pthread_cond_init): Change strong_alias into versioned_symbol.
11783 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11784 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11786 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11787 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11788 __pthread_cond_wait_2_0): New prototypes.
11789 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11790 __old_pthread_cond_init, __old_pthread_cond_signal,
11791 __old_pthread_cond_wait): Removed.
11792 * init.c: Include shlib-compat.h.
11793 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11794 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11795 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11796 ptr___pthread_cond_*_2_0 fields.
11797 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11798 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11800 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11801 LIBC_SIGACTION was not yet defined.
11802 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11803 [!defined LIBC_SIGACTION] (__sigaction): New function and
11805 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11806 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11808 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11810 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11812 2003-01-02 Ulrich Drepper <drepper@redhat.com>
11814 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11815 New, larger type definition.
11816 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11818 * Versions [libpthread]: Add definitions for new pthread_cond_*
11819 interfaces for version GLIBC_2.3.2.
11820 * pthread_cond_init.c: Update initialization for new type definition.
11821 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11822 pthread_cond_timedwait, pthread_cond_signal, and
11823 pthread_cond_broadcast. Add old_pthread_cond_init,
11824 old_pthread_cond_destroy, old_pthread_cond_wait,
11825 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11826 old_pthread_cond_broadcast.
11827 * old_pthread_cond_broadcast.c: New file.
11828 * old_pthread_cond_destroy.c: New file.
11829 * old_pthread_cond_init.c: New file.
11830 * old_pthread_cond_signal.c: New file.
11831 * old_pthread_cond_timedwait.c: New file.
11832 * old_pthread_cond_wait.c: New file.
11833 * pthreadP.h: Add prototypes for the compatibility interfaces.
11835 * pthread_cond_destroy.c: Don't include <errno.h>.
11837 2003-01-01 Ulrich Drepper <drepper@redhat.com>
11839 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11840 unnecessary zero offset when addressing MUTEX.
11842 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11844 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11846 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11847 for __register_atfork.
11849 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11851 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11852 instead of ASSEMBLER test macro.
11854 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11855 __libc_current_sigrtmax): Add libc_hidden_def.
11857 * sysdeps/pthread/list.h: Remove assert.h include.
11859 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11861 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11862 __pthread_initialize_minimal_internal not
11863 __pthread_initialize_minimal.
11865 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11867 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11868 __pthread_initialize_minimal as hidden.
11870 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11873 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11875 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11876 $(common-objpfx)format.lds, include that into the output script.
11878 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11880 2002-12-28 Andreas Jaeger <aj@suse.de>
11882 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11883 nsec resolution changes.
11884 (xstat64_conv): Likewise.
11885 (xstat32_conv): Likewise.
11886 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11887 struct kernel_stat.
11888 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11889 structs stat and stat64.
11890 * time/time.h (__timespec_defined): Define for __USE_MISC.
11891 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11893 2002-12-30 Jakub Jelinek <jakub@redhat.com>
11895 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11897 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11898 (pthread_exit): Use strong_alias to avoid warnings.
11899 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11900 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11901 ptr___pthread_attr_init_2_*.
11902 * init.c (pthread_functions): Adjust.
11904 2002-12-29 Ulrich Drepper <drepper@redhat.com>
11906 * forward.c: Make all functions available by default again. It
11907 caused too much trouble.
11909 * pt-siglongjmp.c: Removed.
11911 2002-12-28 Jakub Jelinek <jakub@redhat.com>
11913 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11914 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11915 * sysdeps/i386/Makefile: New file.
11916 * sysdeps/i386/tcb-offsets.sym: New file.
11917 * sysdeps/pthread/tcb-offsets.h: New file.
11918 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11919 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11921 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11922 __register_atfork...
11923 (GLIBC_2.3.2): ...here.
11925 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11927 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11928 pthread_attr_setstackaddr with __attribute_deprecated__.
11930 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11932 * pt-system.c (system): Remove cancellation handling.
11933 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11934 cancellation routines.
11936 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11938 * descr.h: Include <dl-sysdep.h>.
11939 (struct pthread): Move header.data.list to the back of the struct.
11940 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11941 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11942 (SYSINFO_OFFSEET): Likewise.
11944 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11946 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11948 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11949 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11950 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11951 (USE_DL_SYSINFO): Undef.
11953 2002-12-22 Jakub Jelinek <jakub@redhat.com>
11955 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11956 $(common-objpfx)libc.so.
11957 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11958 it is bigger than pipe buffer size even on arches with bigger
11960 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11962 2002-12-25 Ulrich Drepper <drepper@redhat.com>
11964 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11965 correct errno access for case that USE___THREAD is not defined.
11967 2002-12-24 Ulrich Drepper <drepper@redhat.com>
11969 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11970 Patch by Marijn Ros <marijn@mad.scientist.com>.
11972 2002-12-22 Roland McGrath <roland@redhat.com>
11974 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11976 2002-12-20 Ulrich Drepper <drepper@redhat.com>
11978 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11980 2002-12-19 Ulrich Drepper <drepper@redhat.com>
11982 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11983 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11984 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11986 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11988 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11989 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11990 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11991 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11992 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11993 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11994 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11995 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11997 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11999 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
12001 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
12003 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
12005 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
12006 that sysinfo is properly initialized.
12007 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
12008 to 1 only for ld.so.
12010 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
12011 RTLD_CORRECT_DYNAMIC_WEAK.
12013 2002-12-19 Jakub Jelinek <jakub@redhat.com>
12015 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
12016 Use return 0 as 6th argument to FORWARD4.
12017 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
12019 2002-12-18 Ulrich Drepper <drepper@redhat.com>
12021 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
12022 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
12023 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
12024 (INIT_SYSINFO): New #define.
12025 (TLS_TP_INIT): Use INIT_SYSINFO.
12026 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12027 At test to make sure SYSINFO_OFFSET value is correct.
12028 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
12030 2002-12-18 Jakub Jelinek <jakub@redhat.com>
12032 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
12033 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
12034 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
12035 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
12036 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
12037 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
12038 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
12040 2002-12-18 Ulrich Drepper <drepper@redhat.com>
12042 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
12043 macro instead of using int $0x80 directly.
12045 * sysdeps/pthread/bits/stdio-lock.h: New file.
12046 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
12047 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
12048 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
12049 * Makefile (routines): Add libc-lowlevelmutex.
12051 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
12052 __i686.get_pc_thunk.dx.
12054 2002-12-17 Jakub Jelinek <jakub@redhat.com>
12056 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
12057 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
12058 ($(objpfx)tst-cancel-wrappers.out): New rule.
12059 * tst-cancel-wrappers.sh: New test.
12060 * tst-locale1.c: Include signal.h.
12061 (uselocale): Test static linking of __libc_current_sigrt*.
12063 2002-12-17 Ulrich Drepper <drepper@redhat.com>
12065 * Makefile (tests): Add tst-cancel6.
12066 * tst-cancel6.c: New file
12068 2002-12-17 Jakub Jelinek <jakub@redhat.com>
12070 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
12071 Define meaningfully for assembler as well.
12072 * pthreadP.h (struct pthread_functions): Remove
12073 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
12074 and ptr_pthread_attr_init_2_1 fields.
12075 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
12076 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
12077 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
12078 (FORWARD3): Define using FORWARD4.
12079 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
12081 * pt-system.c: Remove duplicate stdlib.h include.
12083 2002-12-16 Ulrich Drepper <drepper@redhat.com>
12085 * sem_init.c: Define sem_init@GLIBC_2.0.
12086 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
12087 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
12089 * flockfile.c: Moved to...
12090 * sysdeps/pthread/flockfile.c: ...here. New file.
12091 * funlockfile.c: Moved to...
12092 * sysdeps/pthread/funlockfile.c: ...here. New file.
12093 * ftrylockfile.c: Moved to...
12094 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
12096 2002-12-16 Jakub Jelinek <jakub@redhat.com>
12098 * libc-cancellation.c: Guard both function with
12099 #if !defined NOT_IN_libc.
12100 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
12101 automatically provided pthread wrappers.
12102 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
12103 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
12105 * pt-open.c: Removed.
12106 * pt-fcntl.c: Removed.
12107 * pt-fsync.c: Removed.
12108 * pt-lseek.c: Removed.
12109 * pt-msgrcv.c: Removed.
12110 * pt-msgsnd.c: Removed.
12111 * pt-msync.c: Removed.
12112 * pt-nanosleep.c: Removed.
12113 * pt-open64.c: Removed.
12114 * pt-pause.c: Removed.
12115 * pt-pread.c: Removed.
12116 * pt-pread64.c: Removed.
12117 * pt-pwrite.c: Removed.
12118 * pt-pwrite64.c: Removed.
12119 * pt-read.c: Removed.
12120 * pt-recv.c: Removed.
12121 * pt-recvfrom.c: Removed.
12122 * pt-recvmsg.c: Removed.
12123 * pt-send.c: Removed.
12124 * pt-sendto.c: Removed.
12125 * pt-sigtimedwait.c: Removed.
12126 * pt-sigwait.c: Removed.
12127 * pt-wait.c: Removed.
12128 * pt-waitpid.c: Removed.
12129 * pt-write.c: Removed.
12130 * pt-accept.c: Removed.
12131 * pt-close.c: Removed.
12132 * pt-connect.c: Removed.
12133 * pt-lseek64.c: Removed.
12134 * pt-sendmsg.c: Removed.
12135 * pt-tcdrain.c: Removed.
12137 2002-12-15 Ulrich Drepper <drepper@redhat.com>
12139 * init.c (__pthread_initialize_minimal_internal): Renamed from
12140 __pthread_initialize_minimal. Make old name an alias. This
12141 converts a normal relocation into a relative relocation.
12143 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
12145 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
12146 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
12147 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
12148 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
12149 pt-sigwaitinfo, pt-waitid, and pt-writev.
12150 * pt-creat.c: Removed.
12151 * pt-poll.c: Removed.
12152 * pt-pselect.c: Removed.
12153 * pt-readv.c: Removed.
12154 * pt-select.c: Removed.
12155 * pt-sigpause.c: Removed.
12156 * pt-sigsuspend.c: Removed.
12157 * pt-sigwaitinfo.c: Removed.
12158 * pt-waitid.c: Removed.
12159 * pt-writev.c: Removed.
12161 * init.c (pthread_functions): New variable.
12162 (__pthread_initialize_minimal): Pass pointer to pthread_functions
12163 (or NULL) to __libc_pthread_init.
12164 * forward.c: Rewrite to use __libc:pthread_functions array to get
12165 function addresses.
12166 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
12168 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12169 Take new parameter. Copy content of variable pointed to by it
12170 to __libc_pthread_init.
12172 * pthreadP.h (struct pthread_functions): New type.
12173 (__libc_pthread_init): Declare.
12175 * pthread_attr_destroy.c: Add namespace protected alias.
12176 * pthread_attr_getdetachstate.c: Likewise.
12177 * pthread_attr_getinheritsched.c: Likewise.
12178 * pthread_attr_getschedparam.c: Likewise.
12179 * pthread_attr_getschedpolicy.c: Likewise.
12180 * pthread_attr_getscope.c: Likewise.
12181 * pthread_attr_setdetachstate.c: Likewise.
12182 * pthread_attr_setinheritsched.c: Likewise.
12183 * pthread_attr_setschedparam.c: Likewise.
12184 * pthread_attr_setschedpolicy.c: Likewise.
12185 * pthread_attr_setscope.c: Likewise.
12186 * pthread_cond_broadcast.c: Likewise.
12187 * pthread_cond_destroy.c: Likewise.
12188 * pthread_cond_init.c: Likewise.
12189 * pthread_cond_signal.c: Likewise.
12190 * pthread_cond_wait.c: Likewise.
12191 * pthread_condattr_destroy.c: Likewise.
12192 * pthread_condattr_init.c: Likewise.
12193 * pthread_equal.c: Likewise.
12194 * pthread_exit.c: Likewise.
12195 * pthread_getschedparam.c: Likewise.
12196 * pthread_self.c: Likewise.
12197 * pthread_setcancelstate.c: Likewise.
12198 * pthread_setschedparam.c: Likewise.
12199 * pthread_mutex_destroy.c: Likewise.
12200 * pthread_mutex_init.c: Likewise.
12201 * pthreadP.h: Add prototypes for the aliases.
12203 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
12204 multiple_threads member in correct TCB to 1.
12206 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
12207 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
12208 member of thread decriptor, otherwise return unconditionally 1.
12210 2002-12-14 Ulrich Drepper <drepper@redhat.com>
12212 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
12213 regular Linux version. Remove file.
12214 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
12215 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
12216 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
12217 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
12218 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
12219 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
12220 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
12221 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
12222 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
12223 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
12224 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
12225 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
12226 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
12227 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
12228 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
12229 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
12230 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
12231 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
12232 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
12233 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
12234 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
12235 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
12236 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
12237 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
12238 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
12239 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
12240 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
12241 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
12242 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
12243 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
12245 2002-12-14 Jakub Jelinek <jakub@redhat.com>
12247 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
12248 * sysdeps/unix/sysv/linux/open.c: Removed.
12249 * sysdeps/unix/sysv/linux/fsync.c: Removed.
12250 * sysdeps/unix/sysv/linux/lseek.c: Removed.
12251 * sysdeps/unix/sysv/linux/msync.c: Removed.
12252 * sysdeps/unix/sysv/linux/read.c: Removed.
12253 * sysdeps/unix/sysv/linux/close.c: Removed.
12254 * sysdeps/unix/sysv/linux/creat.c: Removed.
12255 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
12256 * sysdeps/unix/sysv/linux/pause.c: Removed.
12257 * sysdeps/unix/sysv/linux/select.c: Removed.
12258 * sysdeps/unix/sysv/linux/write.c: Removed.
12260 2002-12-14 Ulrich Drepper <drepper@redhat.com>
12262 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
12263 element in TCB to see whether locking is needed.
12265 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
12266 MULTIPLE_THREADS_OFFSET value is correct.
12268 * sysdeps/unix/sysv/linux/close.c: New file.
12269 * sysdeps/unix/sysv/linux/connect.S: New file.
12270 * sysdeps/unix/sysv/linux/creat.c: New file.
12271 * sysdeps/unix/sysv/linux/fsync.c: New file.
12272 * sysdeps/unix/sysv/linux/llseek.c: New file.
12273 * sysdeps/unix/sysv/linux/lseek.c: New file.
12274 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
12275 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
12276 * sysdeps/unix/sysv/linux/msync.c: New file.
12277 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
12278 * sysdeps/unix/sysv/linux/open.c: New file.
12279 * sysdeps/unix/sysv/linux/open64.c: New file.
12280 * sysdeps/unix/sysv/linux/pause.c: New file.
12281 * sysdeps/unix/sysv/linux/poll.c: New file.
12282 * sysdeps/unix/sysv/linux/pread.c: New file.
12283 * sysdeps/unix/sysv/linux/pread64.c: New file.
12284 * sysdeps/unix/sysv/linux/pselect.c: New file.
12285 * sysdeps/unix/sysv/linux/pwrite.c: New file.
12286 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
12287 * sysdeps/unix/sysv/linux/readv.c: New file.
12288 * sysdeps/unix/sysv/linux/recv.S: New file.
12289 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
12290 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
12291 * sysdeps/unix/sysv/linux/select.c: New file.
12292 * sysdeps/unix/sysv/linux/send.S: New file.
12293 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
12294 * sysdeps/unix/sysv/linux/sendto.S: New file.
12295 * sysdeps/unix/sysv/linux/sigpause.c: New file.
12296 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
12297 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
12298 * sysdeps/unix/sysv/linux/sigwait.c: New file.
12299 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
12300 * sysdeps/unix/sysv/linux/system.c: New file.
12301 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
12302 * sysdeps/unix/sysv/linux/wait.c: New file.
12303 * sysdeps/unix/sysv/linux/waitid.c: New file.
12304 * sysdeps/unix/sysv/linux/waitpid.c: New file.
12305 * sysdeps/unix/sysv/linux/writev.c: New file.
12306 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
12308 * pt-readv.c: Fix comment.
12310 2002-12-14 Jakub Jelinek <jakub@redhat.com>
12312 * tst-cleanup1.c: Include stdlib.h.
12314 * tst-cancel5.c: New test.
12315 * Makefile (tests): Add tst-cancel5.
12316 (tst-cancel5): Link against libc.so libpthread.so in that order.
12318 2002-12-13 Ulrich Drepper <drepper@redhat.com>
12320 * forward.c (test_loaded): Prevent recursive calls.
12322 * Makefile (routines): Add libc-cancellation.
12323 * libc-cancellation.c: New file.
12324 * descr.h (struct pthread): Add multiple_threads field.
12325 * allocatestack.c (allocate_stack): Initialize multiple_header field of
12326 new thread descriptor to 1.
12327 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
12328 Initialize multiple_thread field after successful thread creation.
12329 * cancellation.c (__do_cancel): Move to pthreadP.h.
12330 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
12331 (__pthread_disable_asynccancel): Add internal_function attribute.
12332 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
12333 * pthread_setcancelstate.c: Likewise.
12334 * pthread_setcanceltype.c: Likewise.
12335 * pthread_exit.c: Likewise.
12336 * pthreadP.h (CANCELLATION_P): Likewise.
12337 (__do_cancel): Define as static inline.
12338 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
12339 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
12341 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
12342 fields. Define MULTIPLE_THREADS_OFFSET.
12343 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
12345 * sysdeps/unix/sysv/linux/accept.S: New file.
12346 * sysdeps/unix/sysv/linux/read.c: New file.
12347 * sysdeps/unix/sysv/linux/write.c: New file.
12348 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
12349 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
12350 initialization of __libc_locking_needed.
12351 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
12352 __libc_locking_needed, use multiple_threads field in TCB.
12353 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12355 2002-12-12 Ulrich Drepper <drepper@redhat.com>
12357 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
12359 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
12361 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
12362 access to __libc_locking_needed for PIC.
12364 2002-12-12 Jakub Jelinek <jakub@redhat.com>
12366 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
12367 declare for libc.so.
12368 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
12370 (__libc_lock_lock): Put into statement expression.
12371 (__libc_lock_unlock): Remove trailing semicolon.
12372 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
12374 2002-12-12 Roland McGrath <roland@redhat.com>
12376 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
12377 "m" constraint to refer to __libc_locking_needed. Declare it here.
12379 2002-12-12 Ulrich Drepper <drepper@redhat.com>
12381 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
12382 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
12383 Initialize __libc_locking_needed.
12384 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
12385 instead of __register_pthread_fork_handler.
12386 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
12387 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
12388 fork-gen with libc_pthread_init.
12389 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
12390 of __register_pthread_fork_handler.
12391 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
12392 of __register_pthread_fork_handler.
12393 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
12394 __libc_locking_needed to determine whether lock prefix can be avoided.
12395 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12397 2002-12-11 Ulrich Drepper <drepper@redhat.com>
12399 * Makefile (tests): Add tst-cleanup1.
12400 * tst-cleanup1.c: New file.
12401 * cancellation.c (__cleanup_thread): Removed.
12402 (__do_cancel): Remove call to __cleanup_thread.
12403 * pthreadP.h: Remove __cleanup_thread prorotype.
12405 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
12406 Remember function and argument even if cancellation handler
12407 function is not available.
12408 (__libc_cleanup_region_end): Execute registered function directly if
12409 pthread functions are not available.
12410 (__libc_cleanup_end): Likewise.
12412 * init.c (__pthread_initialize_minimal): Fix initialization in
12413 static lib by preventing gcc from being too clever.
12415 2002-12-10 Ulrich Drepper <drepper@redhat.com>
12417 * init.c (__pthread_initialize_minimal): Remove unneccesary
12420 * Makefile (tests): We can run tst-locale2 now.
12422 2002-12-09 Ulrich Drepper <drepper@redhat.com>
12424 * Versions: Remove duplicated sigwait entry.
12426 2002-12-08 Ulrich Drepper <drepper@redhat.com>
12428 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12431 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12433 * pthreadP.h: Declare __pthread_enable_asynccancel and
12434 __pthread_disable_asynccancel.
12435 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12436 (CANCEL_RESET): Use __pthread_disable_asynccancel.
12437 * cancellation.c (__pthread_enable_asynccancel): New function.
12438 (__pthread_disable_asynccancel): New function.
12439 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12440 * pt-close.c: Likewise.
12441 * pt-connect.c: Likewise.
12442 * pt-creat.c: Likewise.
12443 * pt-fcntl.c: Likewise.
12444 * pt-fsync.c: Likewise.
12445 * pt-lseek.c: Likewise.
12446 * pt-lseek64.c: Likewise.
12447 * pt-msgrcv.c: Likewise.
12448 * pt-msgsnd.c: Likewise.
12449 * pt-msync.c: Likewise.
12450 * pt-nanosleep.c: Likewise.
12451 * pt-open.c: Likewise.
12452 * pt-open64.c: Likewise.
12453 * pt-pause.c: Likewise.
12454 * pt-poll.c: Likewise.
12455 * pt-pread.c: Likewise.
12456 * pt-pread64.c: Likewise.
12457 * pt-pselect.c: Likewise.
12458 * pt-pwrite.c: Likewise.
12459 * pt-pwrite64.c: Likewise.
12460 * pt-read.c: Likewise.
12461 * pt-readv.c: Likewise.
12462 * pt-recv.c: Likewise.
12463 * pt-recvfrom.c: Likewise.
12464 * pt-recvmsg.c: Likewise.
12465 * pt-select.c: Likewise.
12466 * pt-send.c: Likewise.
12467 * pt-sendmsg.c: Likewise.
12468 * pt-sendto.c: Likewise.
12469 * pt-sigpause.c: Likewise.
12470 * pt-sigsuspend.c: Likewise.
12471 * pt-sigtimedwait.c: Likewise.
12472 * pt-sigwait.c: Likewise.
12473 * pt-sigwaitinfo.c: Likewise.
12474 * pt-system.c: Likewise.
12475 * pt-tcdrain.c: Likewise.
12476 * pt-wait.c: Likewise.
12477 * pt-waitid.c: Likewise.
12478 * pt-waitpid.c: Likewise.
12479 * pt-write.c: Likewise.
12480 * pt-writev.c: Likewise.
12481 * pthread_join.c: Likewise.
12482 * pthread_timedjoin.c: Likewise.
12484 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12485 (__xpg_sigpause): New function.
12486 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12488 2002-12-07 Ulrich Drepper <drepper@redhat.com>
12490 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12492 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12493 _GI_pthread_cleanup_pop to pthreadP.h.
12495 * ftrylockfile.c: Use _IO_lock_trylock instead of
12496 pthread_mutex_trylock.
12498 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12499 (CANCEL_RESET): Likewise.
12500 (__pthread_setcanceltype_): Declare.
12501 (__pthread_mutex_lock_internal): Declare.
12502 (__pthread_mutex_unlock_internal): Declare.
12503 (__pthread_once_internal): Declare.
12504 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12505 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12507 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12508 and pthread_mutex_unlock.
12509 * pthread_cond_wait.c: Likewise.
12510 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12511 * pthread_mutex_unlock.c: Likewise.
12513 * pthread_setcanceltype.c: Add additional alias
12514 __pthread_setcanceltype.
12516 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12517 * sem_open.c (sem_open): Likewise.
12518 Use __libc_open, __libc_write, and __libc_close instead of
12519 open, write, and close respectively.
12521 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12522 Rewrite as statement expression since it must return a value.
12524 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12525 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12528 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12529 alias __pthread_once_internal.
12531 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12533 2002-12-06 Ulrich Drepper <drepper@redhat.com>
12535 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12536 * tst-stdio1.c: New file.
12537 * tst-stdio2.c: New file.
12539 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12541 * Makefile (tests): Comment out tst-locale2 for now.
12542 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12544 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12546 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12547 Use _IO_lock_init instead of explicit assignment.
12549 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12550 Define __libc_lock_* and __libc_lock_recursive macros with
12551 lowlevellock macros, not pthread mutexes.
12553 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
12554 of pthread_mutex_lock.
12555 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
12556 instead of pthread_mutex_unlock.
12558 2002-12-06 Roland McGrath <roland@redhat.com>
12560 * allocatestack.c (__stack_user): Use uninitialized defn.
12561 * init.c (__pthread_initialize_minimal): Initialize it here.
12563 2002-12-05 Roland McGrath <roland@redhat.com>
12565 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12567 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12569 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12570 missing & here too.
12572 2002-12-05 Ulrich Drepper <drepper@redhat.com>
12574 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12576 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12577 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12578 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12579 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12580 for __libc_lock_* macros.
12581 * Makefile (routines): Add libc-lowlevellock.
12583 2002-10-09 Roland McGrath <roland@redhat.com>
12585 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12586 Under [__PIC__], call the function via the pointer fetched for
12587 comparison rather than a call by name that uses the PLT.
12588 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12589 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12590 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12591 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12592 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12594 2002-12-04 Roland McGrath <roland@redhat.com>
12596 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12598 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12599 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12601 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12603 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12605 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12606 a completely opaque, non-integer type.
12607 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12609 2002-12-05 Jakub Jelinek <jakub@redhat.com>
12611 * sysdeps/i386/tls.h: Include stdlib.h.
12612 * sysdeps/x86_64/tls.h: Likewise.
12614 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12616 * Makefile (tests): Add tst-locale2.
12617 (tests-static): Likewise.
12618 * tst-locale2.c: New file.
12620 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12621 volatile and add memory clobbers to lock operations.
12623 2002-12-03 Ulrich Drepper <drepper@redhat.com>
12625 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12626 * sysdeps/i386/i486/bits/atomic.h: New file.
12627 * sysdeps/i386/i586/bits/atomic.h: New file.
12628 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12629 include i486 version.
12630 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12631 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12632 Patch by Marijn Ros <marijn@mad.scientist.com>.
12634 * allocatestack.c (get_cached_stack): Don't crash if we first
12635 found a stack with a larger size then needed.
12636 Reported by Hui Huang <hui.huang@sun.com>.
12638 * Makefile (tests): Add tst-sysconf.
12639 * tst-sysconf.c: New file.
12641 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12642 PTHREAD_THREADS_MAX.
12644 2002-12-02 Roland McGrath <roland@redhat.com>
12646 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12647 Declare using hidden_proto instead of attribute_hidden, so there are
12648 non-.hidden static symbols for gdb to find.
12649 (__pthread_keys): Likewise.
12650 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12651 * allocatestack.c (__stack_user): Likewise.
12652 * pthread_create.c (__pthread_keys): Likewise.
12653 (__nptl_threads_events, __nptl_last_event): Make these static instead
12655 * pthread_key_create.c (__pthread_pthread_keys_max,
12656 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12658 2002-12-02 Ulrich Drepper <drepper@redhat.com>
12660 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12662 * tst-locale1.c: New file.
12664 * pthread_cond_timedwait.c: Include <stdlib.h>.
12666 * Makefile (tests): Add tst-fork2 and tst-fork3.
12667 * tst-fork2.c: New file.
12668 * tst-fork3.c: New file.
12670 2002-11-28 Ulrich Drepper <drepper@redhat.com>
12672 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12674 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12675 require it to 200112L.
12677 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12678 instruction only if HAVE_CMOV is defined.
12679 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12681 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12683 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12685 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12687 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12689 2002-11-27 Ulrich Drepper <drepper@redhat.com>
12691 * sysdeps/x86_64/bits/atomic.h: New file.
12693 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12696 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12697 possible since gettid cannot fail.
12699 * sysdeps/x86_64/pthreaddef.h: New file.
12701 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12703 * sysdeps/x86_64/pthread_spin_init.c: New file.
12704 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12705 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12706 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12708 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12709 Add missing lock prefix. Minute optimization.
12711 * tst-spin2.c (main): Also check successful trylock call.
12713 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12714 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12716 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12717 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12719 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12720 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12721 value in case of an error. Add support for INTERNAL_SYSCALL.
12723 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12724 value in case of an error.
12726 * sysdeps/x86_64/tls.h: New file.
12728 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12730 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12731 takes the array member name and the index as parameters.
12732 (THREAD_SETMEM_NC): Likewise.
12733 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12734 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12737 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12738 to decide which code to use.
12739 (THREAD_SETMEM_NC): Likewise.
12741 * allocatestack.c (queue_stack): Don't remove stack from list here.
12742 Do it in the caller. Correct condition to prematurely terminate
12743 loop to free stacks.
12744 (__deallocate_stack): Remove stack from list here.
12746 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12748 * Makefile (tests): Add tst-stack1.
12749 * tst-stack1.c: New file.
12751 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12754 * pthread_attr_getstack.c: Return bottom of the thread area.
12756 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12758 * Makefile (libpthread-routines): Add pt-allocrtsig and
12759 pthread_kill_other_threads.
12760 * pt-allocrtsig.c: New file.
12761 * pthread_kill_other_threads.c: New file.
12762 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12763 all three functions.
12764 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12766 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12767 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12768 and __libc_allocate_rtsig_private.
12769 * Versions (libpthread): Export pthread_kill_other_threads_np,
12770 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12772 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12774 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12775 the end of the stack. Adjust computations.
12776 When mprotect call fails dequeue stack and free it.
12777 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12779 * pthread_getattr_np.c: Likewise.
12781 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12784 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12786 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12787 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12789 2002-11-22 Ulrich Drepper <drepper@redhat.com>
12791 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12792 * pthread_setspecific.c: Likewise.
12794 2002-11-21 Ulrich Drepper <drepper@redhat.com>
12796 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12797 definitions. Get them from the official place.
12798 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12800 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12801 Use new CLONE_ flags in clone() calls.
12803 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12804 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12806 * Versions: Add pthread_* functions for libc.
12807 * forward.c: New file.
12809 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12811 * herrno.c: New file.
12814 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12815 sem_trywait, and sem_timedwait. Add herrno and res.
12816 * sem_init.c: Don't initialize lock and waiters members.
12817 * sem_open.c: Likewise.
12818 * sem_post.c: Removed.
12819 * sem_wait.c: Removed.
12820 * sem_trywait.c: Removed.
12821 * sem_timedwait.c: Removed.
12822 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12823 Includes full implementations of sem_post, sem_wait, sem_trywait,
12825 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12826 for new implementation.
12827 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12828 and waiters fields.
12830 * tst-sem3.c: Improve error message.
12831 * tst-signal3.c: Likewise.
12833 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12834 to tell the kernel about the termination futex and to initialize tid
12835 member. Don't initialize main_thread.
12836 * descr.h (struct pthread): Remove main_thread member.
12837 * cancelllation.c (__do_cancel): Remove code handling main thread.
12838 The main thread is not special anymore.
12840 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12841 size of the stacks to stack_cache_actsize.
12843 * pt-readv.c: Add missing "defined".
12844 * pt-sigwait.c: Likewise.
12845 * pt-writev.c: Likewise.
12847 2002-11-09 Ulrich Drepper <drepper@redhat.com>
12849 * Versions: Export __connect from libpthread.
12850 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12852 * Makefile (libpthread-routines): Add pt-raise.
12853 * sysdeps/unix/sysv/linux/raise.c: New file.
12854 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12855 * sysdeps/generic/pt-raise.c: New file.
12857 * pthread_cond_init.c: Initialize all data elements of the condvar
12858 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12860 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12861 * pthread_create.c: Likewise.
12863 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12864 * tst-key1.c: New file.
12865 * tst-key2.c: New file.
12866 * tst-key3.c: New file.
12868 * Versions: Export pthread_detach for version GLIBC_2.0.
12869 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12871 2002-11-08 Ulrich Drepper <drepper@redhat.com>
12873 * pthread_key_create.c: Terminate search after an unused key was found.
12874 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12876 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12877 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12879 2002-10-10 Ulrich Drepper <drepper@redhat.com>
12881 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12882 dynamic lookup for errno in PIC.
12884 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12885 release the stack lock as soon as possible.
12886 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12887 the static TLS block.
12888 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12890 * cancellation.c: Renamed from cancelation.c.
12891 * Makefile: Adjust accordingly.
12892 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12893 * cleanup_defer.c: Use CANCELLATION_P.
12894 * pthread_testcancel.c: Likewise.
12895 * descr.h: Fix spelling in comments.
12896 * init.c: Likewise.
12897 * pthread_getattr_np.c: Likewise.
12898 * pthread_getschedparam.c: Likewise.
12899 * pthread_setschedparam.c: Likewise.
12900 * Versions: Likewise.
12902 * pt-pselect.c: New file.
12903 * Makefile (libpthread-routines): Add pt-pselect.
12904 * Versions: Add pselect.
12906 * tst-cancel4.c: New file.
12907 * Makefile (tests): Add tst-cancel4.
12909 2002-10-09 Ulrich Drepper <drepper@redhat.com>
12911 * pthread_mutex_lock.c: Always record lock ownership.
12912 * pthread_mutex_timedlock.c: Likewise.
12913 * pthread_mutex_trylock.c: Likewise.
12915 * pt-readv.c: New file.
12916 * pt-writev.c: New file.
12917 * pt-creat.c: New file.
12918 * pt-msgrcv.c: New file.
12919 * pt-msgsnd.c: New file.
12920 * pt-poll.c: New file.
12921 * pt-select.c: New file.
12922 * pt-sigpause.c: New file.
12923 * pt-sigsuspend.c: New file.
12924 * pt-sigwait.c: New file.
12925 * pt-sigwaitinfo.c: New file.
12926 * pt-waitid.c: New file.
12927 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12928 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12929 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12930 * Versions: Add all the new functions.
12932 * tst-exit1.c: New file.
12933 * Makefile (tests): Add tst-exit1.
12935 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12937 2002-10-08 Ulrich Drepper <drepper@redhat.com>
12939 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12941 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12942 call. pthread_join is an official cancellation point.
12943 * pthread_timedjoin.c: Likewise.
12945 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12946 and the condvar's mutex are retrieved.
12947 * pthread_cond_timedwait.c: Likewise.
12948 Reported by dice@saros.East.Sun.COM.
12950 2002-10-07 Ulrich Drepper <drepper@redhat.com>
12952 * pthreadP.h: Cut out all type definitions and move them...
12953 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12954 * pthreadP.h: Include <internaltypes.h>.
12956 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12957 performance tweaks.
12959 * sem_trywait.c: Shuffle #includes around to get right order.
12960 * sem_timedwait.c: Likewise.
12961 * sem_post.c: Likewise.
12962 * sem_wait.c: Likewise.
12964 * nptl 0.3 released.
12966 * Makefile (tests): Add tst-signal3.
12967 * tst-signal3.c: New file.
12969 2002-10-05 Ulrich Drepper <drepper@redhat.com>
12971 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12972 the asms modify the sem object.
12973 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12975 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12976 the actual members.
12977 * pthreadP.h (struct sem): New type. Actual semaphore type.
12978 * semaphoreP.h: Include pthreadP.h.
12979 * sem_getvalue.c: Adjust to sem_t change.
12980 * sem_init.c: Likewise.
12981 * sem_open.c: Likewise.
12982 * sem_post.c: Likewise.
12983 * sem_timedwait.c: Likewise.
12984 * sem_trywait.c: Likewise.
12985 * sem_wait.c: Likewise.
12987 2002-10-04 Ulrich Drepper <drepper@redhat.com>
12989 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12990 * tst-basic2.c: New file.
12991 * tst-exec1.c: New file.
12992 * tst-exec2.c: New file.
12993 * tst-exec3.c: New file.
12995 * tst-fork1.c: Remove extra */.
12997 * nptl 0.2 released. The API for IA-32 is complete.