1 2013-07-23 David S. Miller <davem@davemloft.net>
3 * tst-cancel4.c (WRITE_BUFFER_SIZE): Adjust comment.
5 2013-07-22 David S. Miller <davem@davemloft.net>
7 * tst-cancel4.c (WRITE_BUFFER_SIZE): Increase to 16384.
9 2013-07-19 Dominik Vogt <vogt@de.ibm.com>
11 * pthread_mutex_lock.c: Fix whitespace.
12 * pthread_mutex_trylock.c: Likewise.
13 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
14 * sysdeps/unix/sysv/linux/x86/elision-conf.c: Likewise.
15 * sysdeps/unix/sysv/linux/x86/elision-conf.h: Likewise.
16 * sysdeps/unix/sysv/linux/x86/elision-lock.c: Likewise.
17 * sysdeps/unix/sysv/linux/x86/elision-timed.c: Likewise.
18 * sysdeps/unix/sysv/linux/x86/elision-trylock.c: Likewise.
19 * sysdeps/unix/sysv/linux/x86/force-elision.h: Likewise.
20 * sysdeps/unix/sysv/linux/x86/hle.h: Likewise.
21 * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
22 * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
23 * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
24 * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
26 * sysdeps/unix/sysv/linux/x86/elision-conf.c:
27 Remove __rwlock_rtm_enabled and __rwlock_rtm_read_retries.
28 (elision_init): Don't set __rwlock_rtm_enabled.
29 * sysdeps/unix/sysv/linux/x86/elision-conf.h:
30 Remove __rwlock_rtm_enabled.
32 2013-07-03 H.J. Lu <hongjiu.lu@intel.com>
34 * sysdeps/unix/sysv/linux/x86/init-arch.c: New file.
35 * sysdeps/unix/sysv/linux/x86/init-arch.h: Likewise.
37 2013-07-02 Andi Kleen <ak@linux.intel.com>
39 * sysdeps/unix/sysv/linux/x86/elision-conf.c (elision_init):
40 Check ENABLE_LOCK_ELISION.
42 2013-07-02 Andi Kleen <ak@linux.intel.com>
44 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype):
45 Disable elision for PTHREAD_MUTEX_DEFAULT.
47 2013-07-02 Andi Kleen <ak@linux.intel.com>
48 Hongjiu Lu <hongjiu.lu@intel.com>
50 * pthread_mutex_lock.c
51 (__pthread_mutex_lock): Add lock elision support.
52 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
53 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
54 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
55 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
56 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
57 * sysdeps/unix/sysv/linux/x86/Makefile: New file.
58 * sysdeps/unix/sysv/linux/x86/force-elision.h: New file
59 * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
60 * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
61 * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
62 * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
63 * sysdeps/unix/sysv/linux/x86/pthread_mutex_unlock.c: Likewise.
65 2013-07-02 Andi Kleen <ak@linux.intel.com>
67 * tst-mutex5.c: Include config.h.
68 (do_test): Add checks for ENABLE_LOCK_ELISION.
69 * tst-mutex8.c: Include config.h
70 (tf): Add checks for ENABLE_LOCK_ELISION.
71 (check_type): Likewise.
73 2013-07-02 Andi Kleen <ak@linux.intel.com>
75 * pthreadP.h: Add elision types.
76 (PTHREAD_MUTEX_TYPE_ELISION): Add.
77 * sysdeps/pthread/pthread.h: Add elision initializers.
78 (PTHREAD_MUTEX_ELISION_NP, PTHREAD_MUTEX_NO_ELISION_NP,
79 PTHREAD_MUTEX_PSHARED_NP): Add new flags.
80 (__PTHREAD_SPINS): Add.
82 2013-07-02 Andi Kleen <ak@linux.intel.com>
83 Hongjiu Lu <hongjiu.lu@intel.com>
85 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_timedwait_tid,
86 lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
87 __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
88 lll_trylock_elision): Add.
89 * sysdeps/unix/sysv/linux/x86/Makefile: Imply x86.
90 * sysdeps/unix/sysv/linux/x86/elision-conf.c: New file.
91 * sysdeps/unix/sysv/linux/x86/elision-conf.h: New file.
92 * sysdeps/unix/sysv/linux/x86/elision-lock.c: New file.
93 * sysdeps/unix/sysv/linux/x86/elision-timed.c: New file.
94 * sysdeps/unix/sysv/linux/x86/elision-trylock.c: New file.
95 * sysdeps/unix/sysv/linux/x86/elision-unlock.c: New file.
96 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_timedwait_tid,
97 lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
98 __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
99 lll_trylock_elision): Add.
100 * nptl/sysdeps/unix/sysv/linux/x86/hle.h: New file.
101 * elision-conf.h: New file.
103 2013-06-24 Vladimir Nikulichev <v.nikulichev@gmail.com>
106 * pthread_exit.c: Add reference to pthread_create.
108 2013-06-22 Joseph Myers <joseph@codesourcery.com>
110 * pthread_getattr_default_np.c: Include <string.h>.
112 2013-06-15 Siddhesh Poyarekar <siddhesh@redhat.com>
114 * Versions (libpthread): Add GLIBC_2.18.
115 (GLIBC_2.18): Add pthread_setattr_default_np and
116 pthread_getattr_default_np.
117 * allocatestack.c (allocate_stack): Synchronize read from
118 __default_pthread_attr.
119 (__reclaim_stacks): Initialize __default_pthread_attr_lock.
120 * nptl-init.c (__pthread_initialize_minimal_internal):
121 Synchronize write to __default_pthread_attr.
122 * pthreadP.h (__default_pthread_attr_lock): Declare.
123 * pthread_attr_getstacksize (__pthread_attr_getstacksize):
124 Synchronize read from __default_pthread_attr.
125 * pthread_create.c (__pthread_create_2_1): Make a local copy of
126 __default_pthread_attr. Check value of flags in IATTR even if
128 * pthread_getattr_default_np.c: New file.
129 * pthread_setattr_default_np.c: New file.
130 * sysdeps/pthread/pthread.h [__USE_GNU]
131 (pthread_getattr_default_np, pthread_setattr_default_np):
133 * tst-default-attr.c: New test case.
134 * Makefile (libpthread-routines): Add
135 pthread_setattr_default_np and pthread_getattr_default_np.
136 (tests): Add tst-default-attr.
137 * vars.c (__default_pthread_attr_lock): Declare and initialize.
139 2013-06-13 Siddhesh Poyarekar <siddhesh@redhat.com>
140 Carlos O'Donell <carlos@redhat.com>
143 * tst-pthread-attr-affinity: New test case.
144 * Makefile (tests): Add it.
145 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
146 (__pthread_attr_getaffinity_new): Copy minimum of source and
147 destination sizes to avoid a buffer overrun.
149 2013-06-10 Carlos O'Donell <carlos@redhat.com>
151 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
152 (lll_futex_wake): Return syscall error.
153 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
154 (lll_futex_wake): Return syscall error.
156 2013-08-06 Ondřej Bílka <neleai@seznam.cz>
158 * sysdeps/pthread/allocalim.h: (__libc_use_alloca): Fix warning.
160 2013-06-06 Ondřej Bílka <neleai@seznam.cz>
162 * tst-cond22.c: Fix leading whitespaces.
163 * tst-umask1.c: Likewise.
165 2013-06-06 Joseph Myers <joseph@codesourcery.com>
167 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Remove
169 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Likewise.
170 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
171 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
172 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
173 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
174 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
175 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
176 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
177 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
178 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
179 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
180 * tst-mutexpp10.c: Likewise.
181 * tst-stackguard1.c: Likewise.
183 2013-05-31 Joseph Myers <joseph@codesourcery.com>
185 * Makefile ($(objpfx)libpthread.so): Remove dependencies on libc
188 2013-05-16 Ryan S. Arnold <rsa@linux.vnet.ibm.com>
190 * pthread_create.c: Add missing #include <stdint.h> due to uint64_t or
192 * sysdeps/pthread/createthread.c: Likewise.
194 2013-05-14 Andreas Jaeger <aj@suse.de>
197 * sysdeps/x86_64/tls.h (struct tcbhead_t): Add __private_ss field.
198 * sysdeps/i386/tls.h (struct tcbhead_t): Likewise.
200 2013-05-09 Andi Kleen <ak@linux.intel.com>
202 * tst-mutex8.c (do_test): Check for ENABLE_PI.
204 2013-04-22 Siddhesh Poyarekar <siddhesh@redhat.com>
206 * pthreadP.h (check_sched_policy_attr): New inline function.
207 (check_sched_priority_attr): Likewise.
208 (check_stacksize_attr): Likewise.
209 (__kernel_cpumask_size, __determine_cpumask_size): Declare
211 (check_cpuset_attr): New inline function.
212 * pthread_attr_setschedparam (__pthread_attr_setschedparam):
213 Use check_sched_priority_attr.
214 * pthread_attr_setschedpolicy.c
215 (__pthread_attr_setschedpolicy): Use check_sched_policy_attr.
216 * pthread_attr_setstack.c (__pthread_attr_setstack): Use
217 check_stacksize_attr.
218 * pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
220 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
221 (__pthread_attr_setaffinity_new): Use check_cpuset_attr.
223 2013-04-11 Andreas Schwab <schwab@suse.de>
225 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
226 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
227 directly use absolute timeout.
229 2013-04-07 Carlos O'Donell <carlos@redhat.com>
231 * sysdeps/unix/sysv/linux/sem_post.c: Include atomic.h.
233 2013-04-04 Siddhesh Poyarekar <siddhesh@redhat.com>
236 * sysdeps/unix/sysv/linux/x86_64/cancellation.S
238 [SHARED && defined DO_VERSIONING && !defined NO_HIDDEN]: Mark
239 __pthread_unwind hidden.
241 2013-03-28 Roland McGrath <roland@hack.frob.com>
243 * pthread_create.c (start_thread) [!SHARED]:
244 Call __call_tls_dtors only if it's not NULL.
246 2013-03-19 Siddhesh Poyarekar <siddhesh@redhat.com>
248 * allocatestack.c (allocate_stack): Use __default_pthread_attr
249 instead of __default_stacksize.
250 * nptl-init.c (__pthread_initialize_minimal_internal):
251 Likewise. Initialize guardsize.
252 * pthreadP.h (__default_pthread_attr): Declare.
253 * pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
254 Use __default_pthread_attr instead of __default_stacksize.
255 * pthread_create.c (default_attr): Remove.
256 (__pthread_create_2_1): Use __default_pthread_attr instead of
258 * vars.c (__default_stacksize): Remove.
259 (__default_pthread_attr): New static variable to store
260 default thread attributes.
262 2013-03-18 Siddhesh Poyarekar <siddhesh@redhat.com>
264 * pthread_barrier_init.c (default_attr): Rename to
266 (pthread_barrier_init): Adjust for the rename.
267 * pthread_mutex_init.c (default_attr): Rename to
269 (__pthread_mutex_init): Adjust for the rename.
270 * pthread_rwlock_init.c (default_attr): Rebane to
272 (__pthread_rwlock_init): Adjust for the rename.
274 2013-03-12 Carlos O'Donell <carlos@redhat.com>
276 * sysdeps/unix/sysv/linux/lowlevellock.c: Include <atomic.h>.
278 2013-03-04 Roland McGrath <roland@hack.frob.com>
280 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h:
281 Change multiple inclusion guard to _LINUX_I686_DL_SYSDEP_H.
283 (HAVE_DL_DISCOVER_OSVERSION): Remove definition, now redundant.
284 (RTLD_PRIVATE_ERRNO): Likewise.
285 (NEED_DL_SYSINFO, DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION):
286 Move macros and associated declaration to ...
287 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: ... here.
288 Change multiple include guard to _LINUX_I386_DL_SYSDEP_H.
291 2013-03-01 Carlos O'Donell <carlos@redhat.com>
293 * Makefile (tests): Revert last change.
294 (tst-pthread-stack-env-ENV): Likewise.
295 * nptl-init.c (set_default_stacksize): Likewise.
296 (__pthread_initialize_minimal_internal): Likewise.
297 * tst-pthread-stack-env.c: Likewise.
299 2013-03-01 Siddhesh Poyarekar <siddhesh@redhat.com>
301 * tst-oddstacklimit.c: Include stdlib.h.
303 * Makefile (tests): Add tst-pthread-stack-env.
304 (tst-pthread-stack-env-ENV): Set environment for test.
305 * nptl-init.c (set_default_stacksize): New function.
306 (__pthread_initialize_minimal_internal): Accept ARGC, ARGV and
307 ENVP. Initialize __ENVIRON and set __DEFAULT_STACKSIZE.
308 * tst-pthread-stack-env.c: New test case.
310 2013-02-21 David S. Miller <davem@davemloft.net>
312 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
313 (FUTEX_WAIT_REQUEUE_PI): Define.
314 (FUTEX_CMP_REQUEUE_PI): Likewise.
315 (lll_futex_wait_requeue_pi): Likewise.
316 (lll_futex_timed_wait_requeue_pi): Likewise.
317 (lll_futex_cmp_requeue_pi): Likewise.
319 2013-02-21 Carlos O'Donell <carlos@redhat.com>
321 * sysdeps/unix/sysv/linux/fork.c: Fix comment typo.
323 2013-02-18 Siddhesh Poyarekar <siddhesh@redhat.com>
325 * sysdeps/pthread/tst-timer.c: Include stdlib.h for declaration
327 * tst-barrier4.c: Likewise.
328 * tst-robust7.c: Likewise.
331 * pthreadP.h (USE_REQUEUE_PI): New macro to check if mutex is
333 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Use
334 PI-aware futex operations if available and mutex is PI-aware.
335 * pthread_cond_signal.c (__pthread_cond_signal): Likewise.
336 * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait):
338 * pthread_cond_wait.c (__condvar_cleanup): Adjust lock if
339 cancellation occurred just after futex returned successfully
340 from a PI operation with the mutex held.
341 (__pthread_cond_wait): Use PI-aware futex operations if
342 available and mutex is PI-aware.
343 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
344 (FUTEX_WAIT_REQUEUE_PI): Define.
345 (FUTEX_CMP_REQUEUE_PI): Likewise.
346 (lll_futex_wait_requeue_pi): Likewise.
347 (lll_futex_timed_wait_requeue_pi): Likewise.
348 (lll_futex_cmp_requeue_pi): Likewise.
349 * nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
350 (FUTEX_WAIT_REQUEUE_PI): Define.
351 (FUTEX_CMP_REQUEUE_PI): Likewise.
352 (lll_futex_wait_requeue_pi): Likewise.
353 (lll_futex_timed_wait_requeue_pi): Likewise.
354 (lll_futex_cmp_requeue_pi): Likewise.
355 * sysdeps/unix/sysv/linux/kernel-features.h: Define
356 __ASSUME_REQUEUE_PI for Linux version higher than 2.6.31.
358 2013-02-04 Andreas Schwab <schwab@suse.de>
361 * tst-cancel14.c: Include <sys/time.h>.
362 * tst-cancel15.c: Likewise.
363 * tst-mutex9.c: Include <stdint.h>, <stdlib.h> and <sys/time.h>.
364 * tst-stackguard1.c: Include <tls.h>
366 2013-01-16 Andreas Schwab <schwab@suse.de>
369 * sem_open.c (sem_open): Use __mktemp instead of mktemp.
371 2013-01-11 Carlos O'Donell <codonell@redhat.com>
373 * allocatestack.c (allocate_stack): Add comment. Remove assert
376 2013-01-11 H.J. Lu <hongjiu.lu@intel.com>
378 * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd)
379 with $(host-test-program-cmd).
380 (tst-exec4-ARGS): Likewise.
381 (tst-stackguard1-ARGS): Likewise.
382 ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh.
383 Replace $(rtld-installed-name) with $(test-via-rtld-prefix).
384 * tst-tls6.sh (elf_objpfx): Removed.
385 (rtld_installed_name): Renamed to ...
386 (test_via_rtld_prefix): This.
387 (tst_tls5): Prepend ${test_via_rtld_prefix}.
389 2013-01-02 Joseph Myers <joseph@codesourcery.com>
391 * All files with FSF copyright notices: Update copyright dates
392 using scripts/update-copyrights.
394 2013-01-01 Joseph Myers <joseph@codesourcery.com>
396 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat
399 2012-12-28 Andi Kleen <ak@linux.intel.com>
401 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert
403 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
406 2012-12-27 David S. Miller <davem@davemloft.net>
408 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
409 (lll_futex_timed_wait_bitset): New macro.
411 2012-12-27 Siddhesh Poyarekar <siddhesh@redhat.com>
413 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
415 (lll_futex_timed_wait): Replace assembly code with
417 (lll_futex_timed_wait_bitset): Likewise.
418 (lll_futex_wake): Likewise.
419 (lll_futex_requeue): Likewise.
420 (lll_futex_wake_unlock): Likewise.
422 2012-12-08 Siddhesh Poyarekar <siddhesh@redhat.com>
424 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
425 Declare LOCAL_VAR as char.
427 2012-12-04 Joseph Myers <joseph@codesourcery.com>
429 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
430 Cast result of atomic_increment_val to (void) instead of storing
431 in otherwise-unused variable.
433 2012-12-03 Allan McRae <allan@archlinux.org>
435 * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
437 2012-11-26 H.J. Lu <hongjiu.lu@intel.com>
439 * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
441 * sysdeps/i386/tls.h: Include <libc-internal.h>.
442 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
443 (THREAD_SETMEM_NC): Likewise.
444 * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
445 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
446 (THREAD_SETMEM_NC): Likewise.
448 2012-11-21 Joseph Myers <joseph@codesourcery.com>
450 * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
451 of atomic_increment_val to (void) instead of storing in
452 otherwise-unused variable.
454 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
455 [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
456 instead of storing in otherwise-unused variable.
458 2012-11-14 Marcus Shawcroft <marcus.shawcroft@linaro.org>
460 * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
461 (CFLAGS-recv.c, CFLAGS-send.c): Define.
463 2012-11-06 Chris Metcalf <cmetcalf@tilera.com>
465 * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
466 * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
468 2012-11-05 Siddhesh Poyarekar <siddhesh@redhat.com>
470 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
471 if absolute timeout is negative.
472 [__ASSUME_FUTEX_CLOCK_REALTIME &&
473 lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
474 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
476 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
478 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
479 (__lll_robust_timedlock_wait): Likewise.
480 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
481 (lll_futex_timed_wait_bitset): New macro.
482 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
483 (lll_futex_timed_wait_bitset): Likewise.
485 2012-11-03 David S. Miller <davem@davemloft.net>
487 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
489 (__cpu_relax): Likewise.
491 2012-11-02 H.J. Lu <hongjiu.lu@intel.com>
493 * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
494 (__128bits): New struct typedef.
495 (tcbhead_t): Replace __m128 with __128bits.
497 2012-10-30 Aurelien Jarno <aurelien@aurel32.net>
498 Joseph Myers <joseph@codesourcery.com>
500 * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
502 2012-10-28 David S. Miller <davem@davemloft.net>
504 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
505 Define when we have v9 instructions available.
506 * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
507 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
509 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
511 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
512 to libpthread-routines.
514 2012-10-25 Roland McGrath <roland@hack.frob.com>
516 * tst-cond-except.c (TEST_FUNCTION): New macro.
518 2012-10-25 Joseph Myers <joseph@codesourcery.com>
520 * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
522 * tst-tls6.sh: Use /bin/bash not /bin/sh.
524 2012-10-25 Roland McGrath <roland@hack.frob.com>
526 * tst-basic2.c (do_test): Return RESULT, not always zero.
528 * tst-cond25.c: Include <stdint.h>
529 (waiter): Add casts to uintptr_t between casting integer<->pointer.
530 (timed_waiter): Likewise.
531 (do_test_wait): Likewise.
532 * tst-cond-except.c (thr): Likewise.
533 (do_test): Use prototype definition.
535 2012-10-24 Joseph Myers <joseph@codesourcery.com>
536 Jim Blandy <jimb@codesourcery.com>
538 * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
540 * tst-tls6.sh (test_wrapper_env): New variable. Use it to run
541 programs with LD_PRELOAD set.
543 2012-10-24 Roland McGrath <roland@hack.frob.com>
545 * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
546 ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
547 ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
548 ($(objpfx)tst-rwlock14): Likewise.
550 2012-10-24 Joseph Myers <joseph@codesourcery.com>
552 * Makefile (tests): Remove tst-oddstacklimit.
553 (test-srcs): New variable.
554 (tst-oddstacklimit-ENV): Remove.
555 [$(run-built-tests) = yes] (tests): Depend on
556 $(objpfx)tst-oddstacklimit.out.
557 [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
559 * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
560 setrlimit before executing tst-basic1 test passed to --command.
562 2012-10-23 Joseph Myers <joseph@codesourcery.com>
564 * Makefile [$(cross-compiling) = no]: Change condition to
565 [$(run-built-tests) = yes].
567 2012-10-23 Jim Blandy <jimb@codesourcery.com>
568 Joseph Myers <joseph@codesourcery.com>
570 * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
571 (tst-exec4-ARGS): Likewise.
572 (tst-stackguard1-ARGS): Likewise.
574 2012-10-21 Jim Blandy <jimb@codesourcery.com>
575 Joseph Myers <joseph@codesourcery.com>
577 * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
578 tst-cancel-wrappers.sh.
579 * tst-cancel-wrappers.sh: Use nm program given as first argument,
582 2012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
584 * tst-cond25.c (do_test_wait): Don't check for return value from
587 2012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
590 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
591 (__condvar_tw_cleanup): Adjust the mutex data structure if it
592 was locked by FUTEX_WAIT_REQUEUE_PI.
593 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
594 (__condvar_w_cleanup): Likewise.
595 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
596 (__condvar_cleanup2): Likewise.
597 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
598 (__condvar_cleanup1): Likewise.
600 2012-10-10 Carlos O'Donell <carlos@systemhalted.org>
602 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
603 defined __EXCEPTIONS) && defined __USE_GNU]
604 (pthread_cleanup_push_defer_np): Fix formatting.
606 2012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
609 * Makefile (tests): New test case tst-cond25.
610 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
611 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
612 (__condvar_tw_cleanup): Lock mutex only if we don't already
614 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
615 (__condvar_w_cleanup): Likewise.
616 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
617 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
618 (__condvar_cleanup2): Lock mutex only if we don't already
620 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
621 (__condvar_cleanup1): Likewise.
622 * tst-cond25.c: New test case.
624 2012-10-09 Roland McGrath <roland@hack.frob.com>
626 * sysdeps/pthread/configure: Regenerated.
627 * sysdeps/x86_64/configure: Regenerated.
629 2012-10-05 David S. Miller <davem@davemloft.net>
632 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
633 (DB_THREAD_SELF): Use constants for the register offsets. Correct
634 the case of a 64-bit debugger with a 32-bit inferior.
636 2012-10-05 H.J. Lu <hongjiu.lu@intel.com>
639 * Makefile (tests-static): Add tst-cancel24-static,
640 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
641 tst-sem11-static and tst-sem12-static.
643 (LDLIBS-tst-cancel24-static): New macro.
644 * tst-cancel24-static.cc: New file.
645 * tst-cond8-static.c: Likewise.
646 * tst-mutex8-static.c: Likewise.
647 * tst-mutexpi8-static.c: Likewise.
648 * tst-sem11-static.c: Likewise.
649 * tst-sem12-static.c: Likewise.
651 2012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
654 * Makefile (tests): New test case tst-cond24.
655 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
656 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
657 (__pthread_cond_timedwait): Unlock mutex before going back to
659 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
660 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
661 return from futex_wait.
662 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
663 (__pthread_cond_timedwait): Unlock mutex before going back to
664 wait in PI case. Set requeue_pi flag only if wait returned 0.
665 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
666 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
667 return from futex_wait.
668 * tst-cond24.c: New test case.
670 2012-10-04 Roland McGrath <roland@hack.frob.com>
672 * pthread_create.c (start_thread): Use __madvise, not madvise.
674 2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
676 * sysdeps/i386/tls.h: Update copyright years.
678 2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
680 * pthread_create.c (start_thread): Fix clone flag name in
681 comment to CLONE_CHILD_CLEARTID.
682 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
683 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
684 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
685 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
686 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
687 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
689 2012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
692 * Makefile (tests): Add tst-cond-except.
693 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
694 (__pthread_cond_timedwait): Mark instructions where %ebx is
695 incremented in PI case.
696 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
697 for the marked PI case instructions.
698 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
699 (__pthread_cond_wait): Mark instructions where %ebx is
700 incremented in PI case.
701 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
702 for the marked PI case instructions.
703 * tst-cond-except.c: New test case.
705 2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
707 * tst-tls6.sh: Add "set -e".
708 * Makefile: Do not specify -e option when running testsuite
711 * tst-tls6.sh: Add copyright header.
713 2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
715 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
716 to uint64_t for 64-bit store.
717 (THREAD_SETMEM_NC): Likewise.
719 2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
721 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
723 (THREAD_SETMEM_NC): Likewise.
725 2012-09-14 Jeff Law <law@redhat.com>
728 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
730 2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
733 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
736 2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
738 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
739 (LDLIBS-tst-cancel24): This.
741 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
744 * Makefile (tests-static): Add tst-cancel21-static.
746 * tst-cancel21-static.c: New file.
748 2012-09-01 Joseph Myers <joseph@codesourcery.com>
750 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
751 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
752 [__NR_clock_getres]: Make code unconditional.
753 (pthread_getcpuclockid): Remove code left unreachable by removal
756 2012-08-31 Joseph Myers <joseph@codesourcery.com>
759 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
760 atomic_compare_and_exchange_bool_rel.
761 * tst-sem14.c: New file.
762 * Makefile (tests): Add tst-sem14.
764 2012-08-15 Roland McGrath <roland@hack.frob.com>
766 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
768 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
769 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
771 2012-08-16 Joseph Myers <joseph@codesourcery.com>
773 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
774 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
775 * pthread_condattr_setclock.c (pthread_condattr_setclock)
776 [!__ASSUME_POSIX_TIMERS]: Likewise.
777 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
778 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
779 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
780 [!__ASSUME_POSIX_TIMERS]: Likewise.
781 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
782 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
783 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
785 [!__NR-timer_create]: Remove conditional code.
786 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
787 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
789 [!__NR_timer_delete]: Remove conditional code.
790 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
791 * sysdeps/unix/sysv/linux/timer_getoverr.c
792 [__NR_timer_getoverrun]: Make code unconditional.
793 [!__NR_timer_getoverrun]: Remove conditional code.
794 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
795 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
796 Make code unconditional.
797 [!__NR_timer_gettime]: Remove conditional code.
798 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
799 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
800 Make code unconditional.
801 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
802 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
803 Make code unconditional.
804 [!__NR_timer_settime]: Remove conditional code.
805 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
806 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
807 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
810 2012-08-15 Tom de Vries <vries@codesourcery.com>
811 Maxim Kuvyrkov <maxim@codesourcery.com>
813 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
814 (__libc_lock_trylock): Allow pre-existing definitions.
816 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
818 * pthread_spin_lock.c: New file.
819 * pthread_spin_trylock.c: New file.
821 2012-08-08 Joseph Myers <joseph@codesourcery.com>
823 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
825 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
826 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
828 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
829 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
830 Make code unconditional.
831 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
832 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
833 __NR_tgkill]: Make code unconditional.
834 (raise) [__ASSUME_TGKILL]: Likewise.
835 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
836 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
837 [__ASSUME_TGKILL]: Make code unconditional.
838 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
839 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
840 __NR_tgkill]: Make code unconditional.
841 (raise) [__ASSUME_TGKILL]: Likewise.
842 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
844 2012-08-07 Joseph Myers <joseph@codesourcery.com>
846 * sysdeps/pthread/createthread.c (create_thread)
847 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
849 2012-08-03 Joseph Myers <joseph@codesourcery.com>
851 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
853 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
855 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
857 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
858 (pagesize): New static variable.
859 (allocate_and_test): Return MEM. Rename parameter to TARGET.
860 (check_stack_top): New local variables MEM and PAGEMASK. Cap
861 stack size to MAX_STACK_SIZE. Call allocate_and_test for
862 halfway up the stack top page. Verify that the top page was
864 (do_test): Get pagesize using sysconf.
866 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
868 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
870 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
871 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
874 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
876 * tst-pthread-getattr.c: Revert last change.
878 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
880 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
883 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
885 (check_stack_top): Read valued written into STACKADDR in
886 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
888 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
890 * nptl-init.c (sighandler_setxid): Fix the comment that
893 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
895 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
896 (__lll_robust_timedlock_wait): Simplify CFI directives.
898 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
901 * Makefile (tests): Add test case.
902 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
903 the __libc_stack_end page from stacksize. Truncate stacksize to
904 make it page aligned when it is computed from RLIMIT_STACK.
905 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
908 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
911 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
914 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
915 Jakub Jelinek <jakub@redhat.com>
918 * sysdeps/pthread/pthread.h
919 [!(defined __GNUC__ && defined __EXCEPTIONS)]
920 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
921 __libc_unlikely instead of __builtin_expect.
923 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
926 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
927 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
928 * sysdeps/unix/sysv/linux/i386/Implies: New file.
929 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
930 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
932 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
933 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
935 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
937 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
940 * nptl-init.c (pthread_functions): Remove use of INTUSE and
942 (__pthread_initialize_minimal_internal): Likewise.
943 * sem_open.c: Likewise.
944 * sem_unlink.c: Likewise.
945 * pthreadP.h: Replace _internal aliases by hidden_proto
947 * pthread_getspecific.c: Replace _internal alias by hidden_def.
948 * pthread_key_create.c: Likewise.
949 * pthread_mutex_destroy.c: Likewise.
950 * pthread_mutex_init.c: Likewise.
951 * pthread_mutex_lock.c: Likewise.
952 * pthread_mutex_unlock.c: Likewise.
953 * pthread_once.c: Likewise.
954 * pthread_rwlock_rdlock.c: Likewise.
955 * pthread_rwlock_unlock.c: Likewise.
956 * pthread_rwlock_wrlock.c: Likewise.
957 * pthread_setspecific.c: Likewise.
958 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
960 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
962 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
964 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
965 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
966 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
967 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
968 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
969 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
970 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
971 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
972 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
973 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
975 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
977 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
980 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
982 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
983 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
985 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
986 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
988 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
989 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
990 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
991 (pthread_barrier_wait): Likewise.
992 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
993 (__pthread_cond_broadcast): Likewise.
994 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
995 (__pthread_cond_signal): Likewise.
996 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
997 (__pthread_cond_timedwait): Likewise.
998 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
1000 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
1001 (__pthread_rwlock_rdlock): Likewise.
1002 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1003 (pthread_rwlock_timedrdlock): Likewise.
1004 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1005 (pthread_rwlock_timedwrlock): Likewise.
1006 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
1007 (__pthread_rwlock_unlock): Likewise.
1008 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
1009 (__pthread_rwlock_wrlock): Likewise.
1010 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
1011 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1012 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1014 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1016 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
1019 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
1020 __libc_stack_end rounded to the end of containing page as the
1023 2012-05-25 Rayson Ho <rho@redhat.com>
1025 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
1027 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1028 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1029 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1030 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1031 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1032 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1033 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1034 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1036 2012-05-25 Rayson Ho <rho@redhat.com>
1037 Roland McGrath <roland@hack.frob.com>
1039 * DESIGN-systemtap-probes.txt: New file.
1040 * pthread_cond_broadcast.c: SystemTap probes.
1041 * pthread_cond_init.c: Likewise.
1042 * pthread_cond_signal.c: Likewise.
1043 * pthread_cond_wait.c: Likewise.
1044 * pthread_cond_destroy.c: Likewise.
1045 * pthread_create.c: Likewise.
1046 * pthread_join.c: Likewise.
1047 * pthread_mutex_destroy.c: Likewise.
1048 * pthread_mutex_init.c: Likewise.
1049 * pthread_mutex_lock.c: Likewise.
1050 * pthread_mutex_timedlock.c: Likewise.
1051 * pthread_mutex_unlock.c: Likewise.
1052 * pthread_rwlock_destroy.c: Likewise.
1053 * pthread_rwlock_rdlock.c: Likewise.
1054 * pthread_rwlock_unlock.c: Likewise.
1055 * pthread_rwlock_wrlock.c: Likewise.
1056 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1057 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1058 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1059 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1060 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1061 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1062 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1063 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1065 2012-05-24 Roland McGrath <roland@hack.frob.com>
1067 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
1069 2012-05-17 Andreas Jaeger <aj@suse.de>
1071 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1072 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
1073 only for older kernels.
1075 2012-05-15 Joseph Myers <joseph@codesourcery.com>
1077 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
1080 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1082 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
1083 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
1084 (lll_robust_lock): Likewise.
1085 (lll_cond_lock): Likewise.
1086 (lll_robust_cond_lock): Likewise.
1087 (lll_timedlock): Likewise.
1088 (lll_robust_timedlock): Likewise.
1089 (lll_unlock): Likewise.
1090 (lll_robust_unlock): Likewise.
1092 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1094 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
1095 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
1097 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1099 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
1101 (__gcc_personality_v0): Replace 8-byte data alignment with
1102 LP_SIZE alignment and .quad with ASM_ADDR.
1104 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1106 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
1108 (__gcc_personality_v0): Replace 8-byte data alignment with
1109 LP_SIZE alignment and .quad with ASM_ADDR.
1111 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1113 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
1114 NWAITERS, which is unsigned long int.
1116 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1118 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
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_wait.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_timedwait.S: Use
1133 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
1134 __vdso_clock_gettime pointer into RAX_LP.
1135 (__gcc_personality_v0): Replace 8-byte data alignment with
1136 LP_SIZE alignment and .quad with ASM_ADDR.
1138 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1140 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
1141 LP_OP(cmp) and R8_LP on dep_mutex pointer.
1143 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1145 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
1146 to update pointer in memory. Load pointer into RDI_LP.
1148 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1150 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1151 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
1153 (LLL_STUB_UNWIND_INFO_END): Likewise.
1154 (lll_timedlock): Load timeout pointer into RDX_LP.
1155 (lll_robust_timedlock): Likewise.
1157 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
1158 Jakub Jelinek <jakub@redhat.com>
1161 * Makefile (tests): Add test cases.
1162 * descr.h (struct pthread): Add a comment describing multiple_threads.
1163 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
1164 single-process case.
1165 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
1166 before setting cancelstate of the thread.
1167 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
1168 (__libc_multiple_threads): Add explanatory comment.
1169 * tst-cancel-self-cancelstate.c: New test case.
1170 * tst-cancel-self-canceltype.c: Likewise.
1171 * tst-cancel-self-cleanup.c: Supporting file for test cases.
1172 * tst-cancel-self-testcancel.c: New test case.
1173 * tst-cancel-self.c: Likewise.
1174 * vars.c: Expand comment to include single-process case.
1176 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1178 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
1179 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
1182 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1184 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
1186 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
1187 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
1189 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1191 * shlib-versions: Move x86_64-.*-linux.* entry to ...
1192 * sysdeps/x86_64/64/shlib-versions: Here. New file.
1193 * sysdeps/x86_64/x32/shlib-versions: New file.
1195 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1197 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
1198 __SIZEOF_PTHREAD_XXX_T.
1199 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
1200 (pthread_mutex_t): Likewise.
1201 (pthread_rwlock_t): Likewise.
1202 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
1205 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1207 * sysdeps/x86_64/x32/tls.h: New file.
1209 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1211 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
1213 (THREAD_SETMEM_NC): Likewise.
1215 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1217 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
1220 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1222 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1223 (__cleanup_fct_attribute): Check __x86_64__ instead of
1226 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1228 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
1229 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
1230 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
1231 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1232 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1234 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1236 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
1237 instead of __WORDSIZE.
1239 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
1242 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
1244 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
1246 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1247 (__pthread_cond_timedwait): Use CFI directives.
1248 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1249 (__pthread_cond_wait): Likewise.
1250 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1251 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1253 2012-05-03 David S. Miller <davem@davemloft.net>
1255 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
1256 always have to return 0, especially for the pthread_spin_init
1258 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
1260 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
1261 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
1263 2012-05-02 David S. Miller <davem@davemloft.net>
1265 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
1266 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
1267 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
1268 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
1269 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
1270 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
1271 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
1272 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
1273 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
1274 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
1275 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
1276 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
1277 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
1278 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
1279 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
1280 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
1281 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
1282 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
1284 2012-05-02 Allan McRae <allan@archlinux.org>
1286 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
1287 (LDFLAGS-tst-cancel24): Likewise.
1289 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
1291 * sysdeps/i386/pthread_spin_lock.S: New.
1292 * sysdeps/i386/pthread_spin_lock.c: Delete.
1293 * sysdeps/x86_64/pthread_spin_lock.S: New.
1294 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
1296 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
1298 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
1299 run when cross-compiling.
1301 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
1303 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
1304 instead of libgcc_s.h.
1306 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
1308 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
1310 2012-03-27 David S. Miller <davem@davemloft.net>
1312 * tst-cond16.c (do_test): Use a thread stack size which is either
1313 PTHREAD_STACK_MIN or the page size, whichever is larger.
1314 * tst-cond18.c (do_test): Likewise.
1316 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1318 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
1319 register char * __asm__("rsp") to get stack frame.
1321 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1323 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
1324 __NR_futex directly.
1326 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1328 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
1331 2012-03-16 David S. Miller <davem@davemloft.net>
1334 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
1336 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
1339 2012-03-15 David S. Miller <davem@davemloft.net>
1342 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
1344 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
1347 * pt-crti.S: Replace FSF snail mail address with URL.
1349 2012-03-09 Joseph Myers <joseph@codesourcery.com>
1351 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
1352 Do not define before including <time.h>.
1354 2012-03-08 David S. Miller <davem@davemloft.net>
1356 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
1358 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
1360 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1361 Check for timestamp before the Epoch.
1363 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
1366 * tst-sem13.c (do_test): Add another test case.
1367 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1368 Fix updating nwaiters.
1370 2012-03-07 Joseph Myers <joseph@codesourcery.com>
1373 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
1374 link test to a compile test.
1375 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
1377 * sysdeps/pthread/configure: Regenerated.
1379 2012-03-07 Ulrich Drepper <drepper@gmail.com>
1381 * Makefile (distribute): Remove variable.
1383 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
1385 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
1386 superfluous assignment.
1387 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
1389 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1390 (sem_timedwait): Likewise.
1392 2012-03-06 Ulrich Drepper <drepper@gmail.com>
1394 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
1395 installed headers to...
1396 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
1398 2012-03-06 David S. Miller <davem@davemloft.net>
1400 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
1401 atomic_increment and remove unused local variable.
1402 (__old_sem_post): Likewise.
1404 2012-02-27 David S. Miller <davem@davemloft.net>
1406 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
1407 non-existing __pthread_attr.
1408 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1409 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1410 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1411 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1412 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1414 2012-02-26 Ulrich Drepper <drepper@gmail.com>
1416 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
1418 * sysdeps/pthread/pthread.h: Define __need_timespec before including
1420 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1422 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1423 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1424 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1425 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1426 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1428 2012-02-21 Joseph Myers <joseph@codesourcery.com>
1431 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1433 [crti.S not in sysdirs] (omit-deps): Do not append.
1434 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1435 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1436 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1437 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1438 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1439 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1440 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1441 [crti.S in sysdirs] (extra-objs): Append unconditionally.
1442 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1444 * sysdeps/pthread/pt-initfini.c: Remove file.
1446 2012-02-16 Richard Henderson <rth@twiddle.net>
1448 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1449 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1451 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1453 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1455 2012-02-16 David S. Miller <davem@davemloft.net>
1457 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1459 2012-02-15 Marek Polacek <polacek@redhat.com>
1461 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1463 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
1465 Replace FSF snail mail address with URLs, as per GNU coding standards.
1467 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
1469 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1471 2012-02-08 Joseph Myers <joseph@codesourcery.com>
1473 Support crti.S and crtn.S provided directly by architectures.
1474 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1475 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1476 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1477 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1478 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1479 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1480 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1481 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1482 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1483 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1484 * pt-crti.S: New file.
1485 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1487 2012-02-03 Joseph Myers <joseph@codesourcery.com>
1489 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1490 macros for PIC register setup.
1491 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1492 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1493 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1494 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1495 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1497 2012-01-11 Marek Polacek <polacek@redhat.com>
1499 * forward.c (FORWARD_NORETURN): Define macro.
1500 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1501 (__pthread_exit): Likewise.
1503 2012-01-10 Ulrich Drepper <drepper@gmail.com>
1505 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1507 * pthreadP.h: Add noreturn to __pthread_exit.
1508 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1510 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
1512 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1513 Call pthread_attr_setstacksize() with result of
1514 __pthread_get_minstack() to account for application TLS usage.
1516 2012-01-08 Marek Polacek <polacek@redhat.com>
1518 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1520 2012-01-07 Ulrich Drepper <drepper@gmail.com>
1523 * pthreadP.h: Use const instead of __const.
1524 * semaphore.h: Likewise.
1525 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1526 * sysdeps/pthread/bits/sigthread.h: Likewise.
1527 * sysdeps/pthread/pthread.h: Likewise.
1529 * Makefile: Remove elf=yes test, only ELF is supported.
1531 * shlib-versions: Remove entries for ports architectures.
1533 In case anyone cares, the IA-64 architecture could move to ports.
1534 * sysdeps/ia64/*: Removed.
1535 * sysdeps/unix/sysv/linux/ia64/*: Removed.
1537 2011-12-22 Ulrich Drepper <drepper@gmail.com>
1539 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1540 __pthread_get_minstack.
1541 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1544 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1545 through __pthread_get_minstack.
1546 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1547 directly from _rtld_global_ro.
1548 (__pthread_get_minstack): New function.
1549 * pthreadP.h: Declare __pthread_get_minstack.
1550 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1552 2011-12-21 Ulrich Drepper <drepper@gmail.com>
1555 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1556 Correct reading name from file.
1558 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
1560 * allocatestack.c (allocate_stack): Return errno on failure.
1562 2011-12-14 Jeff Law <law@redhat.com>
1565 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1567 2011-11-28 Andreas Schwab <schwab@redhat.com>
1569 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1570 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1571 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1573 2011-11-15 Ulrich Drepper <drepper@gmail.com>
1575 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1578 2011-10-29 Ulrich Drepper <drepper@gmail.com>
1581 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1582 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1583 path for kernels with FUTEX_CLOCK_REALTIME.
1584 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1586 2011-10-27 Andreas Schwab <schwab@redhat.com>
1589 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1590 for memory synchronization functions.
1591 * semaphore.h: Likewise.
1593 2011-10-24 Ulrich Drepper <drepper@gmail.com>
1595 * tst-cancel7.c: Avoid warning.
1596 * tst-mutex6.c: Likewise.
1597 * tst-mutex9.c: Likewise.
1598 * tst-mutexpi6.c: Likewise.
1600 2011-10-23 Ulrich Drepper <drepper@gmail.com>
1602 * sysdeps/i386/tls.h: Remove #include <list.h>.
1604 2011-10-15 Ulrich Drepper <drepper@gmail.com>
1606 * pthread_create.c (start_thread): Call __ctype_init.
1608 2011-09-15 Andreas Schwab <schwab@redhat.com>
1610 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1612 (list_add): Add atomic_write_barrier.
1613 * descr.h: Define __need_list_t before including <list.h>.
1614 * nptl-init.c: Include <list.h>
1615 * allocatestack.c: Likewise.
1617 2011-09-11 Ulrich Drepper <drepper@gmail.com>
1619 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1620 * sysdeps/ia64/tls.h: Likewise.
1621 * sysdeps/powerpc/tls.h: Likewise.
1622 * sysdeps/s390/tls.h: Likewise.
1623 * sysdeps/sh/tls.h: Likewise.
1624 * sysdeps/sparc/tls.h: Likewise.
1625 * sysdeps/x86_64/tls.h: Likewise.
1627 2011-09-10 Ulrich Drepper <drepper@gmail.com>
1629 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1631 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1633 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1634 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1635 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1636 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1637 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1638 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1639 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1640 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1641 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1642 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1643 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1644 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1646 * tst-tls1.c: Support for __thread is now mandatory.
1647 * tst-tls2.c: Likewise.
1648 * tst-tls3.c: Likewise.
1649 * tst-tls3mod.c: Likewise.
1650 * tst-tls4.c: Likewise.
1651 * tst-tls4moda.c: Likewise.
1652 * tst-tls4modb.c: Likewise.
1653 * tst-tls5.h: Likewise.
1655 2011-09-08 Ulrich Drepper <drepper@gmail.com>
1658 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1659 (pthread_rwlock_timedwrlock): Use correct macro in test.
1660 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1662 2011-09-06 Ulrich Drepper <drepper@gmail.com>
1664 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1665 use gettimeofday vsyscall, just call gettimeofday.
1666 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1667 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1668 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1670 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1672 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1673 Simplify __vdso_clock_gettime use.
1675 2011-09-05 David S. Miller <davem@davemloft.net>
1677 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1679 (sem_timedwait): Call it to force an exception region around
1680 the async cancel enable and the futex operation.
1681 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1682 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1683 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1684 (__new_sem_wait): Call it to force an exception region around
1685 the async cancel enable and the futex operation.
1686 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1687 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1689 2011-08-31 Andreas Schwab <schwab@redhat.com>
1691 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1694 2011-08-20 David S. Miller <davem@davemloft.net>
1696 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1698 2011-08-14 Roland McGrath <roland@hack.frob.com>
1700 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1701 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1703 2011-08-08 Andreas Schwab <schwab@redhat.com>
1705 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1707 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1708 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1710 2011-07-22 Ulrich Drepper <drepper@gmail.com>
1712 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1714 (__gcc_personality_v0): Likewise.
1715 (_Unwind_ForcedUnwind): Likewise.
1716 (_Unwind_GetCFA): Likewise.
1718 2011-07-14 Roland McGrath <roland@hack.frob.com>
1720 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1723 2011-06-30 Ulrich Drepper <drepper@gmail.com>
1725 * nptl-init.c (__nptl_set_robust): New function.
1726 (pthread_functions): Add reference.
1727 * npthreadP.h: Declare __nptl_set_robust.
1728 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1729 ptr_set_robust member.
1730 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1731 child if threads are used.
1733 2011-06-14 Andreas Jaeger <aj@suse.de>
1735 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1737 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1740 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1742 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1745 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1747 Patch partly by Robert Rex <robert.rex@exasol.com>.
1749 2011-01-19 Roland McGrath <roland@redhat.com>
1751 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1752 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1753 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1754 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1755 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1756 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1758 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1760 * Makefile (test-extras): Add tst-cleanup4aux.
1762 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1765 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1766 (__SETXID_2): Likewise.
1767 (__SETXID_3): Likewise.
1769 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1772 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1773 * alloca_cutoff.c: Add libc_hidden_def.
1775 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1778 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1779 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1780 of "struct pthread".
1782 2010-09-21 Andreas Schwab <schwab@redhat.com>
1784 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1785 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1786 (pthread_cleanup_push_defer_np): Likewise.
1788 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1790 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1793 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1794 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1796 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1797 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1799 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1801 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1803 2010-05-01 Alan Modra <amodra@gmail.com>
1805 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1806 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1807 to save temps. Correct cfi for possible later frame manipulation.
1808 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1809 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1810 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1811 (DOCARGS_6, UNDOCARGS_6): Likewise.
1812 (CENABLE, CDISABLE): Add nops for non-shared calls.
1814 2010-07-06 Andreas Schwab <schwab@redhat.com>
1816 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1819 2010-07-03 Ulrich Drepper <drepper@redhat.com>
1821 * tst-abstime.c (do_test): Some more cleanups
1823 2010-07-02 Ulrich Drepper <drepper@redhat.com>
1825 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1827 2010-07-01 Andreas Schwab <schwab@redhat.com>
1828 Ulrich Drepper <drepper@redhat.com>
1830 * Makefile (tests): Add tst-abstime.
1831 * tst-abstime.c: New file.
1832 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1833 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1834 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1835 (__lll_timedlock_wait): Likewise.
1836 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1837 (__lll_robust_timedlock_wait): Likewise.
1838 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1839 (__pthread_cond_timedwait): Likewise.
1840 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1841 (pthread_rwlock_timedrdlock): Likewise.
1842 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1843 (pthread_rwlock_timedwrlock): Likewise.
1844 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1847 2010-07-01 Ulrich Drepper <drepper@redhat.com>
1849 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1851 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1853 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1854 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1856 2010-04-09 Ulrich Drepper <drepper@redhat.com>
1859 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1860 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1861 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1863 * Makefile (libpthread-routines): Add pthread_getname and
1865 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1867 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1869 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1870 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1871 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1872 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1874 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1876 * pthread_cond_timedwait.c: Add check for
1877 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1878 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1881 2010-03-09 Ulrich Drepper <drepper@redhat.com>
1883 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1884 and the call fails wake eventually waiting setxid threads. Don't free
1885 stack here if we try starting a thread.
1886 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1887 if the clone call failed.
1889 2010-03-08 Andreas Schwab <schwab@redhat.com>
1891 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1892 * allocatestack.c (get_cached_stack): Set setxid_futex.
1893 (allocate_stack): Likewise.
1895 2010-03-05 Andreas Schwab <schwab@redhat.com>
1896 Ulrich Drepper <drepper@redhat.com>
1898 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1899 it is creating a thread or it is just being created.
1900 * pthread_create.c (start_thread): Wake setxid thread if it is
1902 (__pthread_create_2_1): Initialize setxid_futex.
1903 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1906 2010-01-15 Ulrich Drepper <drepper@redhat.com>
1908 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1910 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1912 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
1914 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1915 Fix pthread_cond_timedwait with requeue-PI.
1916 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1917 Fix pthread_cond_wait with requeue-PI.
1919 2010-01-14 Ulrich Drepper <drepper@redhat.com>
1921 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1922 and pthread_mutexattr_setrobust for GLIBC_2.12.
1923 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1924 * pthread_mutexattr_getrobust.c: Define alias
1925 pthread_mutexattr_getrobust.
1926 * pthread_mutexattr_setrobust.c: Define alias
1927 pthread_mutexattr_setrobust.
1929 2010-01-12 Ulrich Drepper <drepper@redhat.com>
1931 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1933 2010-01-08 Ulrich Drepper <drepper@redhat.com>
1935 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1937 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1939 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1940 call __gmon_start__.
1941 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1943 2009-12-17 Ulrich Drepper <drepper@redhat.com>
1945 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1948 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1950 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1951 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1952 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1953 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1954 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1955 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1956 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1957 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1959 2009-12-12 Ulrich Drepper <drepper@redhat.com>
1961 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1962 Don't update nwaiters after invalid timeout is recognized.
1964 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1966 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1969 2009-11-27 Andreas Schwab <schwab@redhat.com>
1971 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1972 THREAD_SELF->cancelhandling after returning from futex call.
1974 2009-11-24 Ulrich Drepper <drepper@redhat.com>
1976 * tst-sem13.c: New file.
1977 * Makefile (tests): Add tst-sem13.
1979 2009-11-22 Roland McGrath <roland@redhat.com>
1981 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1982 instead of recapitulating its contents.
1984 2009-11-18 Ulrich Drepper <drepper@redhat.com>
1986 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1987 optimizations and cleanups.
1989 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1991 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1992 Remove redundant code. Fix cfi offsets.
1993 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1996 2009-11-17 Ulrich Drepper <drepper@redhat.com>
1998 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1999 reduce size of unwind info.
2001 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
2003 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2004 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
2006 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
2009 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
2011 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
2013 2009-10-30 Ulrich Drepper <drepper@redhat.com>
2015 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
2018 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
2019 steps to avoid races with creation and terminations.
2020 * nptl-init.c (sighandler_setxid): Adjust.
2021 Patch by Daniel Jacobowitz.
2023 2009-09-07 Andreas Schwab <schwab@redhat.com>
2025 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
2027 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
2028 Joseph Myers <joseph@codesourcery.com>
2031 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2032 Initialize the sigev_notify field for newly created timer to make sure
2033 the timer gets deleted from the active timer's list upon timer_delete.
2035 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
2037 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2038 Correct a logic error.
2040 2009-08-25 Ulrich Drepper <drepper@redhat.com>
2042 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
2043 of the field in local variables.
2044 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
2045 variable and don't unconditionally clear it.
2047 2009-08-24 Ulrich Drepper <drepper@redhat.com>
2049 * pthread_create.c (start_thread): Hint to the kernel that memory for
2050 the stack can be reused. We do not mark all the memory. The part
2051 still in use and some reserve are kept.
2053 2009-08-23 Ulrich Drepper <drepper@redhat.com>
2055 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
2057 2009-08-11 Ulrich Drepper <drepper@redhat.com>
2059 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
2062 2009-08-10 Ulrich Drepper <drepper@redhat.com>
2064 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
2066 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2068 2009-08-10 Andreas Schwab <schwab@redhat.com>
2070 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2071 (__pthread_cond_signal): Don't clobber register used for syscall
2074 2009-08-08 Ulrich Drepper <drepper@redhat.com>
2076 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2077 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
2079 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2080 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
2083 2009-08-07 Ulrich Drepper <drepper@redhat.com>
2085 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
2086 enabled by the special *_asynccancel functions.
2087 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2088 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2090 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
2092 2009-08-04 Ulrich Drepper <drepper@redhat.com>
2094 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
2095 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
2096 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
2097 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
2098 since we can assume the special __*_{en,dis}able_asynccancel
2100 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
2101 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
2102 and PTHREAD_CANCELED.
2104 2009-07-31 Ulrich Drepper <drepper@redhat.com>
2106 * descr.h: Better definition of *_BITMASK macros for cancellation.
2108 2009-07-29 Ulrich Drepper <drepper@redhat.com>
2110 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
2112 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
2113 dynamic linker might have to save.
2114 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
2115 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
2118 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
2120 2009-07-28 Ulrich Drepper <drepper@redhat.com>
2122 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
2124 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
2125 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
2126 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
2127 requeue_pi for robust mutexes.
2128 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2129 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2130 Don't only skip __pthread_mutex_cond_lock. Call instead
2131 __pthread_mutex_cond_lock_adjust.
2132 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2134 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
2135 optimization of PI mutex handling.
2137 2009-07-27 Ulrich Drepper <drepper@redhat.com>
2140 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
2141 instead of of _acq variants of cmpxchg.
2143 2009-07-23 Ulrich Drepper <drepper@redhat.com>
2145 * sysdeps/x86_64/configure.in: New file.
2147 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
2148 path when not using absolute timeout futex.
2150 2009-07-20 Ulrich Drepper <drepper@redhat.com>
2152 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
2153 optimizations of last changes.
2154 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2156 2009-07-19 Ulrich Drepper <drepper@redhat.com>
2158 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2159 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2160 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
2161 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2162 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2163 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
2164 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2165 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2167 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2168 (__pthread_cond_timedwait): Make more robust.
2170 2009-07-18 Ulrich Drepper <drepper@redhat.com>
2172 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2173 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
2174 directly use absolute timeout.
2176 * tst-sem5.c (do_test): Add test for premature timeout.
2177 * Makefile: Linu tst-sem5 with librt.
2179 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2180 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
2181 directly use absolute timeout.
2182 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2183 (pthread_rwlock_timedrdlock): Likewise.
2185 * tst-cond11.c (run_test): Add test to check that the timeout is
2188 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2189 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
2190 directly use absolute timeout.
2192 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2193 (__pthread_cond_wait): Convert to using exception handler instead of
2194 registered unwind buffer.
2195 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2196 (__pthread_cond_timedwait): Likewise.
2198 2009-07-17 Ulrich Drepper <drepper@redhat.com>
2200 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2201 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
2202 use absolute timeout.
2204 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
2205 handling of uncontested semaphore.
2207 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2208 (__condvar_cleanup): Rewrite to use cfi directives instead of
2209 hand-coded unwind tables.
2210 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
2212 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2213 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2216 2009-06-12 Ulrich Drepper <drepper@redhat.com>
2218 * Makefile (libpthread-routines): Add pthread_sigqueue.
2219 * Versions: Add pthread_sigqueue for GLIBC_2.11.
2220 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
2221 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
2223 2009-06-11 Ulrich Drepper <drepper@redhat.com>
2226 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2227 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
2229 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
2231 2009-05-16 Ulrich Drepper <drepper@redhat.com>
2233 * libc-cancellation.c: Move __libc_cleanup_routine to...
2234 * libc-cleanup.c: ...here. New file.
2235 * Makefile (routines): Add libc-cleanup.
2237 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
2239 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
2240 * sysdeps/pthread/librt-cancellation.c: Likewise.
2243 * nptl-init.c: Renamed from init.c.
2244 * Makefile: Change all occurences of init.c to nptl-init.c.
2246 2009-05-15 Ulrich Drepper <drepper@redhat.com>
2248 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
2249 to test when deciding on the delay.
2250 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2251 * pthread_cancel.c: Close race between deciding on sending a signal
2252 and setting the CANCELING_BIT bit.
2254 * cancellation.c (__pthread_disable_asynccancel): Don't return if
2256 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2258 2009-04-27 Ulrich Drepper <drepper@redhat.com>
2260 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
2262 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2263 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
2264 * sysdeps/i386/tls.h: Likewise.
2265 (tcbhead_t): Add __private_tm member.
2267 2009-04-26 Ulrich Drepper <drepper@redhat.com>
2269 * sem_open.c (sem_open): Rewrite initialization of initsem to
2272 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2273 Avoid warning by using may_alias attribute on ptrhack.
2275 2009-04-22 Ulrich Drepper <drepper@redhat.com>
2278 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
2279 Check policy and priority for validity.
2280 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
2282 2009-03-15 Ulrich Drepper <drepper@redhat.com>
2284 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2285 (__pthread_cond_timedwait): Change to use cfi directives instead of
2286 hand-coded unwind sections.
2288 2009-03-10 Ulrich Drepper <drepper@redhat.com>
2290 * init.c (nptl_freeres): Compile only for SHARED.
2292 2009-03-09 Jakub Jelinek <jakub@redhat.com>
2294 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
2295 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
2296 FUTEX_BITSET_MATCH_ANY.
2298 2009-02-27 Roland McGrath <roland@redhat.com>
2300 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
2301 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
2303 2009-02-26 Ulrich Drepper <drepper@redhat.com>
2305 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2306 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
2307 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
2310 2009-02-25 Ulrich Drepper <drepper@redhat.com>
2312 * sysdeps/pthread/pthread.h: The robust mutex functions are in
2315 2009-02-24 Ulrich Drepper <drepper@redhat.com>
2317 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
2318 Unify name of include protector macro.
2320 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
2322 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2323 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
2325 2009-01-29 Ulrich Drepper <drepper@redhat.com>
2327 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
2330 * allocatestack.c (__free_stacks): Renamed from free_stacks.
2331 (__free_stack_cache): Removed. Change callers to call __free_stacks.
2332 * init.c (nptl_freeres): New function.
2333 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
2334 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
2335 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
2337 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
2338 load DSO. Assign last.
2339 (__unwind_freeres): New function.
2341 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
2342 for better debugging. No need to use stack_list_add here.
2344 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2346 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2347 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2348 instead of computing relative timeout.
2349 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2350 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2352 2009-01-25 Ulrich Drepper <drepper@redhat.com>
2354 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
2356 2009-01-08 Ulrich Drepper <drepper@redhat.com>
2358 * sysdeps/pthread/list.h (list_add): Initialize new element first.
2359 (list_add_tail): Removed.
2361 2009-01-07 Ulrich Drepper <drepper@redhat.com>
2363 * (in_flight_stack): New variable.
2364 (stack_list_del): New function. Use instead of list_del.
2365 (stack_list_add): New function. Use instead of list_add when adding to
2366 stack_cache and stack_used lists.
2367 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
2368 when the fork call interrupted another thread.
2370 2009-01-04 Ulrich Drepper <drepper@redhat.com>
2372 * init.c (__pthread_initialize_minimal_internal): Optimize test
2373 FUTEX_CLOCK_REALTIME a bit.
2375 2009-01-03 Ulrich Drepper <drepper@redhat.com>
2377 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
2378 only passing five parameters to FUTEX_WAIT_BITSET call.
2380 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2381 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2382 instead of computing relative timeout.
2384 2009-01-02 Ulrich Drepper <drepper@redhat.com>
2386 * init.c (__pthread_initialize_minimal_internal): Check for
2387 FUTEX_CLOCK_REALTIME flag.
2388 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2389 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
2392 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2393 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2394 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2395 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2396 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2397 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2399 2008-12-09 Ulrich Drepper <drepper@redhat.com>
2401 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
2402 loop body instead of ; to avoid gcc warnings.
2403 (pthread_cleanup_pop_restore_np): Likewise.
2404 Patch by Caolán McNamara <caolanm@redhat.com>.
2406 2008-12-09 Jakub Jelinek <jakub@redhat.com>
2408 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
2409 fast path here, for robust/PI/PP mutexes call
2410 __pthread_mutex_lock_full. Don't use switch, instead use a series
2411 of ifs according to their probability.
2412 (__pthread_mutex_lock_full): New function.
2413 * pthread_mutex_unlock.c: Include assert.h.
2414 (__pthread_mutex_unlock_usercnt): Handle only the
2415 fast path here, for robust/PI/PP mutexes call
2416 __pthread_mutex_unlock_full. Don't use switch, instead use a series
2417 of ifs according to their probability.
2418 (__pthread_mutex_unlock_full): New function.
2419 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
2420 (__pthread_mutex_lock_full): Define.
2422 2008-12-08 Ulrich Drepper <drepper@redhat.com>
2424 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2425 implementation. Add necessary padding and.
2426 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2429 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2431 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2432 and FUTEX_WAKE_BITSET.
2434 2008-12-02 Ulrich Drepper <drepper@redhat.com>
2436 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2437 and FUTEX_WAKE_BITSET.
2438 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2439 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2440 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2441 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2443 2008-11-25 Roland McGrath <roland@redhat.com>
2445 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2446 Subdirectories moved to ports repository as
2447 sysdeps/.../nptl subdirectories.
2449 2008-11-12 Jakub Jelinek <jakub@redhat.com>
2452 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2454 * pthread_cond_init.c (__pthread_cond_init): Fix
2455 cond->__data.__nwaiters initialization.
2456 * Makefile (tests): Add tst-cond23.
2457 * tst-cond23.c: New test.
2459 2008-11-07 Jakub Jelinek <jakub@redhat.com>
2461 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2463 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2466 2008-11-01 Ulrich Drepper <drepper@redhat.com>
2469 * pthread_mutex_lock.c: Add support for private PI mutexes.
2470 * pthread_mutex_timedlock.c: Likewise.
2471 * pthread_mutex_trylock.c: Likewise.
2472 * pthread_mutex_unlock.c: Likewise.
2473 Patch mostly by Ben Jackson <ben@ben.com>.
2475 2008-10-31 Ulrich Drepper <drepper@redhat.com>
2478 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2479 Increase stack size for helper thread.
2481 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2483 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2484 assembly with a clobber list for access registers a0 and a1.
2486 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
2488 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2489 to force runp->refcntr to be read from memory.
2491 2008-09-08 Richard Guenther <rguenther@suse.de>
2493 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2494 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2495 lll_timedlock, lll_robust_timedlock, lll_unlock,
2496 lll_robust_unlock): Promote private to int.
2498 2008-08-15 Ulrich Drepper <drepper@redhat.com>
2500 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2501 ARCH_RETRY_MMAP definitions.
2502 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2503 Define MAP_STACK when not defined.
2504 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
2505 handling of ARCH_RETRY_MMAP.
2507 2008-07-30 Ulrich Drepper <drepper@redhat.com>
2509 * tst-align2.c (f): Print message that f is reached.
2511 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
2514 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2515 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2517 2008-07-25 Ulrich Drepper <drepper@redhat.com>
2519 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2520 SOCK_CLOEXEC if possible.
2522 2008-05-29 Ulrich Drepper <drepper@redhat.com>
2524 * Makefile (tests): Add tst-rwlock2a.
2525 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2526 * tst-rwlock2a.c: New file.
2528 2008-06-12 Ulrich Drepper <drepper@redhat.com>
2530 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2532 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
2534 * sysdeps/pthread/pthread.h: Fix typo in comment.
2536 2008-05-28 Ulrich Drepper <drepper@redhat.com>
2538 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2539 of CPU set to the kernel.
2541 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2543 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2545 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2546 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2547 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2548 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2549 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2550 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2552 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
2554 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2556 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2558 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2560 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2563 2008-05-26 Ulrich Drepper <drepper@redhat.com>
2565 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2567 2008-05-20 Jakub Jelinek <jakub@redhat.com>
2569 David S. Miller <davem@davemloft.net>
2571 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2573 2008-05-10 Ulrich Drepper <drepper@redhat.com>
2575 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2576 __pshared correctly.
2577 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2579 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2581 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2583 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2585 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2587 2008-04-14 David S. Miller <davem@davemloft.net>
2589 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2590 (__old_sem_wait): Fix argument to lll_futex_wait().
2592 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2594 * pthread_create.c: Require pthread_mutex_trylock and
2595 pthread_key_delete for libgcc.
2597 2008-04-08 Jakub Jelinek <jakub@redhat.com>
2600 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2601 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2602 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2604 2008-03-27 Ulrich Drepper <drepper@redhat.com>
2606 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2607 <linux/limits.h> has defined it.
2608 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2609 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2610 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2611 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2613 2008-03-18 Jakub Jelinek <jakub@redhat.com>
2615 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2617 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2618 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2620 2008-03-14 Ulrich Drepper <drepper@redhat.com>
2622 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2623 HAVE_DL_DISCOVER_OSVERSION.
2624 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2625 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2627 2008-03-07 Ulrich Drepper <drepper@redhat.com>
2630 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2631 _POSIX_CHOWN_RESTRICTED value to zero.
2633 2008-01-31 Roland McGrath <roland@redhat.com>
2635 * Makefile (omit-deps): Variable removed.
2637 2008-01-30 Ulrich Drepper <drepper@redhat.com>
2639 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2640 unnecessary addr32 prefix.
2642 2008-01-29 Roland McGrath <roland@redhat.com>
2644 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2646 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2648 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2650 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2652 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2654 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2655 (__lll_lock_wait_private): Fix typo.
2656 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2657 (pthread_barrier_wait): Likewise. Adjust XADD use.
2658 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2660 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2661 (pthread_rwlock_timedrdlock): Return correct return value.
2662 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2663 (pthread_rwlock_timedwrlock): Likewise.
2665 2008-01-15 Ulrich Drepper <drepper@redhat.com>
2667 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2668 thread returns the program exits with an error code.
2670 2008-01-10 Ulrich Drepper <drepper@redhat.com>
2672 * pthread-errnos.sym: Add EOVERFLOW.
2673 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2674 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2675 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2676 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2678 2007-12-14 Ulrich Drepper <drepper@redhat.com>
2680 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2681 parameter. Passed it as permission to mmap.
2682 * allocatestack.c (allocate_stack): Pass prot as second parameter
2685 2007-12-12 Ulrich Drepper <drepper@redhat.com>
2687 * tst-basic7.c: Allocate memory for the stack.
2690 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2691 (__pthread_cond_timedwait): Don't use VDSO.
2692 Patch by Michal Januszewski.
2694 2007-12-07 Ulrich Drepper <drepper@redhat.com>
2697 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2698 Allow label before pthread_cleanup_pop.
2699 (pthread_cleanup_pop_restore_np): Likewise.
2701 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2703 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2704 Store 2 before returning ETIMEDOUT.
2706 2007-11-23 Ulrich Drepper <drepper@redhat.com>
2708 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2709 Store 2 before returning ETIMEDOUT.
2710 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2711 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2712 (__lll_lock_wait_private): Optimize.
2713 (__lll_lock_wait): Likewise.
2715 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2717 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2718 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2719 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2721 2007-11-08 Ulrich Drepper <drepper@redhat.com>
2724 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2725 If we time out, try one last time to lock the futex to avoid
2726 losing a wakeup signal.
2727 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2728 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2731 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2734 2007-11-07 Ulrich Drepper <drepper@redhat.com>
2737 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2738 mmap failed to EAGAIN.
2739 * Makefile (tests): Add tst-basic7.
2740 * tst-basic7.c: New file.
2742 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2744 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2745 Use __linkin_atfork.
2747 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2749 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2750 missing line continuations.
2751 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2752 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2754 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2757 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2758 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2759 (struct timer): Add next element.
2760 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2761 enqueue timer structure into __active_timer_sigev_thread list.
2762 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2763 remove timer struct from __active_timer_sigev_thread.
2764 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2765 Before using timer structure make sure it is still on the
2766 __active_timer_sigev_thread list. Keep lock until done.
2767 Define __active_timer_sigev_thread and
2768 __active_timer_sigev_thread_lock.
2770 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2772 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2773 Redefine thread_atfork for use of ATFORK_MEM.
2774 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2775 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2777 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2778 Use atomic operation when removing first element of list.
2780 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2782 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2783 routine instead of an alias to __new_sem_post.
2785 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2787 * init.c (__pthread_initialize_minimal): Initialize word to appease
2790 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2792 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2793 libc.so just clear NAME.
2794 (__libc_rwlock_fini): Nop inside of libc.so.
2795 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2798 2007-09-02 Ulrich Drepper <drepper@redhat.com>
2800 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2801 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2803 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2805 2007-08-21 Ulrich Drepper <drepper@redhat.com>
2808 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2809 reclaimed stack if necessary.
2810 * Makefile (tests): Add tst-tsd6.
2811 * tst-tsd6.c: New file.
2813 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2815 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2816 Add private argument.
2818 2007-08-20 Ulrich Drepper <drepper@redhat.com>
2820 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2821 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2823 2007-08-16 Jakub Jelinek <jakub@redhat.com>
2825 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2826 (__lll_robust_timedlock): Pass private as last argument to
2827 __lll_robust_timedlock_wait.
2828 (__lll_unlock): Fix a pasto.
2830 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2832 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2833 sparc_old_sem): New structs.
2834 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2835 (__sem_wait_cleanup): New function.
2836 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2837 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2838 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2840 (__old_sem_wait): New function.
2841 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2842 nptl/sysdeps/unix/sysv/linux/sparc version.
2843 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2845 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2846 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2847 (__new_sem_trywait): Use sparc_old_sem structure.
2848 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2849 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2850 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2851 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2852 lll_futex_timed_wait.
2853 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2854 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2855 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2857 (__old_sem_post): New function.
2858 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2859 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2860 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2861 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2862 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2863 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2865 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2867 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2868 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2869 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2870 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2871 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2872 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2873 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2875 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2876 kernel-features.h and tcb-offsets.h.
2877 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2878 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2880 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2882 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2883 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2885 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2886 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2887 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2888 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2889 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2890 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2891 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2893 2007-08-14 Jakub Jelinek <jakub@redhat.com>
2895 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2896 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2897 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2898 lll_futex_timed_wait.
2900 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2901 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2902 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2903 __lll_robust_unlock, __lll_wait_tid): Likewise.
2905 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2907 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2909 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2910 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2911 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2912 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2913 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2914 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2915 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2916 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2918 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2919 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2920 process private. Switch DW_CFA_advance_loc1 and some
2921 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2922 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2923 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2924 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2925 process private. Switch DW_CFA_advance_loc{1,2} and some
2926 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2927 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2928 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2929 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2931 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2932 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2933 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2935 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2936 (__pthread_cond_broadcast): Compare %r8 instead of
2937 dep_mutex-cond_*(%rdi) with $-1.
2938 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2939 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2942 2007-08-13 Ulrich Drepper <drepper@redhat.com>
2944 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2946 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2948 * allocatestack.c: Include kernel-features.h.
2949 * pthread_create.c: Likewise.
2950 * pthread_mutex_init.c: Likewise.
2952 * pthread_cond_timedwait.c: Likewise.
2953 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2954 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2955 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2956 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2957 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2958 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2959 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2961 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2963 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2964 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2965 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2966 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2968 2007-08-12 Jakub Jelinek <jakub@redhat.com>
2970 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2971 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2972 byte elements. One of them is the new __shared element.
2973 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2974 adjust names of other padding elements.
2975 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2976 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2977 byte elements. One of them is the new __shared element.
2978 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2979 adjust names of other padding elements.
2980 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2981 Renamed __pad1 element to __shared, adjust names of other padding
2983 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2984 (pthread_rwlock_t): Likewise.
2985 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2988 2007-08-09 Anton Blanchard <anton@samba.org>
2990 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2992 2007-08-12 Ulrich Drepper <drepper@redhat.com>
2994 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2995 <kernel-features.h>.
2996 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2998 2007-08-11 Ulrich Drepper <drepper@redhat.com>
3000 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
3001 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
3002 dealing with robust mutexes.
3003 * pthread_mutex_timedlock.c: Likewise.
3004 * pthread_mutex_trylock.c: Likewise.
3005 * pthread_mutex_unlock.c: Likewise.
3006 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3008 2007-08-06 Jakub Jelinek <jakub@redhat.com>
3010 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
3011 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
3012 (PTHREAD_MUTEX_PSHARED): Define.
3013 * pthread_mutex_init.c (__pthread_mutex_init): Set
3014 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
3016 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
3017 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
3018 as second argument to lll_lock.
3019 (LLL_MUTEX_TRYLOCK): Take mutex as argument
3020 instead of its __data.__lock field.
3021 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3022 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3024 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3025 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
3026 instead of mutex->__data.__kind directly, pass
3027 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
3028 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
3029 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3030 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
3031 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
3032 to lll_timedlock, lll_robust_timedlock, lll_unlock and
3033 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
3034 of mutex->__data.__kind directly.
3035 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
3036 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
3037 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
3038 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
3039 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
3040 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
3042 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
3043 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
3044 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3046 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
3047 Take mutex as argument instead of its __data.__lock field, pass
3048 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
3049 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
3050 __data.__lock field.
3051 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3052 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3053 to lll_robust_cond_lock.
3054 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
3055 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
3056 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
3057 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
3058 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
3059 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
3061 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
3062 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
3064 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
3065 pshared variable, pass it to lll_lock, lll_unlock,
3066 lll_futex_timedwait and lll_futex_wake.
3067 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
3068 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
3070 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
3071 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
3073 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
3074 lll_futex_wake_unlock): Likewise.
3075 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
3077 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
3078 lll_futex_wake_unlock): Likewise.
3079 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
3081 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
3082 lll_futex_wake_unlock): Likewise.
3083 (lll_futex_wake): Fix a typo.
3084 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
3085 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3086 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3087 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3088 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3089 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3090 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3091 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3092 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3093 (__pthread_cond_timedwait): Likewise.
3094 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3095 (__condvar_cleanup, __pthread_cond_wait): Likewise.
3097 2007-08-05 Jakub Jelinek <jakub@redhat.com>
3099 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3100 Don't use CGOTSETUP and CGOTRESTORE macros.
3101 (CGOTSETUP, CGOTRESTORE): Remove.
3102 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
3105 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3107 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
3108 definitions for private futexes.
3109 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
3110 kernel-features.h and lowlevellock.h. Use private futexes if
3112 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
3113 (__lll_mutex_lock_wait): Rename to
3114 (__lll_lock_wait): ... this. Don't compile in for libc.so.
3115 (__lll_mutex_timedlock_wait): Rename to ...
3116 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
3117 Don't compile in for libc.so.
3118 (__lll_mutex_unlock_wake): Rename to ...
3119 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
3120 (__lll_timedwait_tid): Use __NR_gettimeofday.
3121 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
3122 the header from assembler. Renamed all lll_mutex_* resp.
3123 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3124 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
3125 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
3127 (__lll_lock_wait_private): Add prototype.
3128 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
3129 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
3130 __lll_unlock_wake): Likewise.
3131 (lll_lock): Add private argument. Call __lll_lock_wait_private
3132 if private is constant LLL_PRIVATE.
3133 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3134 lll_timedlock, lll_robust_timedlock): Add private argument.
3135 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
3136 if private is constant LLL_PRIVATE.
3137 (lll_robust_unlock, lll_robust_dead): Add private argument.
3138 (lll_lock_t): Remove.
3139 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3140 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3141 lll_cond_wake, lll_cond_broadcast): Remove.
3142 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
3143 kernel-features.h and lowlevellock.h.
3144 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3145 (LOAD_FUTEX_WAIT): Define.
3146 (__lll_robust_mutex_lock_wait): Rename to ...
3147 (__lll_robust_lock_wait): ... this. Add private argument.
3148 Use LOAD_FUTEX_WAIT macro.
3149 (__lll_robust_mutex_timedlock_wait): Rename to ...
3150 (__lll_robust_timedlock_wait): ... this. Add private argument.
3151 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
3152 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
3154 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3155 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
3156 __lll_mutex_{lock,unlock}_*.
3157 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
3158 lowlevellock.h and pthread-errnos.h.
3159 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3160 FUTEX_CMP_REQUEUE, EINVAL): Remove.
3161 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
3162 __lll_mutex_{lock,unlock}_*.
3163 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
3164 lowlevellock.h and pthread-errnos.h.
3165 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
3166 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
3167 __lll_mutex_{lock,unlock}_*.
3168 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3170 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
3171 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
3172 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3173 (__condvar_tw_cleanup): Likewise.
3174 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3176 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3177 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
3178 __lll_mutex_{lock,unlock}_*.
3179 ( __condvar_w_cleanup): Likewise.
3180 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
3181 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3182 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
3184 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3185 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
3186 __lll_mutex_{lock,unlock}_*.
3187 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
3189 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3190 FUTEX_PRIVATE_FLAG): Remove.
3191 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
3192 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3193 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
3195 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3196 FUTEX_PRIVATE_FLAG): Remove.
3197 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
3198 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3199 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
3201 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3202 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
3203 __lll_mutex_{lock,unlock}_*.
3204 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
3206 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3207 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
3208 __lll_mutex_{lock,unlock}_*.
3209 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
3210 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3211 (__new_sem_post): Use standard initial exec code sequences.
3212 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
3214 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3215 FUTEX_PRIVATE_FLAG): Remove.
3216 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
3217 exec code sequences.
3218 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
3219 (__new_sem_trywait): Use standard initial exec code sequences.
3220 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
3221 (__new_sem_wait): Use standard initial exec code sequences.
3223 2007-07-31 Anton Blanchard <anton@samba.org>
3225 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3226 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
3227 atomic_full_barrier.
3229 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3231 * allocatestack.c (stack_cache_lock): Change type to int.
3232 (get_cached_stack, allocate_stack, __deallocate_stack,
3233 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
3234 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
3235 as second argument to lll_lock and lll_unlock macros on
3237 * pthread_create.c (__find_in_stack_list): Likewise.
3238 (start_thread): Similarly with pd->lock. Use lll_robust_dead
3239 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
3241 * descr.h (struct pthread): Change lock and setxid_futex field
3243 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
3244 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
3245 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
3246 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
3248 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
3249 * pthread_cond_init.c (__pthread_cond_init): Likewise.
3250 * pthreadP.h (__attr_list_lock): Change type to int.
3251 * pthread_attr_init.c (__attr_list_lock): Likewise.
3252 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
3253 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
3255 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
3256 also for lll_futex_{wake,wait}.
3257 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
3259 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
3260 LLL_SHARED as second argument to lll_{,un}lock.
3261 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
3262 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
3263 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
3264 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
3266 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
3267 as second argument to lll_{,un}lock macros on pd->lock.
3268 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
3269 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
3270 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3271 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
3273 * sysdeps/pthread/createthread.c (do_clone, create_thread):
3275 * pthread_once.c (once_lock): Change type to int.
3276 (__pthread_once): Pass LLL_PRIVATE as second argument to
3277 lll_{,un}lock macros on once_lock.
3278 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
3279 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
3280 rwlock->__data.__shared as second argument to them and similarly
3282 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
3284 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
3286 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
3287 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
3288 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
3289 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3290 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
3291 to lll_{,un}lock macros on __sem_mappings_lock.
3292 * sem_open.c (check_add_mapping): Likewise.
3293 (__sem_mappings_lock): Change type to int.
3294 * semaphoreP.h (__sem_mappings_lock): Likewise.
3295 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3296 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
3297 instead of lll_*mutex_*, pass LLL_SHARED as last
3299 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
3300 pass LLL_SHARED as last argument.
3301 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
3302 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
3303 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
3304 pass LLL_SHARED as last argument.
3305 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3306 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
3307 LLL_SHARED as last argument.
3308 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
3309 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
3311 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
3312 __libc_lock_lock_recursive, __libc_lock_unlock,
3313 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
3314 argument to lll_{,un}lock.
3315 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
3316 _IO_lock_unlock): Likewise.
3317 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
3319 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3320 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
3322 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
3323 free_mem): Likewise.
3324 (__fork_lock): Change type to int.
3325 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
3326 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
3327 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
3329 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3330 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
3331 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
3333 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
3334 pass it through to lll_futex_*wait, only compile in when
3336 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3337 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
3338 argument and pass it through to lll_futex_*wait.
3339 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
3340 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
3341 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
3342 inline functions to __lll_* resp. __lll_robust_*.
3343 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
3344 (lll_mutex_dead): Add private argument.
3345 (__lll_lock_wait_private): New prototype.
3346 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
3347 __lll_robust_lock_timedwait): Add private argument to prototypes.
3348 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
3349 call __lll_lock_wait_private, otherwise pass private to
3351 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
3352 __lll_robust_timedlock): Add private argument, pass it to
3353 __lll_*wait functions.
3354 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
3355 call __lll_unlock_wake_private, otherwise pass private to
3357 (__lll_robust_unlock): Add private argument, pass it to
3358 __lll_robust_unlock_wake.
3359 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
3360 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
3361 argument, pass it through to __lll_* inline function.
3362 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
3363 (lll_lock_t): Remove.
3364 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3365 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3366 lll_cond_wake, lll_cond_broadcast): Remove.
3367 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3368 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3369 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3370 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3371 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
3372 the header from assembler. Renamed all lll_mutex_* resp.
3373 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3374 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
3375 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3376 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
3377 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
3378 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
3379 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
3381 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
3382 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
3383 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
3384 (lll_trylock): Likewise, use __lll_trylock_asm, pass
3385 MULTIPLE_THREADS_OFFSET as another asm operand.
3386 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
3387 MULTIPLE_THREADS_OFFSET as last asm operand, call
3388 __lll_lock_wait_private if private is constant LLL_PRIVATE,
3389 otherwise pass private as another argument to __lll_lock_wait.
3390 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3391 lll_timedlock, lll_robust_timedlock): Add private argument, pass
3392 private as another argument to __lll_*lock_wait call.
3393 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
3394 MULTIPLE_THREADS_OFFSET as another asm operand, call
3395 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
3396 otherwise pass private as another argument to __lll_unlock_wake.
3397 (lll_robust_unlock): Add private argument, pass private as another
3398 argument to __lll_unlock_wake.
3399 (lll_robust_dead): Add private argument, use __lll_private_flag
3401 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
3402 LLL_MUTEX_LOCK_INITIALIZER.
3403 (lll_lock_t): Remove.
3404 (LLL_LOCK_INITIALIZER_WAITERS): Define.
3405 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3406 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3407 lll_cond_wake, lll_cond_broadcast): Remove.
3408 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3409 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
3410 2007-05-2{3,9} changes.
3411 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
3412 kernel-features.h and lowlevellock.h.
3413 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3414 (LOAD_FUTEX_WAIT): Rewritten.
3415 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3417 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3418 (__lll_mutex_lock_wait): Rename to ...
3419 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
3420 %ecx, %ecx is now private argument. Don't compile in for libc.so.
3421 (__lll_mutex_timedlock_wait): Rename to ...
3422 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
3423 contains private argument. Don't compile in for libc.so.
3424 (__lll_mutex_unlock_wake): Rename to ...
3425 (__lll_unlock_wake): ... this. %ecx contains private argument.
3426 Don't compile in for libc.so.
3427 (__lll_timedwait_tid): Use __NR_gettimeofday.
3428 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3429 kernel-features.h and lowlevellock.h.
3430 (LOAD_FUTEX_WAIT): Define.
3431 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3433 (__lll_robust_mutex_lock_wait): Rename to ...
3434 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
3435 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
3437 (__lll_robust_mutex_timedlock_wait): Rename to ...
3438 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
3439 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3440 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3442 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3443 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3444 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3445 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3446 to __lll_lock_wait in %edx.
3447 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3448 Include lowlevellock.h and pthread-errnos.h.
3449 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3450 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3451 (__pthread_cond_broadcast): 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_signal.S:
3456 Include lowlevellock.h and pthread-errnos.h.
3457 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3458 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3459 (__pthread_cond_signal): 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
3463 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3464 Include lowlevellock.h.
3465 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3467 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3468 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3469 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3470 __lll_unlock_wake. Use __NR_gettimeofday.
3471 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3472 Include lowlevellock.h.
3473 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3474 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3475 to __lll_*, pass cond_lock address in %edx rather than %ecx to
3476 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3477 and __lll_unlock_wake.
3478 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3479 Include lowlevellock.h.
3480 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3481 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3482 MUTEX(%ebx) address in %edx rather than %ecx to
3483 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3484 and __lll_unlock_wake. Move return value from %ecx to %edx
3486 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3487 Include lowlevellock.h.
3488 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3490 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3491 MUTEX(%ebp) address in %edx rather than %ecx to
3492 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3493 and __lll_unlock_wake. Move return value from %ecx to %edx
3494 register. Use __NR_gettimeofday.
3495 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3496 Include lowlevellock.h.
3497 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3499 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3500 MUTEX(%ebp) address in %edx rather than %ecx to
3501 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3502 and __lll_unlock_wake. Move return value from %ecx to %edx
3503 register. Use __NR_gettimeofday.
3504 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3505 Include lowlevellock.h.
3506 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3507 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3508 MUTEX(%edi) address in %edx rather than %ecx to
3509 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3510 and __lll_unlock_wake.
3511 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3512 Include lowlevellock.h.
3513 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3514 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3515 MUTEX(%ebx) address in %edx rather than %ecx to
3516 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3517 and __lll_unlock_wake. Move return value from %ecx to %edx
3519 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3521 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3523 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3524 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3525 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3527 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3528 (sem_timedwait): Use __NR_gettimeofday.
3529 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3531 (LOCK): Don't define.
3532 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3534 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3535 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3537 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3538 2007-05-2{3,9} changes.
3539 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3540 kernel-features.h and lowlevellock.h.
3541 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3542 (LOAD_FUTEX_WAIT): Rewritten.
3543 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3544 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3545 (__lll_mutex_lock_wait): Rename to ...
3546 (__lll_lock_wait): ... this. %esi is now private argument.
3547 Don't compile in for libc.so.
3548 (__lll_mutex_timedlock_wait): Rename to ...
3549 (__lll_timedlock_wait): ... this. %esi contains private argument.
3550 Don't compile in for libc.so.
3551 (__lll_mutex_unlock_wake): Rename to ...
3552 (__lll_unlock_wake): ... this. %esi contains private argument.
3553 Don't compile in for libc.so.
3554 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3555 kernel-features.h and lowlevellock.h.
3556 (LOAD_FUTEX_WAIT): Define.
3557 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3558 (__lll_robust_mutex_lock_wait): Rename to ...
3559 (__lll_robust_lock_wait): ... this. %esi argument contains private.
3560 Use LOAD_FUTEX_WAIT macro.
3561 (__lll_robust_mutex_timedlock_wait): Rename to ...
3562 (__lll_robust_timedlock_wait): ... this. %esi argument contains
3563 private, use LOAD_FUTEX_WAIT macro.
3564 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3566 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3567 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3568 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3569 __lll_lock_wait and __lll_unlock_wake.
3570 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3571 Include lowlevellock.h and pthread-errnos.h.
3572 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3573 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3574 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3575 pass LLL_SHARED in %esi to both __lll_lock_wait and
3577 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3578 Include lowlevellock.h and pthread-errnos.h.
3579 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3580 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3581 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3582 pass LLL_SHARED in %esi to both __lll_lock_wait and
3584 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3585 Include lowlevellock.h.
3586 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3587 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3588 pass LLL_SHARED in %esi to both __lll_lock_wait and
3590 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3591 Include lowlevellock.h.
3592 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3593 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3594 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3595 and __lll_unlock_wake.
3596 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3597 Include lowlevellock.h.
3598 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3600 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3601 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3602 and __lll_unlock_wake.
3603 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3604 Include lowlevellock.h.
3605 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3607 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3608 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3609 and __lll_unlock_wake.
3610 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3611 Include lowlevellock.h.
3612 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3614 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3615 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3616 and __lll_unlock_wake.
3617 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3618 Include lowlevellock.h.
3619 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3621 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3622 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3623 and __lll_unlock_wake.
3624 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3625 Include lowlevellock.h.
3626 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3628 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3629 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3630 and __lll_unlock_wake.
3631 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3633 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3635 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3636 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3637 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3639 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3640 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3642 (LOCK): Don't define.
3643 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3645 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3646 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3647 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3648 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3649 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3650 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3651 (__lll_lock_wait_private): New function.
3652 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3653 it to lll_futex_*wait. Don't compile in for libc.so.
3654 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3656 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3657 (struct sparc_pthread_barrier): Remove.
3658 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3659 struct sparc_pthread_barrier. Pass
3660 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3661 and lll_futex_wait macros.
3662 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3664 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3665 Include sparc pthread_barrier_wait.c instead of generic one.
3667 2007-07-30 Jakub Jelinek <jakub@redhat.com>
3669 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3671 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3672 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3674 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3675 (pthread_rwlock_timedwrlock): Likewise.
3676 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3677 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3679 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3681 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3683 2007-07-26 Jakub Jelinek <jakub@redhat.com>
3685 * tst-locale2.c (useless): Add return statement.
3687 2007-07-24 Jakub Jelinek <jakub@redhat.com>
3689 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3690 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3691 * pthread_create.c (start_thread): Likewise.
3692 * init.c (sighandler_setxid): Likewise.
3693 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3694 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3695 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3696 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3697 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3698 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3699 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3700 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3701 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3703 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3705 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3707 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3708 __rtld_notify): Likewise.
3709 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3710 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3711 __pthread_once): Likewise.
3712 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3713 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3714 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3715 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3716 (lll_futex_wait): Add private argument, define as wrapper around
3717 lll_futex_timed_wait.
3718 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3719 use __lll_private_flag macro.
3720 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3721 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3722 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3723 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3724 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3725 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3726 (lll_futex_wait): Add private argument, define as wrapper around
3727 lll_futex_timed_wait.
3728 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3729 use __lll_private_flag macro.
3730 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3731 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3732 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3734 (lll_futex_timed_wait, lll_futex_wake): Use it.
3735 (lll_private_futex_wait, lll_private_futex_timed_wait,
3736 lll_private_futex_wake): Removed.
3737 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3738 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3739 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3740 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3741 (lll_futex_wait): Add private argument, define as wrapper around
3742 lll_futex_timed_wait.
3743 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3744 use __lll_private_flag macro.
3745 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3746 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3748 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3749 (lll_private_futex_wait, lll_private_futex_timed_wait,
3750 lll_private_futex_wake): Removed.
3751 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3752 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3753 (lll_private_futex_wait, lll_private_futex_timed_wait,
3754 lll_private_futex_wake): Removed.
3755 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3756 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3757 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3758 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3759 (lll_futex_wait): Add private argument, define as wrapper around
3760 lll_futex_timed_wait.
3761 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3762 use __lll_private_flag macro.
3763 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3764 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3766 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3768 (lll_futex_timed_wait, lll_futex_wake): Use it.
3769 (lll_private_futex_wait, lll_private_futex_timed_wait,
3770 lll_private_futex_wake): Removed.
3772 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3774 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3775 of the structure for sparc32.
3777 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3779 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3781 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3783 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3784 code used when private futexes are assumed.
3785 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3788 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3790 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3791 (__lll_private_flag): Define.
3792 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3793 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3795 (lll_private_futex_wait, lll_private_futex_timedwait,
3796 lll_private_futex_wake): Define as wrapper around non-_private
3798 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3799 (__lll_private_flag): Define.
3800 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3801 (lll_private_futex_wait, lll_private_futex_timedwait,
3802 lll_private_futex_wake): Define as wrapper around non-_private
3805 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3807 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3808 parameter to lll_futex_wait call.
3809 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3811 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3812 Replace lll_futex_wait with lll_private_futex_wait.
3813 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3814 Add LLL_SHARED parameter to lll_futex_wake().
3816 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3817 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3818 lll_private_futex_wake.
3819 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3820 bit from private parm before syscall.
3821 (lll_futex_timed_wait): Likewise.
3822 (lll_futex_wake): Likewise.
3823 (lll_futex_wake_unlock): Likewise.
3824 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3825 (lll_robust_mutex_unlock): Likewise.
3826 (lll_mutex_unlock_force): Likewise.
3827 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3829 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3831 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3832 compilation when unconditionally using private futexes.
3833 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3834 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3836 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3837 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3839 2007-07-17 Jakub Jelinek <jakub@redhat.com>
3841 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3844 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3846 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3849 2007-05-16 Roland McGrath <roland@redhat.com>
3851 * init.c (__nptl_initial_report_events): New variable.
3852 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3855 2007-06-22 Jakub Jelinek <jakub@redhat.com>
3857 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3858 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3860 2007-06-19 Ulrich Drepper <drepper@redhat.com>
3862 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3865 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3867 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3868 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3869 * pthread_mutex_timedlock.c: Likewise.
3870 * pthread_mutex_trylock.c: Likewise.
3871 * pthread_mutex_unlock.c: Likewise.
3873 2007-06-17 Andreas Schwab <schwab@suse.de>
3875 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3878 2007-06-17 Ulrich Drepper <drepper@redhat.com>
3880 * allocatestack.c (allocate_stack): Make code compile if
3881 __ASSUME_PRIVATE_FUTEX is set.
3883 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3885 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3886 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3887 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3888 (__pthread_rwlock_wrlock): Likewise.
3889 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3890 (pthread_rwlock_timedrdlock): Likewise.
3891 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3892 (pthread_rwlock_timedwrlock): Likewise.
3893 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3894 (__pthread_rwlock_unlock): Likewise.
3896 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3898 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3899 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3900 Split __flags into __flags, __shared, __pad1 and __pad2.
3901 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3902 futexes if they are available.
3903 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3904 in libc-lowlevellock.S allow using private futexes.
3905 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3906 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3907 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3908 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3909 lll_private_futex_timed_wait and lll_private_futex_wake.
3910 (lll_robust_mutex_unlock): Fix typo.
3911 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3912 field in futex command setup.
3913 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3914 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3915 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3916 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3917 if they are available. Remove clear_once_control.
3918 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3919 futexes if they are available.
3920 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3921 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3922 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3923 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3924 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3925 Wake only when there are waiters.
3926 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3927 support. Indicate that there are waiters. Remove unnecessary
3928 extra cancellation test.
3929 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3930 left-over duplication of __sem_wait_cleanup.
3932 2007-06-07 Ulrich Drepper <drepper@redhat.com>
3934 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3935 parameter to lll_futex_wait, lll_futex_timed_wait, and
3936 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3937 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3938 lll_private_futex_wake.
3939 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3940 * allocatestack.c: Adjust use of lll_futex_* macros.
3942 * lowlevellock.h: Likewise.
3943 * pthread_barrier_wait.c: Likewise.
3944 * pthread_cond_broadcast.c: Likewise.
3945 * pthread_cond_destroy.c: Likewise.
3946 * pthread_cond_signal.c: Likewise.
3947 * pthread_cond_timedwait.c: Likewise.
3948 * pthread_cond_wait.c: Likewise.
3949 * pthread_create.c: Likewise.
3950 * pthread_mutex_lock.c: Likewise.
3951 * pthread_mutex_setprioceiling.c: Likewise.
3952 * pthread_mutex_timedlock.c: Likewise.
3953 * pthread_mutex_unlock.c: Likewise.
3954 * pthread_rwlock_timedrdlock.c: Likewise.
3955 * pthread_rwlock_timedwrlock.c: Likewise.
3956 * pthread_rwlock_unlock.c: Likewise.
3957 * sysdeps/alpha/tls.h: Likewise.
3958 * sysdeps/i386/tls.h: Likewise.
3959 * sysdeps/ia64/tls.h: Likewise.
3960 * sysdeps/powerpc/tls.h: Likewise.
3961 * sysdeps/pthread/aio_misc.h: Likewise.
3962 * sysdeps/pthread/gai_misc.h: Likewise.
3963 * sysdeps/s390/tls.h: Likewise.
3964 * sysdeps/sh/tls.h: Likewise.
3965 * sysdeps/sparc/tls.h: Likewise.
3966 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3967 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3968 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3969 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3970 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3971 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3972 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3973 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3974 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3975 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3977 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3978 * sysdeps/x86_64/tls.h: Likewise.
3980 2007-05-29 Ulrich Drepper <drepper@redhat.com>
3982 * pthread_getattr_np.c: No need to install a cancellation handler,
3983 this is no cancellation point.
3984 * pthread_getschedparam.c: Likewise.
3985 * pthread_setschedparam.c: Likewise.
3986 * pthread_setschedprio.c: Likewise.
3987 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3989 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3990 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3991 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3992 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3993 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3994 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3995 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3996 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3997 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3998 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3999 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4000 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4002 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
4003 whether there are more than one thread makes no sense here since
4004 we only call the slow path if the locks are taken.
4005 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
4007 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
4008 COND_NWAITERS_SHIFT.
4009 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
4011 * pthread_cond_init.c: Likewise.
4012 * pthread_cond_timedwait.c: Likewise.
4013 * pthread_cond_wait.c: Likewise.
4014 * pthread_condattr_getclock.c: Likewise.
4015 * pthread_condattr_setclock.c: Likewise.
4016 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
4017 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4018 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4019 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4020 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4022 2007-05-28 Jakub Jelinek <jakub@redhat.com>
4024 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
4027 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
4029 (THREAD_GSCOPE_GET_FLAG): Remove.
4030 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
4031 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
4033 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
4034 (THREAD_GSCOPE_GET_FLAG): Remove.
4035 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
4036 instead of THREAD_GSCOPE_GET_FLAG.
4037 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
4039 * sysdeps/s390/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/sparc/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.
4047 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4048 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4049 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4050 THREAD_GSCOPE_WAIT): Define.
4051 * sysdeps/ia64/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-24 Richard Henderson <rth@redhat.com>
4058 * descr.h (struct pthread): Add header.gscope_flag.
4059 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4060 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4061 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4062 THREAD_GSCOPE_WAIT): Define.
4064 2007-05-27 Ulrich Drepper <drepper@redhat.com>
4066 * init.c: Make it compile with older kernel headers.
4068 * tst-initializers1.c: Show through exit code which test failed.
4070 * pthread_rwlock_init.c: Also initialize __shared field.
4071 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
4072 element in rwlock structure into four byte elements. One of them is
4073 the new __shared element.
4074 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
4076 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
4077 __shared, adjust names of other padding elements.
4078 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4079 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
4080 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
4081 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
4083 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
4084 futex to use private operations if possible.
4085 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4087 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4089 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4090 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4091 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4092 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4094 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4096 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4097 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4099 2007-05-26 Ulrich Drepper <drepper@redhat.com>
4101 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
4102 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
4103 * pthread_rwlock_timedrdlock.c: Likewise.
4104 * pthread_rwlock_tryrdlock.c: Likewise.
4106 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
4109 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
4110 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
4111 duplication of __sem_wait_cleanup.
4113 * allocatestack.c: Revert last change.
4115 * sysdeps/i386/tls.h: Likewise.
4116 * sysdeps/x86_64/tls.h: Likewise.
4117 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
4119 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
4121 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
4123 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
4124 * pthread_barrier_init.c: Set private flag if pshared and private
4125 futexes are supported.
4126 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
4127 private field in futex command setup.
4128 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4130 2007-05-25 Ulrich Drepper <drepper@redhat.com>
4132 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
4134 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4135 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4136 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4137 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4138 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4140 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
4141 * sem_init.c (__new_sem_init): Rewrite to initialize all three
4142 fields in the structure.
4143 (__old_sem_init): New function.
4144 * sem_open.c: Initialize all fields of the structure.
4145 * sem_getvalue.c: Adjust for renamed element.
4146 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
4147 (gen-as-const-headers): Add structsem.sym.
4148 * sysdeps/unix/sysv/linux/structsem.sym: New file.
4149 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
4150 struct new_sem. Add struct old_sem.
4151 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
4152 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4153 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4154 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
4155 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4156 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4157 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4158 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4159 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4160 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
4161 * tst-sem10.c: New file.
4162 * tst-sem11.c: New file.
4163 * tst-sem12.c: New file.
4164 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
4167 2007-05-25 Ulrich Drepper <drepper@redhat.com>
4168 Jakub Jelinek <jakub@redhat.com>
4170 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4171 Move __pthread_enable_asynccancel right before futex syscall.
4172 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4175 2007-05-24 Jakub Jelinek <jakub@redhat.com>
4177 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
4178 THREAD_COPY_PRIVATE_FUTEX): Define.
4179 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
4180 THREAD_COPY_PRIVATE_FUTEX): Define.
4181 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
4182 * init.c (__pthread_initialize_minimal_internal): Use
4183 THREAD_SET_PRIVATE_FUTEX.
4185 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
4186 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
4187 THREAD_GSCOPE_FLAG_WAIT): Define.
4188 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
4189 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
4190 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
4192 (THREAD_GSCOPE_GET_FLAG): Define.
4193 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
4194 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
4195 instead of ->header.gscope_flag directly.
4197 2007-05-23 Ulrich Drepper <drepper@redhat.com>
4199 * init.c (__pthread_initialize_minimal_internal): Check whether
4200 private futexes are available.
4201 * allocatestack.c (allocate_stack): Copy private_futex field from
4202 current thread into the new stack.
4203 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
4204 futexes if they are available.
4205 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
4206 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
4207 in libc-lowlevellock.S allow using private futexes.
4208 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4209 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
4211 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4212 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
4213 if they are available.
4214 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
4215 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
4216 * sysdeps/i386/tcb-offsets.sym: Likewise.
4217 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
4218 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
4220 2007-05-21 Ulrich Drepper <drepper@redhat.com>
4222 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4223 Remove ptr_wait_lookup_done again.
4224 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
4225 (__pthread_initialize_minimal_internal): Initialize
4226 _dl_wait_lookup_done pointer in _rtld_global directly.
4227 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4228 Remove code to code _dl_wait_lookup_done.
4229 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
4232 2007-05-21 Jakub Jelinek <jakub@redhat.com>
4234 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
4235 pthread_mutex_init failed with ENOTSUP.
4237 2007-05-19 Ulrich Drepper <drepper@redhat.com>
4239 * allocatestack.c (__wait_lookup_done): New function.
4240 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4241 Add ptr_wait_lookup_done.
4242 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
4243 * pthreadP.h: Declare __wait_lookup_done.
4244 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
4245 Define macros to implement reference handling of global scope.
4246 * sysdeps/x86_64/tls.h: Likewise.
4247 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4248 Initialize GL(dl_wait_lookup_done).
4250 2007-05-17 Ulrich Drepper <drepper@redhat.com>
4253 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
4255 * pthread_mutex_timedlock.c: Likewise.
4256 * pthread_mutex_trylock.c: Likewise.
4257 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4259 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
4260 * tst-robust9.c: New file.
4261 * tst-robustpi9.c: New file.
4263 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
4264 unnecessary extra cancellation test.
4266 2007-05-14 Ulrich Drepper <drepper@redhat.com>
4268 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
4269 extra cancellation test.
4270 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4272 2007-05-10 Ulrich Drepper <drepper@redhat.com>
4274 * descr.h (struct pthread): Rearrange members to fill hole in
4277 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4278 (__pthread_setaffinity_new): If syscall was successful and
4279 RESET_VGETCPU_CACHE is defined, use it before returning.
4280 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
4282 2007-05-10 Jakub Jelinek <jakub@redhat.com>
4285 * tst-align2.c: Include stackinfo.h.
4286 * tst-getpid1.c: Likewise.
4288 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
4291 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
4292 * tst-getpid1.c (do_test): Likewise.
4295 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
4296 (allocate_stack): Likewise.
4298 2007-05-07 Ulrich Drepper <drepper@redhat.com>
4300 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4301 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
4302 (__lll_robust_timedlock_wait): Likewise.
4303 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
4305 2007-05-06 Mike Frysinger <vapier@gentoo.org>
4308 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
4309 * tst-cancel4.c (tf_fdatasync): New test.
4311 2007-04-27 Ulrich Drepper <drepper@redhat.com>
4314 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
4315 check mutexes like normal mutexes.
4318 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
4319 Initialize the whole sigevent structure to appease valgrind.
4321 2007-04-25 Ulrich Drepper <drepper@redhat.com>
4323 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
4324 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
4326 2007-04-06 Ulrich Drepper <drepper@redhat.com>
4328 * tst-locale1.c: Avoid warnings.
4329 * tst-locale2.c: Likewise.
4331 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
4333 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4334 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
4336 2007-03-16 Jakub Jelinek <jakub@redhat.com>
4338 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
4339 __extern_always_inline where appropriate.
4340 * sysdeps/pthread/pthread.h: Likewise.
4342 2007-03-13 Richard Henderson <rth@redhat.com>
4344 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
4345 separate cfi regions for the two subsections.
4347 2007-02-25 Ulrich Drepper <drepper@redhat.com>
4349 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
4350 new thread, don't just decrement it.
4351 Patch by Suzuki K P <suzuki@in.ibm.com>.
4353 2007-02-21 Ulrich Drepper <drepper@redhat.com>
4355 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
4356 PTHFCT_CALL definition.
4358 2007-02-18 Ulrich Drepper <drepper@redhat.com>
4360 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
4361 available, don't use it.
4363 2007-02-09 Jakub Jelinek <jakub@redhat.com>
4365 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4366 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
4367 call into the kernel to delay.
4369 2007-01-18 Ulrich Drepper <drepper@redhat.com>
4371 * tst-initializers1.c: We want to test the initializers as seen
4372 outside of libc, so undefined _LIBC.
4374 * pthread_join.c (cleanup): Avoid warning.
4376 2007-01-17 Ulrich Drepper <drepper@redhat.com>
4378 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4379 (__lll_timedwait_tid): Add unwind info.
4381 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4382 function table, mangle the pointers.
4383 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
4384 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
4385 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
4386 demangle pointers before use.
4387 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
4389 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4390 * sysdeps/pthread/setxid.h: Likewise.
4392 2007-01-12 Ulrich Drepper <drepper@redhat.com>
4394 * tst-rwlock7.c: Show some more information in case of correct
4397 2007-01-11 Ulrich Drepper <drepper@redhat.com>
4399 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4400 (lll_futex_timed_wait): Undo part of last change, don't negate
4403 2007-01-10 Ulrich Drepper <drepper@redhat.com>
4405 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
4406 FUTEX_CMP_REQUEUE and lll_futex_requeue.
4408 2006-12-28 David S. Miller <davem@davemloft.net>
4410 * shlib-versions: Fix sparc64 linux target specification.
4412 2007-01-10 Jakub Jelinek <jakub@redhat.com>
4414 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4415 Adjust include path for pthread_barrier_wait.c move.
4417 2006-12-21 Jakub Jelinek <jakub@redhat.com>
4419 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
4420 tid isn't reread from pd->tid in between ESRCH test and the syscall.
4422 2006-12-06 Jakub Jelinek <jakub@redhat.com>
4424 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4425 6 argument cancellable syscalls.
4426 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4427 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4428 6 argument cancellable syscalls.
4429 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4431 2006-12-09 Ulrich Drepper <drepper@redhat.com>
4433 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4434 (__rtld_mrlock_initialize): Add missing closing parenthesis.
4436 2006-10-30 Jakub Jelinek <jakub@redhat.com>
4438 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4439 __sync_lock_release instead of __sync_lock_release_si.
4441 2006-10-29 Jakub Jelinek <jakub@redhat.com>
4443 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4445 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4446 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4447 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4448 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4449 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4450 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4451 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4452 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4453 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4454 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4455 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4457 2006-10-27 Ulrich Drepper <drepper@redhat.com>
4459 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4460 * pthread_barrier_wait.c: ...here.
4461 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4462 * pthread_cond_broadcast.c: ...here.
4463 * sysdeps/pthread/pthread_cond_signal.c: Move to...
4464 * pthread_cond_signal.c: ...here.
4465 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4466 * pthread_cond_timedwait.c: ...here.
4467 * sysdeps/pthread/pthread_cond_wait.c: Move to...
4468 * pthread_cond_wait.c: ...here.
4469 * sysdeps/pthread/pthread_once.c: Move to...
4470 * pthread_once.c: ...here.
4471 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4472 * pthread_rwlock_rdlock.c: ...here.
4473 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4474 * pthread_rwlock_timedrdlock.c: ...here.
4475 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4476 * pthread_rwlock_timedwrlock.c: ...here.
4477 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4478 * pthread_rwlock_unlock.c: ...here.
4479 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4480 * pthread_rwlock_wrlock.c: ...here.
4481 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4482 * pthread_spin_destroy.c: ...here.
4483 * sysdeps/pthread/pthread_spin_init.c: Move to...
4484 * pthread_spin_init.c: ...here.
4485 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4486 * pthread_spin_unlock.c: ...here.
4487 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4488 * pthread_getcpuclockid.c: ...here.
4490 * init.c: USE_TLS support is now always enabled.
4491 * tst-tls5.h: Likewise.
4492 * sysdeps/alpha/tls.h: Likewise.
4493 * sysdeps/i386/tls.h: Likewise.
4494 * sysdeps/ia64/tls.h: Likewise.
4495 * sysdeps/powerpc/tls.h: Likewise.
4496 * sysdeps/s390/tls.h: Likewise.
4497 * sysdeps/sh/tls.h: Likewise.
4498 * sysdeps/sparc/tls.h: Likewise.
4499 * sysdeps/x86_64/tls.h: Likewise.
4501 2006-10-27 Jakub Jelinek <jakub@redhat.com>
4503 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4504 __rtld_mrlock_change): Update oldval if atomic compare and exchange
4507 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4508 Define to THREAD_SELF->header.multiple_threads.
4509 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4511 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4513 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4514 (SINGLE_THREAD_P): Likewise.
4515 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4516 (SINGLE_THREAD_P): Likewise.
4517 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4518 (SINGLE_THREAD_P): Likewise.
4519 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4520 (SINGLE_THREAD_P): Likewise.
4521 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4523 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4524 (SINGLE_THREAD_P): Likewise.
4525 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4526 (SINGLE_THREAD_P): Likewise.
4527 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4530 2006-10-26 Jakub Jelinek <jakub@redhat.com>
4532 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4533 by default rather than 2_3_3.
4535 2006-10-17 Jakub Jelinek <jakub@redhat.com>
4537 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4538 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4539 atomic_* instead of catomic_* macros.
4541 2006-10-12 Ulrich Drepper <drepper@redhat.com>
4544 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4545 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4546 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4547 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4548 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4549 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4550 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4551 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4552 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4553 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4554 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4555 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4556 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4558 2006-10-11 Ulrich Drepper <drepper@redhat.com>
4560 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4561 cancelable syscalls with six parameters.
4563 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4564 operations instead of atomic_*.
4566 2006-10-09 Ulrich Drepper <drepper@redhat.com>
4568 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4570 2006-10-07 Ulrich Drepper <drepper@redhat.com>
4572 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4573 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4574 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4576 * pthread_attr_setstack.c: Allow overwriting the version number of the
4578 * pthread_attr_setstacksize.c: Likewise.
4579 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4581 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4582 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4584 2006-09-24 Ulrich Drepper <drepper@redhat.com>
4587 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4588 Patch by Petr Baudis.
4590 2006-09-18 Jakub Jelinek <jakub@redhat.com>
4592 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4594 * tst-cancel2.c (tf): Loop as long as something was written.
4596 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4598 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4599 mutexes wake all mutexes.
4600 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4601 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4602 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4604 2006-09-12 Ulrich Drepper <drepper@redhat.com>
4606 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4607 to guarantee the thread is always canceled.
4609 2006-09-08 Jakub Jelinek <jakub@redhat.com>
4611 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4613 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4614 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4615 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4616 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4617 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4619 2006-09-08 Ulrich Drepper <drepper@redhat.com>
4622 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4623 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4624 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4625 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4626 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4627 * Makefile (tests): Add tst-cond22.
4628 * tst-cond22.c: New file.
4630 2006-09-05 Ulrich Drepper <drepper@redhat.com>
4633 * descr.h (struct pthread): Add parent_cancelhandling.
4634 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4635 cancelhandling value to child.
4636 * pthread_create.c (start_thread): If parent thread was canceled
4637 reset the SIGCANCEL mask.
4638 * Makefile (tests): Add tst-cancel25.
4639 * tst-cancel25.c: New file.
4641 2006-09-05 Jakub Jelinek <jakub@redhat.com>
4642 Ulrich Drepper <drepper@redhat.com>
4644 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4645 counterp if it is already zero.
4646 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4648 2006-03-04 Jakub Jelinek <jakub@redhat.com>
4649 Roland McGrath <roland@redhat.com>
4651 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4652 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4653 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4654 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4655 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4656 lll_robust_mutex_timedlock, lll_mutex_unlock,
4657 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4658 Add _L_*_ symbols around the subsection.
4659 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4660 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4662 2006-03-03 Jakub Jelinek <jakub@redhat.com>
4663 Roland McGrath <roland@redhat.com>
4665 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4666 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4667 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4668 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4669 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4670 lll_robust_mutex_timedlock, lll_mutex_unlock,
4671 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4672 Add _L_*_ symbols around the subsection.
4673 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4674 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4676 2006-08-31 Ulrich Drepper <drepper@redhat.com>
4678 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4679 change because it can disturb too much existing code. If real hard
4680 reader preference is needed we'll introduce another type.
4681 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4682 (pthread_rwlock_timedwrlock): Likewise.
4683 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4686 2006-08-30 Ulrich Drepper <drepper@redhat.com>
4688 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4690 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4691 (pthread_rwlock_timedwrlock): Likewise.
4692 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4695 2006-08-25 Jakub Jelinek <jakub@redhat.com>
4697 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4698 Only define ifdef SHARED.
4700 2006-08-23 Ulrich Drepper <drepper@redhat.com>
4702 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4703 (free_stacks): ...here.
4704 (__free_stack_cache): New function.
4705 * pthreadP.h: Declare __free_stack_cache.
4706 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4708 * init.c (pthread_functions): Initialize ptr_freeres.
4709 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4710 New freeres function.
4712 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4715 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4717 2006-08-20 Ulrich Drepper <drepper@redhat.com>
4719 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4720 _XOPEN_REALTIME_THREADS.
4722 2006-08-15 Jakub Jelinek <jakub@redhat.com>
4724 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4725 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4726 HAVE_CLOCK_GETTIME_VSYSCALL.
4727 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4729 2006-08-14 Jakub Jelinek <jakub@redhat.com>
4731 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4732 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4733 * descr.h (struct priority_protection_data): New type.
4734 (struct pthread): Add tpp field.
4735 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4736 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4737 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4738 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4740 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4741 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4742 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4743 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4745 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4747 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4748 * pthread_mutexattr_getprioceiling.c
4749 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4750 in the SCHED_FIFO priority range.
4751 * pthread_mutexattr_setprioceiling.c
4752 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4753 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4754 if mutex is not TPP. Ceiling is now in __data.__lock.
4755 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4756 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4757 is now in __data.__lock. Add locking.
4758 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4759 * Makefile (libpthread-routines): Add tpp.
4760 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4761 * tst-tpp.h: New file.
4762 * tst-mutexpp1.c: New file.
4763 * tst-mutexpp6.c: New file.
4764 * tst-mutexpp10.c: New file.
4765 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4766 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4768 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4771 * pthread_join.c (pthread_join): Account for self being canceled
4772 when checking for deadlocks.
4773 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4774 (tf1): Don't print anything after pthread_join returns, this would be
4775 another cancellation point.
4777 * tst-join6.c: New file.
4778 * Makefile (tests): Add tst-join6.
4780 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4783 * pthread_setspecific.c (__pthread_setspecific): Check
4784 out-of-range index before checking for unused key.
4786 * sysdeps/pthread/gai_misc.h: New file.
4788 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4790 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4791 file. Don't use sysctl.
4792 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4793 overwrite the file if this is likely not true.
4795 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4797 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4798 * Makefile (tests): Add tst-getpid3.
4799 * tst-getpid3.c: New file.
4801 2006-07-30 Roland McGrath <roland@redhat.com>
4803 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4805 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4806 (pause_not_cancel): New macro.
4807 (nanosleep_not_cancel): New macro.
4808 (sigsuspend_not_cancel): New macro.
4809 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4810 nanosleep_not_cancel macro from <not-cancel.h>.
4811 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4812 macro from <not-cancel.h>.
4814 2006-07-28 Ulrich Drepper <drepper@redhat.com>
4815 Jakub Jelinek <jakub@redhat.com>
4817 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4818 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4819 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4820 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4821 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4822 * pthread_mutex_lock.c: Likewise.
4823 * pthread_mutex_timedlock.c: Likewise.
4824 * pthread_mutex_trylock.c: Likewise.
4825 * pthread_mutex_unlock.c: Likewise.
4826 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4828 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4829 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4830 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4831 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4832 pthread-pi-defines.sym.
4833 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4834 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4835 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4836 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4837 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4838 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4839 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4840 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4841 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4842 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4843 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4844 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4845 * tst-mutex2.c: Likewise.
4846 * tst-mutex3.c: Likewise.
4847 * tst-mutex4.c: Likewise.
4848 * tst-mutex5.c: Likewise.
4849 * tst-mutex6.c: Likewise.
4850 * tst-mutex7.c: Likewise.
4851 * tst-mutex7a.c: Likewise.
4852 * tst-mutex8.c: Likewise.
4853 * tst-mutex9.c: Likewise.
4854 * tst-robust1.c: Likewise.
4855 * tst-robust7.c: Likewise.
4856 * tst-robust8.c: Likewise.
4857 * tst-mutexpi1.c: New file.
4858 * tst-mutexpi2.c: New file.
4859 * tst-mutexpi3.c: New file.
4860 * tst-mutexpi4.c: New file.
4861 * tst-mutexpi5.c: New file.
4862 * tst-mutexpi6.c: New file.
4863 * tst-mutexpi7.c: New file.
4864 * tst-mutexpi7a.c: New file.
4865 * tst-mutexpi8.c: New file.
4866 * tst-mutexpi9.c: New file.
4867 * tst-robust1.c: New file.
4868 * tst-robust2.c: New file.
4869 * tst-robust3.c: New file.
4870 * tst-robust4.c: New file.
4871 * tst-robust5.c: New file.
4872 * tst-robust6.c: New file.
4873 * tst-robust7.c: New file.
4874 * tst-robust8.c: New file.
4875 * Makefile (tests): Add the new tests.
4877 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4878 * pthread_mutex_destroy.c: Remove unneeded label.
4880 2006-07-01 Ulrich Drepper <drepper@redhat.com>
4882 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4883 computations to compile time.
4885 2006-06-04 Ulrich Drepper <drepper@redhat.com>
4887 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4889 2006-05-15 Ulrich Drepper <drepper@redhat.com>
4891 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4893 2006-05-11 Ulrich Drepper <drepper@redhat.com>
4895 * pthread_key_create.c (__pthread_key_create): Do away with
4896 __pthread_keys_lock.
4898 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4899 (__kernel_cpumask_size): Mark as hidden.
4900 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4902 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4903 * semaphoreP.h (__sem_mappings_lock): Likewise.
4905 2006-05-10 Ulrich Drepper <drepper@redhat.com>
4907 * pthread_atfork.c: Mark __dso_handle as hidden.
4909 2006-05-09 Ulrich Drepper <drepper@redhat.com>
4912 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4913 the reload problem. Change the one path in pthread_cancel_init
4914 which causes the problem. Force gcc to reload. Simplify callers.
4915 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4916 (_Unwind_GetBSP): Undo last patch.
4918 2006-05-07 Ulrich Drepper <drepper@redhat.com>
4920 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4921 function pointer is reloaded after pthread_cancel_init calls.
4924 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4925 pointers are reloaded after pthread_cancel_init calls.
4927 2006-05-01 Ulrich Drepper <drepper@redhat.com>
4929 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4932 2006-04-27 Ulrich Drepper <drepper@redhat.com>
4934 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4935 Allocate new object which is passed to timer_sigev_thread so that
4936 the timer can be deleted before the new thread is scheduled.
4938 2006-04-26 Roland McGrath <roland@redhat.com>
4940 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4942 2006-04-08 Ulrich Drepper <drepper@redhat.com>
4944 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4945 suffix for conditional jumps.
4946 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4947 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4948 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4949 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4950 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4951 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4953 * init.c (sigcancel_handler): Compare with correct PID even if the
4954 thread is in the middle of a fork call.
4955 (sighandler_setxid): Likewise.
4956 Reported by Suzuki K P <suzuki@in.ibm.com> .
4958 2006-04-07 Jakub Jelinek <jakub@redhat.com>
4960 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4962 2006-04-06 Ulrich Drepper <drepper@redhat.com>
4964 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4965 fails [Coverity CID 105].
4967 2006-04-05 Ulrich Drepper <drepper@redhat.com>
4969 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4971 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4974 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4975 Define __lll_rel_instr using lwsync.
4977 2006-03-27 Ulrich Drepper <drepper@redhat.com>
4979 * allocatestack.c (allocate_stack): Always initialize robust_head.
4980 * descr.h: Define struct robust_list_head.
4981 (struct pthread): Use robust_list_head in robust mutex list definition.
4982 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4983 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4984 (__pthread_initialize_minimal_internal): Register robust_list with
4986 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4987 Declare __set_robust_list_avail.
4988 * pthread_create.c (start_thread): Register robust_list of new thread.
4989 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4991 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4992 number of users, it's unreliable.
4993 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4994 set_robust_list syscall is available.
4995 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4996 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4997 Set robust_head.list_op_pending before trying to lock a robust mutex.
4998 * pthread_mutex_timedlock.c: Likewise.
4999 * pthread_mutex_trylock.c: Likewise.
5000 * pthread_mutex_unlock.c: Likewise for unlocking.
5001 * Makefile (tests): Add tst-robust8.
5002 * tst-robust8.c: New file.
5004 2006-03-08 Andreas Schwab <schwab@suse.de>
5006 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
5007 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
5009 2006-03-05 Roland McGrath <roland@redhat.com>
5011 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
5012 and $config_os doesn't match *linux*.
5014 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
5016 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
5017 Use __syscall_error.
5018 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5019 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
5020 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
5021 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5022 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
5023 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
5025 2006-03-02 Ulrich Drepper <drepper@redhat.com>
5027 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
5029 2006-03-01 Ulrich Drepper <drepper@redhat.com>
5031 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
5032 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
5034 (__lll_robust_timedlock_wait): Likewise.
5035 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
5036 (__lll_robust_lock_wait): Likewise.
5037 (__lll_robust_timedlock_wait): Likewise.
5038 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
5039 (__lll_robust_lock_wait): Likewise.
5040 (__lll_robust_timedlock_wait): Likewise.
5042 2006-03-01 Jakub Jelinek <jakub@redhat.com>
5044 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
5045 lll_robust_mutex_trylock, lll_robust_mutex_lock,
5046 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5047 lll_robust_mutex_unlock): Define.
5048 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5050 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
5052 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
5053 instead of <clone.S>.
5055 2006-02-27 Jakub Jelinek <jakub@redhat.com>
5057 * Makefile (libpthread-routines): Add
5058 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
5059 and pthread_mutex_[sg]etprioceiling.
5060 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
5061 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
5062 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
5063 pthread_mutex_setprioceiling.
5064 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
5065 PTHREAD_PRIO_PROTECT): New enum values.
5066 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
5067 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
5068 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
5070 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
5071 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
5072 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
5074 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
5075 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
5076 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
5077 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
5078 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
5079 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
5080 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
5082 * pthread_mutex_getprioceiling.c: New file.
5083 * pthread_mutex_setprioceiling.c: New file.
5084 * pthread_mutexattr_getprioceiling.c: New file.
5085 * pthread_mutexattr_setprioceiling.c: New file.
5086 * pthread_mutexattr_getprotocol.c: New file.
5087 * pthread_mutexattr_setprotocol.c: New file.
5089 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5091 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
5093 2006-02-27 Roland McGrath <roland@redhat.com>
5095 * sysdeps/pthread/Subdirs: List nptl here too.
5096 * configure (libc_add_on_canonical): New variable.
5098 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
5100 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
5101 self to get main source tree's file.
5102 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
5103 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
5104 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
5105 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
5106 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
5107 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
5108 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
5109 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
5110 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
5111 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
5112 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
5113 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
5114 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
5116 * Makefile: Use $(sysdirs) in vpath directive.
5118 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
5119 (CPPFLAGS-timer_routines.c): Likewise.
5121 * Makeconfig (includes): Variable removed.
5123 2006-02-26 Roland McGrath <roland@redhat.com>
5125 * sysdeps/generic/pt-raise.c: Moved to ...
5126 * pt-raise.c: ... here.
5127 * sysdeps/generic/lowlevellock.h: Moved to ...
5128 * lowlevellock.h: ... here.
5130 2006-02-23 Roland McGrath <roland@redhat.com>
5132 * descr.h (struct pthread): Add final member `end_padding'.
5133 (PTHREAD_STRUCT_END_PADDING): Use it.
5135 2006-02-20 Roland McGrath <roland@redhat.com>
5137 * sysdeps/mips: Directory removed, saved in ports repository.
5138 * sysdeps/unix/sysv/linux/mips: Likewise.
5140 2006-02-18 Ulrich Drepper <drepper@redhat.com>
5142 * tst-robust1.c: Add second mutex to check that the mutex list is
5145 2006-02-17 Jakub Jelinek <jakub@redhat.com>
5147 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
5148 lll_robust_mutex_trylock, lll_robust_mutex_lock,
5149 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5150 lll_robust_mutex_unlock): New macros.
5151 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5152 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5153 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5154 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5155 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
5157 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5159 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
5161 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
5163 2006-02-17 Ulrich Drepper <drepper@redhat.com>
5165 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5166 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
5167 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
5168 (lll_robust_mutex_unlock): Likewise.
5170 2006-02-13 Jakub Jelinek <jakub@redhat.com>
5172 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
5173 Set robust_list.__next rather than robust_list.
5174 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5175 (__pthread_list_t): New typedef.
5176 (pthread_mutex_t): Replace __next and __prev fields with __list.
5177 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
5178 (__pthread_list_t): New typedef.
5179 (pthread_mutex_t): Replace __next and __prev fields with __list.
5180 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5181 (__pthread_list_t, __pthread_slist_t): New typedefs.
5182 (pthread_mutex_t): Replace __next and __prev fields with __list.
5183 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
5184 (__pthread_list_t, __pthread_slist_t): New typedefs.
5185 (pthread_mutex_t): Replace __next and __prev fields with __list.
5186 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
5187 (__pthread_list_t, __pthread_slist_t): New typedefs.
5188 (pthread_mutex_t): Replace __next and __prev fields with __list.
5189 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
5190 (__pthread_slist_t): New typedef.
5191 (pthread_mutex_t): Replace __next field with __list.
5193 2006-02-15 Ulrich Drepper <drepper@redhat.com>
5195 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
5196 PTHREAD_MUTEX_OWNERDEAD.
5197 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
5198 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
5199 * Makefile (libpthread-routines): Add lowlevelrobustlock.
5200 * pthread_create.c (start_thread): Very much simplify robust_list loop.
5201 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
5202 to PTHREAD_MUTEX_INCONSISTENT.
5203 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
5204 * pthread_mutex_lock.c: Reimplement robust mutex handling.
5205 * pthread_mutex_trylock.c: Likewise.
5206 * pthread_mutex_timedlock.c: Likewise.
5207 * pthread_mutex_unlock.c: Likewise.
5208 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5209 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5210 lowlevelrobustlock.sym.
5211 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
5212 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
5214 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5215 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
5216 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
5217 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
5218 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
5220 2006-02-12 Ulrich Drepper <drepper@redhat.com>
5222 * allocatestack.c (allocate_stack): Initialize robust_list.
5223 * init.c (__pthread_initialize_minimal_internal): Likewise.
5224 * descr.h (struct xid_command): Pretty printing.
5225 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
5226 robust_list. Adjust macros.
5227 * pthread_create.c (start_thread): Adjust robust_list handling.
5228 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
5229 but the owner for all robust mutex types.
5230 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5231 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
5232 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5233 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
5235 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
5236 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
5238 2006-02-08 Jakub Jelinek <jakub@redhat.com>
5240 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
5241 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
5243 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5245 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
5247 (lll_futex_timed_wait): Define.
5249 2006-01-19 Ulrich Drepper <drepper@redhat.com>
5251 * tst-cancel4.c: Test ppoll.
5253 2006-01-18 Andreas Jaeger <aj@suse.de>
5256 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
5257 (pthread_mutex_t): Follow changes for other archs. Based on patch
5258 by Jim Gifford <patches@jg555.com>.
5260 2006-01-13 Richard Henderson <rth@redhat.com>
5262 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
5264 2006-01-10 Roland McGrath <roland@redhat.com>
5266 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
5267 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5268 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5269 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5270 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5271 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5272 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5273 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5274 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5275 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5277 2006-01-09 Roland McGrath <roland@redhat.com>
5279 * tst-initializers1-c89.c: New file.
5280 * tst-initializers1-c99.c: New file.
5281 * tst-initializers1-gnu89.c: New file.
5282 * tst-initializers1-gnu99.c: New file.
5283 * Makefile (tests): Add them.
5284 (CFLAGS-tst-initializers1-c89.c): New variable.
5285 (CFLAGS-tst-initializers1-c99.c): New variable.
5286 (CFLAGS-tst-initializers1-gnu89.c): New variable.
5287 (CFLAGS-tst-initializers1-gnu99.c): New variable.
5289 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5290 Use __extension__ on anonymous union definition.
5291 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5292 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5293 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5294 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5295 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5297 2006-01-08 Jakub Jelinek <jakub@redhat.com>
5299 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5300 Don't give the union a name because it changes the mangled name.
5301 Instead name the struct for __data.
5302 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
5304 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
5307 2006-01-09 Jakub Jelinek <jakub@redhat.com>
5309 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
5310 stack bias to mc_ftp field.
5312 2006-01-07 Ulrich Drepper <drepper@redhat.com>
5314 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
5315 being too clever and reloading the futex value where it shouldn't.
5317 2006-01-06 Ulrich Drepper <drepper@redhat.com>
5319 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
5322 2006-01-06 Jakub Jelinek <jakub@redhat.com>
5324 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5327 2006-01-06 Ulrich Drepper <drepper@redhat.com>
5329 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
5330 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
5331 rename in tcbhead_t.
5333 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5334 Don't give the union a name because it changes the mangled name.
5335 Instead name the struct for __data.
5336 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5337 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5338 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5339 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5340 * pthread_create.c (start_thread): Adjust robust mutex free loop.
5341 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
5343 2006-01-05 Ulrich Drepper <drepper@redhat.com>
5345 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5347 (lll_futex_timed_wait): Define.
5348 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5349 * sysdeps/pthread/aio_misc.h: New file.
5351 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
5353 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
5355 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
5357 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5358 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
5359 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5361 2006-01-04 Ulrich Drepper <drepper@redhat.com>
5363 * tst-cancel24.cc: Use C headers instead of C++ headers.
5365 2006-01-03 Jakub Jelinek <jakub@redhat.com>
5367 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
5368 sparc-linux configured glibc.
5369 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
5370 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
5371 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
5372 atomic_compare_and_exchange_val_24_acq instead of
5373 atomic_compare_and_exchange_val_acq.
5374 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
5375 instead of atomic_exchange_rel.
5376 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
5377 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
5379 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
5381 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
5382 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
5383 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
5384 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
5385 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
5386 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
5388 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
5390 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
5391 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
5392 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
5394 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
5396 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
5398 2006-01-03 Ulrich Drepper <drepper@redhat.com>
5400 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
5403 2006-01-02 Jakub Jelinek <jakub@redhat.com>
5405 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
5406 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5407 THREAD_COPY_POINTER_GUARD): Define.
5408 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
5409 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
5411 2006-01-01 Ulrich Drepper <drepper@redhat.com>
5413 * version.c: Update copyright year.
5415 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5417 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
5418 .eh_frame section, use cfi_* directives.
5419 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5421 2005-12-30 Ulrich Drepper <drepper@redhat.com>
5423 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5426 2005-12-29 Ulrich Drepper <drepper@redhat.com>
5428 * sysdeps/pthread/sigaction.c: Removed.
5429 * sigaction.c: New file.
5430 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5432 2005-12-28 Ulrich Drepper <drepper@redhat.com>
5434 * Makefile (tests): Add tst-signal7.
5435 * tst-signal7.c: New file.
5437 2005-12-27 Roland McGrath <roland@redhat.com>
5439 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5440 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5441 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5442 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5443 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5444 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5445 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5446 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5447 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5448 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5449 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5451 2005-12-27 Jakub Jelinek <jakub@redhat.com>
5453 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5454 and __prev field to pthread_mutex_t.
5455 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5456 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5457 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5458 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5459 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5462 2005-12-26 Ulrich Drepper <drepper@redhat.com>
5464 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5465 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5466 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5467 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5468 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5469 and PTHREAD_MUTEXATTR_FLAG_BITS.
5470 * descr.h (struct pthread): Add robust_list field and define
5471 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5472 * pthread_mutexattr_getrobust.c: New file.
5473 * pthread_mutexattr_setrobust.c: New file.
5474 * pthread_mutex_consistent.c: New file.
5475 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5476 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5477 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5478 Adjust pthread_mutex_t initializers.
5479 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5480 field to pthread_mutex_t.
5481 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5482 and __prev field to pthread_mutex_t.
5483 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5484 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5485 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5486 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5487 * pthread_mutexattr_gettype.c: Likewise.
5488 * pthread_mutexattr_setpshared.c: Likewise.
5489 * pthread_mutexattr_settype.c: Likewise.
5490 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5491 Initialize mutex kind according to robust flag.
5492 * pthread_mutex_lock.c: Implement local robust mutex.
5493 * pthread_mutex_timedlock.c: Likewise.
5494 * pthread_mutex_trylock.c: Likewise.
5495 * pthread_mutex_unlock.c: Likewise.
5496 * pthread_create.c (start_thread): Mark robust mutexes which remained
5498 * tst-robust1.c: New file.
5499 * tst-robust2.c: New file.
5500 * tst-robust3.c: New file.
5501 * tst-robust4.c: New file.
5502 * tst-robust5.c: New file.
5503 * tst-robust6.c: New file.
5504 * tst-robust7.c: New file.
5505 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5506 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5507 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5508 tst-robust5, tst-robust6, and tst-robust7.
5510 * tst-typesizes.c: New file.
5511 * Makefile (tests): Add tst-typesizes.
5513 * tst-once3.c: More debug output.
5515 2005-12-24 Ulrich Drepper <drepper@redhat.com>
5517 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5518 missing after last change.
5520 * version.c: Update copyright year.
5522 2005-12-23 Ulrich Drepper <drepper@redhat.com>
5524 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5525 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5526 * pthread_mutex_trylock.c: Likewise.
5527 * pthread_mutex_timedlock.c: Likewise.
5528 * pthread_mutex_unlock.c: Likewise.
5530 2005-12-22 Roland McGrath <roland@redhat.com>
5532 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5533 so that #include_next's search location is not reset to the -I..
5534 directory where <nptl/...> can be found.
5536 2005-12-22 Ulrich Drepper <drepper@redhat.com>
5539 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5540 Fix unwind info. Remove useless branch prediction prefix.
5541 * tst-cancel24.cc: New file.
5542 * Makefile: Add rules to build and run tst-cancel24.
5544 2005-12-21 Roland McGrath <roland@redhat.com>
5546 * libc-cancellation.c: Use <> rather than "" #includes.
5547 * pt-cleanup.c: Likewise.
5548 * pthread_create.c: Likewise.
5549 * pthread_join.c: Likewise.
5550 * pthread_timedjoin.c: Likewise.
5551 * pthread_tryjoin.c: Likewise.
5552 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5553 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5554 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5555 * unwind.c: Likewise.
5557 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5559 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5560 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5561 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5562 THREAD_COPY_POINTER_GUARD): Define.
5564 2005-12-19 Jakub Jelinek <jakub@redhat.com>
5566 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5568 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5569 THREAD_COPY_POINTER_GUARD): Define.
5570 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5571 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5572 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5573 THREAD_COPY_POINTER_GUARD): Define.
5574 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5575 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5576 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5577 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5578 Use PTR_DEMANGLE for B0 if defined.
5580 2005-12-17 Ulrich Drepper <drepper@redhat.com>
5582 * pthread_create.c (__pthread_create_2_1): Use
5583 THREAD_COPY_POINTER_GUARD if available.
5584 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5585 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5586 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5587 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5588 * sysdeps/x86_64/tls.h: Likewise.
5590 2005-12-15 Roland McGrath <roland@redhat.com>
5592 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5594 2005-12-13 Ulrich Drepper <drepper@redhat.com>
5596 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5598 * errno-loc.c: New file.
5600 2005-12-12 Roland McGrath <roland@redhat.com>
5602 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5603 adjustments before choosing stack size. Update minimum stack size
5604 calculation to match allocate_stack change.
5606 2005-12-12 Ulrich Drepper <drepper@redhat.com>
5608 * allocatestack.c (allocate_stack): Don't demand that there is an
5609 additional full page available on the stack beside guard, TLS, the
5612 2005-11-24 Ulrich Drepper <drepper@redhat.com>
5614 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5615 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5617 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5618 compiling 32-bit code we must define __cleanup_fct_attribute.
5620 005-11-24 Jakub Jelinek <jakub@redhat.com>
5623 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5624 __attribute__ instead of __attribute.
5625 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5626 (__cleanup_fct_attribute): Likewise.
5628 2005-11-17 Jakub Jelinek <jakub@redhat.com>
5630 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5631 a write barrier before writing libgcc_s_getcfa.
5633 2005-11-06 Ulrich Drepper <drepper@redhat.com>
5635 * sysdeps/unix/sysv/linux/configure: Removed.
5637 2005-11-05 Ulrich Drepper <drepper@redhat.com>
5639 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5640 optional init_array/fini_array support.
5642 2005-10-24 Roland McGrath <roland@redhat.com>
5644 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5645 versioned_symbol use.
5647 2005-10-16 Roland McGrath <roland@redhat.com>
5649 * init.c (__pthread_initialize_minimal_internal): Even when using a
5650 compile-time default stack size, apply the minimum that allocate_stack
5651 will require, and round up to page size.
5653 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5655 * Makefile ($(test-modules)): Remove static pattern rule.
5657 2005-10-14 Jakub Jelinek <jakub@redhat.com>
5658 Ulrich Drepper <drepper@redhat.com>
5660 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5661 alignment in callback function.
5662 * Makefile: Add rules to build and run tst-align3.
5663 * tst-align3.c: New file.
5665 2005-10-03 Jakub Jelinek <jakub@redhat.com>
5667 * allocatestack.c (setxid_signal_thread): Add
5668 INTERNAL_SYSCALL_DECL (err).
5670 2005-10-02 Jakub Jelinek <jakub@redhat.com>
5672 * allocatestack.c (setxid_signal_thread): Need to use
5673 atomic_compare_and_exchange_bool_acq.
5675 2005-10-01 Ulrich Drepper <drepper@redhat.com>
5676 Jakub Jelinek <jakub@redhat.com>
5678 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5680 (struct pthread): Move specific_used field to avoid padding.
5681 Add setxid_futex field.
5682 * init.c (sighandler_setxid): Reset setxid flag and release the
5684 * allocatestack.c (setxid_signal_thread): New function. Broken
5685 out of the bodies of the two loops in __nptl_setxid. For undetached
5686 threads check whether they are exiting and if yes, don't send a signal.
5687 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5688 * pthread_create.c (start_thread): For undetached threads, check
5689 whether setxid bit is set. If yes, wait until signal has been
5692 * allocatestack.c (STACK_VARIABLES): Initialize them.
5693 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5695 2004-09-02 Jakub Jelinek <jakub@redhat.com>
5697 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5698 waiters, awake all waiters on the associated mutex.
5700 2005-09-22 Roland McGrath <roland@redhat.com>
5702 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5703 ../sysdeps/x86_64/hp-timing.h).
5705 2005-08-29 Jakub Jelinek <jakub@redhat.com>
5707 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5708 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5709 (lll_futex_wake_unlock): Define.
5710 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5711 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5712 (lll_futex_wake_unlock): Define.
5713 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5714 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5715 (lll_futex_wake_unlock): Define.
5716 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5717 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5718 (lll_futex_wake_unlock): Define.
5719 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5720 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5721 (lll_futex_wake_unlock): Define.
5722 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5723 lll_futex_wake_unlock.
5724 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5725 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5726 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5727 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5728 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5729 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5731 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5733 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5734 Fix typo in register name.
5736 2005-08-23 Ulrich Drepper <drepper@redhat.com>
5738 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5739 Use __sigfillset. Document that sigfillset does the right thing wrt
5742 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5745 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5746 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5747 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5748 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5749 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5750 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5752 * Makefile (tests): Add tst-initializers1.
5753 (CFLAGS-tst-initializers1.c): Set.
5754 * tst-initializers1.c: New test.
5756 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5758 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5759 Make sure __flags are located at offset 48 from the start of the
5762 2005-07-02 Roland McGrath <roland@redhat.com>
5764 * Makeconfig: Comment fix.
5766 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5768 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5769 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5770 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5771 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5772 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5773 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5774 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5775 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5776 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5777 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5779 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5781 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5782 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5783 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5785 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5786 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5787 field. Put in sysinfo field unconditionally.
5788 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5789 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5790 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5791 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5793 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5794 * pthread_create.c (__pthread_create_2_1): Use
5795 THREAD_COPY_STACK_GUARD macro.
5796 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5798 * tst-stackguard1.c: New file.
5799 * tst-stackguard1-static.c: New file.
5801 2005-06-14 Alan Modra <amodra@bigpond.net.au>
5803 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5804 Invoke CGOTSETUP and CGOTRESTORE.
5805 (CGOTSETUP, CGOTRESTORE): Define.
5807 2005-05-29 Richard Henderson <rth@redhat.com>
5809 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5810 (tf_write, tf_writev): Use it.
5811 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5814 2005-05-23 Jakub Jelinek <jakub@redhat.com>
5816 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5817 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5818 __librt_*_asynccancel@local.
5820 2005-05-17 Alan Modra <amodra@bigpond.net.au>
5822 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5823 all occurrences of JUMPTARGET. Instead append @local to labels.
5825 2005-05-20 Jakub Jelinek <jakub@redhat.com>
5827 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5828 size/alignment of struct pthread rather than tcbhead_t.
5829 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5831 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5833 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5836 2005-05-19 Richard Henderson <rth@redhat.com>
5838 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5839 __sync_val_compare_and_swap, not explicit _si variant.
5840 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5842 2005-05-03 Ulrich Drepper <drepper@redhat.com>
5845 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5847 2005-05-03 Jakub Jelinek <jakub@redhat.com>
5849 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5850 .eh_frame section, use cfi_* directives.
5852 2005-04-27 Jakub Jelinek <jakub@redhat.com>
5854 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5857 2005-04-27 Ulrich Drepper <drepper@redhat.com>
5860 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5863 2005-04-27 Roland McGrath <roland@redhat.com>
5865 * Makefile (tests): Remove tst-clock2.
5867 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5868 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5869 translating to the kernel clockid_t for our own process/thread clock.
5871 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5873 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5875 * old_pthread_cond_init.c: Include <errno.h>.
5876 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5877 process shared or uses clock other than CLOCK_REALTIME.
5878 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5880 2005-04-13 David S. Miller <davem@davemloft.net>
5882 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5883 * sysdeps/sparc/sparc64/clone.S: New file.
5885 2005-04-05 Jakub Jelinek <jakub@redhat.com>
5888 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5889 __inline instead of inline.
5890 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5892 2005-03-31 Jakub Jelinek <jakub@redhat.com>
5894 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5895 functionally equivalent, but shorter instructions.
5896 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5897 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5898 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5900 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5901 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5902 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5903 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5904 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5905 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5906 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5908 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5909 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5910 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5911 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5912 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5914 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5916 * sysdeps/mips/Makefile: New file.
5917 * sysdeps/mips/nptl-sysdep.S: New file.
5918 * sysdeps/mips/tcb-offsets.sym: New file.
5919 * sysdeps/mips/pthread_spin_lock.S: New file.
5920 * sysdeps/mips/pthread_spin_trylock.S: New file.
5921 * sysdeps/mips/pthreaddef.h: New file.
5922 * sysdeps/mips/tls.h: New file.
5923 * sysdeps/mips/jmpbuf-unwind.h: New file.
5924 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5925 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5926 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5927 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5928 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5929 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5930 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5931 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5932 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5933 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5935 2005-03-23 Ulrich Drepper <drepper@redhat.com>
5938 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5941 2005-03-10 Jakub Jelinek <jakub@redhat.com>
5943 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5945 2005-02-25 Roland McGrath <roland@redhat.com>
5947 * alloca_cutoff.c: Correct license text.
5948 * tst-unload.c: Likewise.
5949 * sysdeps/pthread/allocalim.h: Likewise.
5950 * sysdeps/pthread/pt-initfini.c: Likewise.
5951 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5952 * sysdeps/pthread/bits/sigthread.h: Likewise.
5953 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5954 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5956 2005-02-16 Roland McGrath <roland@redhat.com>
5958 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5959 Use unsigned int * for ptr_nthreads.
5961 2005-02-14 Alan Modra <amodra@bigpond.net.au>
5964 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5967 2005-02-07 Richard Henderson <rth@redhat.com>
5970 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5973 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
5975 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5976 order of arguments in invocation of atomic_add_zero.
5978 2005-01-26 Jakub Jelinek <jakub@redhat.com>
5981 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5982 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5983 at least gotntpoff relocation and addition.
5984 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5986 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5988 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5991 2005-01-06 Ulrich Drepper <drepper@redhat.com>
5993 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5994 entry for static tls deallocation fix.
5995 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5996 also contains information whether the memory pointed to is static
5998 * sysdeps/i386/tls.h: Likewise.
5999 * sysdeps/ia64/tls.h: Likewise.
6000 * sysdeps/powerpc/tls.h: Likewise.
6001 * sysdeps/s390/tls.h: Likewise.
6002 * sysdeps/sh/tls.h: Likewise.
6003 * sysdeps/sparc/tls.h: Likewise.
6004 * sysdeps/x86_64/tls.h: Likewise.
6006 2004-12-27 Ulrich Drepper <drepper@redhat.com>
6008 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
6010 2004-12-21 Jakub Jelinek <jakub@redhat.com>
6012 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
6014 * Makefile (tests): Add tst-align2.
6015 * tst-align2.c: New test.
6016 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
6017 -mpreferred-stack-boundary=4.
6019 2004-12-18 Roland McGrath <roland@redhat.com>
6021 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
6022 New file removed withdrawn for the moment.
6024 2004-12-17 Richard Henderson <rth@redhat.com>
6026 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
6027 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
6029 2004-12-16 Ulrich Drepper <drepper@redhat.com>
6031 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
6032 Increased PTHREAD_STACK_MIN.
6034 * tst-context1.c (stacks): Use bigger stack size.
6036 2004-12-16 Jakub Jelinek <jakub@redhat.com>
6038 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
6039 * sysdeps/sparc/tcb-offsets.sym: Add TID.
6041 2004-12-15 Jakub Jelinek <jakub@redhat.com>
6043 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
6044 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
6045 * sysdeps/s390/tcb-offsets.sym (TID): Add.
6047 2004-12-15 Ulrich Drepper <drepper@redhat.com>
6049 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
6051 2004-12-14 Ulrich Drepper <drepper@redhat.com>
6053 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
6054 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
6056 * tst-getpid1.c: If child crashes, report this first. Print which
6059 2004-12-09 Ulrich Drepper <drepper@redhat.com>
6061 * init.c (__pthread_initialize_minimal_internal): Also unblock
6064 2004-12-01 Jakub Jelinek <jakub@redhat.com>
6066 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
6067 _POSIX_THREAD_CPUTIME): Define to 0.
6068 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
6069 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
6070 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
6071 __timer_signal_thread_tclk): Remove.
6072 (init_module): Remove their initialization.
6073 (thread_cleanup): Remove their cleanup assertions.
6074 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
6075 __timer_signal_thread_tclk): Remove.
6076 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
6077 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
6078 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
6080 2004-12-07 Jakub Jelinek <jakub@redhat.com>
6082 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
6083 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
6085 * Makefile (tests): Add tst-getpid2.
6086 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
6087 (do_test): Use it. Use __clone2 instead of clone on ia64.
6088 * tst-getpid2.c: New test.
6090 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6092 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
6094 2004-12-04 Ulrich Drepper <drepper@redhat.com>
6096 * Makefile (tests): Add tst-getpid1.
6097 * tst-getpid1.c: New file.
6098 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
6099 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
6101 2004-12-02 Roland McGrath <roland@redhat.com>
6103 * Makefile (libpthread-nonshared): Variable removed.
6104 ($(objpfx)libpthread_nonshared.a): Target removed.
6105 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
6106 These are now handled by generic magic from
6107 libpthread-static-only-routines being set.
6109 2004-11-27 Ulrich Drepper <drepper@redhat.com>
6111 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
6112 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
6113 _POSIX_THREAD_PRIO_PROTECT): Define.
6114 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6115 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6116 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6118 2004-11-26 Jakub Jelinek <jakub@redhat.com>
6120 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
6121 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
6122 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
6123 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
6124 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6125 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6126 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6128 2004-11-24 Ulrich Drepper <drepper@redhat.com>
6130 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
6132 * Makefile (libpthread-routines): Add pthread_setschedprio.
6133 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
6134 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
6135 * pthread_setschedprio.c: New file.
6137 2004-11-20 Jakub Jelinek <jakub@redhat.com>
6139 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
6140 * pthread_cancel.c (pthread_create): Likewise.
6142 * Makefile (libpthread-routines): Add vars.
6143 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
6144 * init.c (__default_stacksize, __is_smp): Remove.
6146 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
6147 and define a wrapper macro.
6148 (PTHREAD_STATIC_FN_REQUIRE): Define.
6149 * allocatestack.c (__find_thread_by_id): Undefine.
6150 * pthread_create (__pthread_keys): Remove.
6151 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
6152 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
6153 PTHREAD_STATIC_FN_REQUIRE.
6155 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6157 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
6158 parameter to REGISTER macro.
6160 2004-11-17 Roland McGrath <roland@redhat.com>
6162 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
6163 Make sure SIGCANCEL is blocked as well.
6165 2004-11-10 Jakub Jelinek <jakub@redhat.com>
6167 * sysdeps/pthread/setxid.h: New file.
6168 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
6169 (struct xid_command): Add forward decl.
6170 (struct pthread_functions): Change return type of __nptl_setxid hook
6172 * pthreadP.h (__nptl_setxid): Change return type to int.
6173 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
6174 calling thread, return its return value and set errno on failure.
6175 * descr.h (struct xid_command): Change id type to long array.
6177 * Makefile: Add rules to build and test tst-setuid1 and
6179 * tst-setuid1.c: New test.
6180 * tst-setuid1-static.c: New test.
6182 2004-11-10 Jakub Jelinek <jakub@redhat.com>
6184 * Makefile (tests): Add tst-exit3.
6185 * tst-exit3.c: New test.
6187 2004-11-09 Ulrich Drepper <drepper@redhat.com>
6189 * Makefile (tests): Add tst-exit2.
6190 * tst-exit2.c: New file.
6192 2004-11-09 Roland McGrath <roland@redhat.com>
6195 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
6196 here, before calling clone.
6197 * pthread_create.c (start_thread): Don't do it here.
6199 2004-11-02 Jakub Jelinek <jakub@redhat.com>
6201 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
6203 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6205 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6206 Set ETIMEDOUT to errno when time is up. Tweak to avoid
6209 2004-10-28 Jakub Jelinek <jakub@redhat.com>
6211 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
6212 if sched_priority is not between minprio and maxprio.
6214 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6216 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6217 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
6219 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6220 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
6222 2004-10-24 Ulrich Drepper <drepper@redhat.com>
6224 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
6225 not-cancelable I/O functions.
6227 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6229 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6230 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6231 make sure 2 is stored in the futex and we looked at the old value.
6232 Fix a few other problems to return the correct value.
6234 2004-10-14 Richard Henderson <rth@redhat.com>
6236 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
6239 2004-10-06 Jakub Jelinek <jakub@redhat.com>
6241 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
6242 of pthread-functions.h and pthreaddef.h.
6243 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
6245 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6246 Change __data.__nwaiters from int to unsigned int.
6248 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
6249 sysconf (_SC_THREAD_CPUTIME) returns negative value.
6251 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
6254 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
6255 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
6257 2004-10-06 Ulrich Drepper <drepper@redhat.com>
6259 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
6260 test fails, remove message queue.
6261 (tf_msgsnd): Likewise.
6263 2004-10-05 Jakub Jelinek <jakub@redhat.com>
6265 * tst-clock1.c: Change #ifdef to #if defined.
6266 * tst-clock2.c: Likewise.
6267 * tst-cond11.c: Likewise.
6269 * sysdeps/pthread/timer_create.c (timer_create): Use
6270 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
6271 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
6274 2004-10-05 Jakub Jelinek <jakub@redhat.com>
6276 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
6277 _POSIX_THREAD_CPUTIME): Define to 0.
6279 2004-10-04 Ulrich Drepper <drepper@redhat.com>
6281 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
6282 and _POSIX_THREAD_CPUTIME to zero.
6283 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6284 * tst-barrier2.c: Fix testing for POSIX feature.
6285 * tst-clock1.c: Likewise.
6286 * tst-clock2.c: Likewise.
6287 * tst-cond11.c: Likewise.
6288 * tst-cond4.c: Likewise.
6289 * tst-cond6.c: Likewise.
6290 * tst-flock2.c: Likewise.
6291 * tst-mutex4.c: Likewise.
6292 * tst-mutex9.c: Likewise.
6293 * tst-rwlock12.c: Likewise.
6294 * tst-rwlock4.c: Likewise.
6295 * tst-signal1.c: Likewise.
6296 * tst-spin2.c: Likewise.
6297 * sysdeps/pthread/posix-timer.h: Likewise.
6298 * sysdeps/pthread/timer_create.c: Likewise.
6299 * sysdeps/pthread/timer_routines.c: Likewise.
6301 2004-10-01 Ulrich Drepper <drepper@redhat.com>
6303 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6304 (__lll_mutex_timedlock_wait): Address futex correctly.
6306 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6307 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6308 make sure 2 is stored in the futex and we looked at the old value.
6309 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6310 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
6311 which might very well made the code not working at all before.
6314 2004-09-28 Ulrich Drepper <drepper@redhat.com>
6316 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6317 allow SIGSETXID to be sent.
6318 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
6319 for SIGSETXID to be defined.
6320 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
6321 SIGSETXID cannot be blocked.
6323 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6324 Add __extension__ to long long types.
6325 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6326 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6327 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6328 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6329 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6330 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6331 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6333 2004-09-25 Ulrich Drepper <drepper@redhat.com>
6335 * descr.h (struct pthread): Add stopped_start field.
6336 * sysdeps/pthread/createthread.c (create_thread): Set
6337 start_stopped flag in descriptor for new thread appropriately.
6338 * pthread_create.c (start_thread): Only take lock to be stopped on
6339 startup if stopped_start flag says so.
6341 2004-09-24 Ulrich Drepper <drepper@redhat.com>
6343 * pthread_create.c (__pthread_create_2_1): Remember whether thread
6344 is created detached and if yes, do not try to free the stack in case
6345 the thread creation failed.
6346 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
6347 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
6348 case there has been no error. [BZ #405]
6350 * pthread_create.c (start_thread): Don't wait for scheduler data
6351 etc to be set at the beginning of the function. The cancellation
6352 infrastructure must have been set up. And enable async
6353 cancellation before potentially going to sleep. [BZ #401]
6355 2004-09-20 Ulrich Drepper <drepper@redhat.com>
6357 * Versions: Remove exports for pthread_set*id_np functions.
6358 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
6360 * Makefile: Don't build pthread_set*id code for now.
6362 2004-09-19 Ulrich Drepper <drepper@redhat.com>
6364 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
6366 * allocatestack.c (__nptl_setxid): New function.
6367 * descr.h (struct xid_command): Define type.
6368 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
6369 (sighandler_setxid): New function.
6370 (__pthread_initialize_minimal): Register sighandler_setxid for
6372 * pt-allocrtsig.c: Update comment.
6373 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
6374 Declare __nptl_setxid.
6375 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
6376 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
6377 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6378 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6379 and pthread_setresuid_np.
6380 * pthread_setgid_np.c: New file.
6381 * pthread_setuid_np.c: New file.
6382 * pthread_setegid_np.c: New file.
6383 * pthread_seteuid_np.c: New file.
6384 * pthread_setregid_np.c: New file.
6385 * pthread_setreuid_np.c: New file.
6386 * pthread_setresgid_np.c: New file.
6387 * pthread_setresuid_np.c: New file.
6388 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
6389 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6390 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6391 and pthread_setresuid_np.
6392 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
6393 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
6394 pthread_setregid, and pthread_setresgid.
6396 2004-09-18 Ulrich Drepper <drepper@redhat.com>
6398 * allocatestack.c (allocate_stack): Return EAGAIN instead of
6399 ENOMEM when out of memory.
6401 2004-09-10 Roland McGrath <roland@redhat.com>
6404 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
6405 code, since we don't try to use the broken CLONE_STOPPED any more.
6406 * pthread_create.c (start_thread): Likewise.
6408 2004-09-15 Richard Henderson <rth@redhat.com>
6410 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
6412 2004-09-01 David Mosberger <davidm@hpl.hp.com>
6414 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
6415 (__libc_unwind_longjmp): Delete macro and declare as function.
6416 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
6417 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
6419 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
6420 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6421 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6423 2004-09-12 Ulrich Drepper <drepper@redhat.com>
6425 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6427 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6428 types also for __USE_XOPEN2K.
6429 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6430 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6431 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6432 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6433 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6434 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6435 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6438 2004-09-08 Ulrich Drepper <drepper@redhat.com>
6440 * sysdeps/pthread/pthread.h
6441 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6442 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6443 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6444 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6447 2004-09-07 Ulrich Drepper <drepper@redhat.com>
6449 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6450 PSEUDO to be used with . prefix.
6452 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6453 Use atomic_increment instead of atomic_exchange_and_add.
6454 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6456 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6458 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6461 * allocatestack.c (allocate_stack): Use atomic_increment_val
6462 instead of atomic_exchange_and_add.
6463 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6464 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6466 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6469 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6470 the initialization function might throw.
6472 2005-09-05 Richard Henderson <rth@redhat.com>
6474 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6475 Move definition inside libpthread, libc, librt check. Provide
6476 definition for rtld.
6478 2004-09-02 Ulrich Drepper <drepper@redhat.com>
6480 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6481 * sysdeps/i386/jmpbuf-unwind.h: Likewise
6482 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6483 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6484 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6485 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6486 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6487 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6490 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6491 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6492 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6494 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6495 Decrement __nwaiters. If pthread_cond_destroy has been called and
6496 this is the last waiter, signal pthread_cond_destroy caller and
6497 avoid using the pthread_cond_t structure after unlock.
6498 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6499 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6500 Read clock type from the least significant bits of __nwaiters instead
6502 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6503 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6505 2004-08-31 Jakub Jelinek <jakub@redhat.com>
6508 * Makefile (tests): Add tst-cond20 and tst-cond21.
6509 * tst-cond20.c: New test.
6510 * tst-cond21.c: New test.
6511 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6512 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6514 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6516 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6517 (pthread_cond_t): Likewise.
6518 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6520 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6522 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6524 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6525 (cond_nwaiters): New.
6527 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6528 if there are waiters not signalled yet.
6529 Wait until all already signalled waiters wake up.
6530 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6531 __nwaiters. If pthread_cond_destroy has been called and this is the
6532 last waiter, signal pthread_cond_destroy caller and avoid using
6533 the pthread_cond_t structure after unlock.
6534 (__pthread_cond_wait): Increment __nwaiters in the beginning,
6535 decrement it when leaving. If pthread_cond_destroy has been called
6536 and this is the last waiter, signal pthread_cond_destroy caller.
6537 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6538 Likewise. Read clock type from the least significant bits of
6539 __nwaiters instead of __clock.
6540 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6541 whether clock ID can be encoded in COND_CLOCK_BITS bits.
6542 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6543 clock type just from the last COND_CLOCK_BITS bits of value.
6544 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6545 instead of __clock, just from second bit of condattr's value.
6547 2004-08-30 Jakub Jelinek <jakub@redhat.com>
6549 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6550 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
6552 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6554 2004-08-15 Roland McGrath <roland@frob.com>
6556 * pthread_atfork.c: Update copyright terms including special exception
6557 for these trivial files, which are statically linked into executables
6558 that use dynamic linking for the significant library code.
6560 2004-08-09 Jakub Jelinek <jakub@redhat.com>
6562 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6563 pthread_rwlock_rdlock.
6564 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6565 Decrease __nr_readers_queued after reacquiring lock.
6566 * sysdeps/pthread/pthread_rwlock_timedrdlock
6567 (pthread_rwlock_timedrdlock): Likewise.
6568 Reported by Bob Cook <bobcook47@hotmail.com>.
6570 2004-08-11 Jakub Jelinek <jakub@redhat.com>
6572 * tst-rwlock14.c (tf): Read main thread handle from *ARG
6573 before pthread_barrier_wait.
6575 2004-08-07 Ulrich Drepper <drepper@redhat.com>
6577 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6578 Remove unnecessary exception handling data.
6580 2004-07-23 Jakub Jelinek <jakub@redhat.com>
6583 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6584 instead of clockid_t.
6586 2004-07-21 Roland McGrath <roland@redhat.com>
6588 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6590 2004-07-19 Roland McGrath <roland@redhat.com>
6592 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6594 2004-07-02 Roland McGrath <roland@redhat.com>
6596 * configure: Don't exit.
6598 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6600 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6601 (__pthread_cond_timedwait): Check for invalid nanosecond in
6604 2004-07-07 Ulrich Drepper <drepper@redhat.com>
6606 * Makefile: Add rules to build and run tst-fini1.
6607 * tst-fini1.c: New file.
6608 * tst-fini1mod.c: New file.
6610 2004-07-05 Ulrich Drepper <drepper@redhat.com>
6612 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6613 if no cancellation support is needed.
6614 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6615 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6616 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6617 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6618 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6619 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6620 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6621 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6622 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6624 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6625 only if not already defined.
6627 2004-07-05 Jakub Jelinek <jakub@redhat.com>
6629 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6630 constraint "m" instead of "0" for futex.
6632 * shlib-versions: Add powerpc64-.*-linux.*.
6634 2004-07-04 Jakub Jelinek <jakub@redhat.com>
6636 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6637 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6639 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6640 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6643 2004-06-29 Roland McGrath <roland@redhat.com>
6645 * Banner: NPTL no longer has its own version number.
6646 * Makefile (nptl-version): Variable removed.
6647 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6648 using $(version), the glibc version number.
6650 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6652 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6653 Fix branch offset for a PLT entry.
6654 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6656 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6658 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6660 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6663 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6665 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6668 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6670 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6671 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6673 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6674 (pthread_rwlock_timedrdlock): Likewise.
6676 2004-06-22 Jakub Jelinek <jakub@redhat.com>
6678 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6679 Set __r7 to val, not mutex.
6681 2004-06-27 Ulrich Drepper <drepper@redhat.com>
6683 * Makefile: Add rules to build tst-rwlock14.
6684 * tst-rwlock14.c: New file.
6686 2004-06-24 Boris Hu <boris.hu@intel.com>
6688 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6690 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6692 2004-06-19 Andreas Jaeger <aj@suse.de>
6694 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6695 assembler in last patch.
6697 2004-06-17 Ulrich Drepper <drepper@redhat.com>
6699 * sysdeps/pthread/pthread_cond_timedwait.c
6700 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6701 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6702 (__pthread_cond_timedwait): Check for invalid nanosecond in
6704 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6705 * tst-cond19.c: New file.
6706 * Makefile: Add rules to build and run tst-cond19.
6708 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6710 * tst-context1.c (GUARD_PATTERN): Defined.
6711 (tst_context_t): Define struct containing ucontext_t & guard words.
6712 (ctx): Declare as an array of tst_context_t.
6713 (fct): Verify uc_link & guard words are still valid.
6714 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6716 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6718 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6719 Add __data.__futex field, reshuffle __data.__clock.
6720 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6721 (__pthread_cond_signal): Increment __futex at the same time as
6722 __wakeup_seq or __total_seq. Pass address of __futex instead of
6723 address of low 32-bits of __wakeup_seq to futex syscall.
6724 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6725 (__pthread_cond_wait): Likewise. Pass __futex value from before
6726 releasing internal lock to FUTEX_WAIT.
6727 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6728 (__pthread_cond_timedwait): Likewise.
6729 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6730 (FUTEX_CMP_REQUEUE): Define.
6731 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6732 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6733 Pass __futex value from before the unlock and __futex address instead
6734 of address of low 32-bits of __wakeup_seq to futex syscall.
6735 Fallback to FUTEX_WAKE all on any errors.
6737 2004-06-08 Jakub Jelinek <jakub@redhat.com>
6739 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6741 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6742 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6743 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6744 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6745 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6747 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6749 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6750 Add memory clobber to inline assembly.
6751 (__lll_mutex_trylock): Likewise.
6752 (__lll_mutex_cond_trylock): Likewise.
6754 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6756 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6757 Pass val argument as 6th system call argument in %r7.
6759 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6761 * Makefile (tests): Add tst-cond16.
6762 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6763 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6764 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6765 Add __data.__futex field, reshuffle __data.__clock.
6766 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6767 (__pthread_cond_signal): Increment __futex at the same time as
6768 __wakeup_seq or __total_seq. Pass address of __futex instead of
6769 address of low 32-bits of __wakeup_seq to futex syscall.
6770 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6771 (__pthread_cond_wait): Likewise. Pass __futex value from before
6772 releasing internal lock to FUTEX_WAIT.
6773 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6774 (__pthread_cond_timedwait): Likewise.
6775 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6776 (FUTEX_CMP_REQUEUE): Define.
6777 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6778 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6779 Pass __futex value from before the unlock and __futex address instead
6780 of address of low 32-bits of __wakeup_seq to futex syscall.
6781 Fallback to FUTEX_WAKE all on any errors.
6782 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6784 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6785 internally. Return non-zero if error, zero if success.
6786 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6787 Add __data.__futex field, reshuffle __data.__clock.
6788 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6790 (lll_futex_requeue): Add val argument, return 1 unconditionally
6792 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6793 Add __data.__futex field, reshuffle __data.__clock.
6794 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6796 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6797 internally. Return non-zero if error, zero if success.
6798 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6799 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6800 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6802 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6803 internally. Return non-zero if error, zero if success.
6804 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6805 Add __data.__futex field, reshuffle __data.__clock.
6806 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6808 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6809 internally. Return non-zero if error, zero if success.
6810 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6811 Add __data.__futex field, reshuffle __data.__clock.
6812 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6813 Add __data.__futex field, reshuffle __data.__clock.
6814 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6815 Increment __futex at the same time as __wakeup_seq or __total_seq.
6816 Pass address of __futex instead of address of low 32-bits of
6817 __wakeup_seq to futex syscall.
6818 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6819 Pass __futex value from before releasing internal lock
6821 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6822 Likewise. Avoid unnecessary shadowing of variables.
6823 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6824 Set __futex to 2 * __total_seq. Pass __futex value from before the
6825 unlock and __futex address instead of address of low 32-bits of
6826 __wakeup_seq to futex_requeue macro, adjust for new return value
6828 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6829 (__pthread_cond_signal): Increment __futex at the same time as
6830 __wakeup_seq or __total_seq. Pass address of __futex instead of
6831 address of low 32-bits of __wakeup_seq to futex syscall.
6832 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6833 (__pthread_cond_wait): Likewise. Pass __futex value from before
6834 releasing internal lock to FUTEX_WAIT.
6835 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6836 (__pthread_cond_timedwait): Likewise.
6837 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6838 (FUTEX_CMP_REQUEUE): Define.
6839 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6840 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6841 Pass __futex value from before the unlock and __futex address instead
6842 of address of low 32-bits of __wakeup_seq to futex syscall.
6843 Fallback to FUTEX_WAKE all on any errors.
6845 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6847 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6848 Add nop to align the end of critical section.
6849 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6851 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6853 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6854 Add __broadcast_seq field.
6855 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6856 all waiters as woken with woken_seq and bump broadcast counter.
6857 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6858 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6859 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6860 Comment typo fixes. Avoid returning -ETIMEDOUT.
6862 2004-06-01 Ulrich Drepper <drepper@redhat.com>
6864 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6865 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6866 Reported by Kaz Kojima.
6868 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6870 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6872 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6874 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6875 __broadcast_seq with bc_seq after acquiring internal lock instead of
6878 2004-05-18 Jakub Jelinek <jakub@redhat.com>
6880 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6882 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6883 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6884 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6885 (pthread_cond_t): Add __data.__broadcast_seq field.
6886 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6887 (FRAME_SIZE): Define.
6888 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6890 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6892 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6894 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6895 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6898 2004-05-18 Ulrich Drepper <drepper@redhat.com>
6900 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6901 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6902 Add __broadcast_seq field.
6903 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6904 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6905 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6906 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6907 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6908 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6909 all waiters as woken with woken_seq and bump broadcast counter.
6910 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6911 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6912 __broadcast_seq field.
6913 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6914 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6915 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6916 * pthread_cond_init.c: Initialize __broadcast_seq field.
6917 * Makefile (tests): Add tst-cond17 and tst-cond18.
6918 Add .NOTPARALLEL goal.
6919 * tst-cond16.c: New file. From Jakub.
6920 * tst-cond17.c: New file. From Jakub.
6921 * tst-cond18.c: New file. From Jakub.
6923 2004-05-16 Ulrich Drepper <drepper@redhat.com>
6925 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6928 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6929 Parametrize frame size. Correct some unwind info.
6930 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6932 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6934 * tst-stack3.c: Note testing functionality beyond POSIX.
6936 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6938 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6939 Change conditional from ifdef to if.
6941 2004-04-23 Jakub Jelinek <jakub@redhat.com>
6943 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6944 SYSDEP_CANCEL_ERROR): Define.
6947 2004-05-01 Jakub Jelinek <jakub@redhat.com>
6949 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6951 2004-04-20 Jakub Jelinek <jakub@redhat.com>
6953 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6955 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6957 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6958 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6959 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6960 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6962 2004-04-19 Ulrich Drepper <drepper@redhat.com>
6964 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6965 thread has all signals blocked.
6967 2004-04-18 Andreas Jaeger <aj@suse.de>
6969 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6970 (SEM_VALUE_MAX): Add missing brace.
6972 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6974 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6976 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6977 * sysdeps/pthread/tst-mqueue8x.c: New test.
6978 * tst-cancel4.c: Update comment about message queues.
6980 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6981 return it_value { 0, 0 }.
6982 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6984 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6985 assertion for SIGEV_NONE.
6986 (thread_attr_compare): Compare all attributes, not just a partial
6989 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6991 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6993 2004-04-17 Ulrich Drepper <drepper@redhat.com>
6995 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6996 Just use a plain number.
6997 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6998 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6999 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
7000 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
7001 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
7002 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
7003 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
7005 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7007 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
7009 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7011 2004-04-15 Jakub Jelinek <jakub@redhat.com>
7013 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
7014 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
7015 of calling sigwaitinfo.
7017 2004-04-16 Ulrich Drepper <drepper@redhat.com>
7019 * allocatestack.c (allocate_stack): Set reported_guardsize
7021 * pthread_getattr_np.c (pthread_getattr_np): Use
7022 reported_guardsize instead of guardsize.
7023 * descr.h (struct pthread): Add reported_guardsize field.
7025 2004-04-13 Jakub Jelinek <jakub@redhat.com>
7027 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
7029 2004-04-12 Ulrich Drepper <drepper@redhat.com>
7031 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
7033 2004-04-08 Jakub Jelinek <jakub@redhat.com>
7035 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
7036 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
7037 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
7038 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
7039 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
7041 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
7042 (_POSIX_MESSAGE_PASSING): Define.
7043 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
7044 (_POSIX_MESSAGE_PASSING): Define.
7045 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
7046 (_POSIX_MESSAGE_PASSING): Define.
7048 2004-04-04 Ulrich Drepper <drepper@redhat.com>
7050 * tst-context1.c (fct): Check whether correct stack is used.
7052 2004-04-03 Ulrich Drepper <drepper@redhat.com>
7054 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
7055 matching constraints for asm mem parameters.
7057 * tst-clock2.c (tf): Don't define unless needed.
7059 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
7061 * Makefile (link-libc-static): Use $(static-gnulib) instead of
7064 2004-03-30 Ulrich Drepper <drepper@redhat.com>
7066 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
7067 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
7068 * pthreadP.h: Declare __nptl_deallocate_tsd.
7069 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
7072 * Makefile (tests): Add tst-tsd5.
7073 * tst-tsd5.c: New file.
7075 2004-03-29 Ulrich Drepper <drepper@redhat.com>
7077 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7078 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
7079 is SHLIB_COMPAT check.
7080 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7081 (__pthread_attr_getaffinity_old): Likewise.
7082 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7083 (__pthread_getaffinity_old): Likewise.
7084 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7085 (__pthread_setaffinity_old): Likewise.
7087 2004-03-26 Ulrich Drepper <drepper@redhat.com>
7089 * allocatestack.c (_make_stacks_executable): Call
7090 _dl_make_stack_executable first.
7092 2004-03-24 Roland McGrath <roland@redhat.com>
7094 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
7095 constraint instead of "0".
7097 2004-03-24 Ulrich Drepper <drepper@redhat.com>
7099 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7100 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
7102 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
7103 code to avoid warning.
7105 2004-03-24 Andreas Jaeger <aj@suse.de>
7107 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7108 (__pthread_attr_setaffinity_old): Remove const.
7110 2004-03-23 Ulrich Drepper <drepper@redhat.com>
7112 * sysdeps/unix/sysv/linux/smp.h: New file.
7113 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
7114 * init.c: Define __is_smp.
7115 (__pthread_initialize_minimal_internal): Call is_smp_system to
7116 initialize __is_smp.
7117 * pthreadP.h: Declare __is_smp.
7118 Define MAX_ADAPTIVE_COUNT is necessary.
7119 * pthread_mutex_init.c: Add comment regarding __spins field.
7120 * pthread_mutex_lock.c: Implement adaptive mutex type.
7121 * pthread_mutex_timedlock.c: Likewise.
7122 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
7123 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
7125 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7126 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7127 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7128 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7129 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7130 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7131 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7132 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
7133 lll_mutex_cond_trylock.
7134 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7135 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7136 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7137 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7138 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7139 Define BUSY_WAIT_NOP.
7140 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7141 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7143 * tst-mutex5.c: Add support for testing adaptive mutexes.
7144 * tst-mutex7.c: Likewise.
7145 * tst-mutex5a.c: New file.
7146 * tst-mutex7a.c: New file.
7147 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
7149 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7150 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
7151 vgettimeofday call might destroy the content.
7153 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
7156 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7157 No need to restrict type of ret. Make it int. Add comment.
7159 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7160 Remove unnecessary setne instruction.
7162 2004-03-22 Jakub Jelinek <jakub@redhat.com>
7164 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7165 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
7166 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
7167 If realloc fails, break out of the loop.
7169 2004-03-20 Andreas Jaeger <aj@suse.de>
7171 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7172 (__pthread_setaffinity_old): Fix interface.
7173 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7174 (__pthread_getaffinity_old): Likewise.
7176 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7177 (__pthread_setaffinity_new): Remove duplicate declaration.
7179 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7181 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
7182 the return value to a safe register.
7183 (CDISABLE): Set the function argument correctly.
7185 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7187 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
7188 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
7189 Rewrite so that only one locked memory operation per round is needed.
7190 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
7191 (pthread_barrier_wait): After wakeup, release lock only when the
7192 last thread stopped using the barrier object.
7193 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
7194 (__pthread_cond_wait): Don't store mutex address if the current
7195 value is ~0l. Add correct cleanup support and unwind info.
7196 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7197 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
7198 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
7199 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
7200 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
7201 Add correct cleanup support and unwind info.
7202 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
7203 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
7204 information for syscall wrappers.
7206 2004-03-18 Ulrich Drepper <drepper@redhat.com>
7208 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7209 cpusetsize field, remove next.
7210 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
7211 parameter for size of the CPU set.
7212 (pthread_setaffinity_np): Likewise.
7213 (pthread_attr_getaffinity_np): Likewise.
7214 (pthread_attr_setaffinity_np): Likewise.
7215 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
7216 interface change, keep compatibility code.
7217 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
7218 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
7219 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
7220 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
7221 __pthread_getaffinity_np.
7222 * Versions: Add version for changed interfaces.
7223 * tst-attr3.c: Adjust test for interface change.
7224 * pthread_getattr_np.c: Query the kernel about the affinity mask with
7225 increasing buffer sizes.
7226 * pthread_attr_destroy.c: Remove unused list handling.
7227 * pthread_attr_init.c: Likewise.
7229 2004-03-17 Roland McGrath <roland@redhat.com>
7231 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
7232 first argument to clock_getres so we ever enable kernel timers.
7234 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
7236 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
7238 2004-03-12 Richard Henderson <rth@redhat.com>
7240 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
7241 oldvalue from CENABLE to CDISABLE.
7243 2004-03-12 Ulrich Drepper <drepper@redhat.com>
7245 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
7246 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
7247 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
7248 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
7250 2004-03-11 Richard Henderson <rth@redhat.com>
7252 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
7253 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
7254 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
7256 2004-03-11 Jakub Jelinek <jakub@redhat.com>
7258 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
7259 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
7260 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
7262 2004-03-11 Jakub Jelinek <jakub@redhat.com>
7264 * forward.c (__pthread_cond_broadcast_2_0,
7265 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
7266 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
7267 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
7269 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7271 * sysdeps/sh/tcb-offsets.sym: Add PID.
7272 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
7273 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
7275 2004-03-10 Ulrich Drepper <drepper@redhat.com>
7277 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
7278 include <sysdep-cancel.h>, vfork is no cancellation point.
7279 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
7280 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
7281 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
7283 2004-03-10 Jakub Jelinek <jakub@redhat.com>
7285 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
7287 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
7288 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
7290 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
7292 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
7293 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
7294 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
7295 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
7296 of DO_CALL_VIA_BREAK. Work around a gas problem.
7298 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
7299 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
7300 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
7301 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
7302 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
7303 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
7305 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
7306 a local register for saving old PID. Negate PID in parent upon exit.
7308 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
7310 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7311 before syscall, set to the old value in the parent afterwards.
7312 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
7313 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
7315 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7316 before syscall, set to the old value in the parent afterwards.
7317 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
7318 * sysdeps/s390/tcb-offsets.sym: Add PID.
7320 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
7321 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
7322 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
7323 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
7324 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
7325 * sysdeps/sparc/tcb-offsets.sym: Add PID.
7327 2004-03-10 Andreas Schwab <schwab@suse.de>
7329 * sysdeps/ia64/tcb-offsets.sym: Add PID.
7330 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
7331 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
7333 2004-03-09 Jakub Jelinek <jakub@redhat.com>
7335 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
7336 * tst-cancel21.c (do_one_test): Likewise.
7337 Reported by Gordon Jin <gordon.jin@intel.com>.
7339 2004-02-09 Jakub Jelinek <jakub@redhat.com>
7341 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
7342 if non-zero and set to INT_MIN if zero.
7343 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
7344 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
7345 (SAVE_PID, RESTORE_PID): Define.
7347 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
7348 Use relative path to avoid including NPTL i386/vfork.S.
7349 (SAVE_PID, RESTORE_PID): Define.
7350 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
7351 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
7352 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
7354 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
7355 * tst-vfork1.c: New test.
7356 * tst-vfork2.c: New test.
7357 * tst-vfork1x.c: New test.
7358 * tst-vfork2x.c: New test.
7360 2004-03-08 Ulrich Drepper <drepper@redhat.com>
7362 * sysdeps/i386/tcb-offsets.sym: Add PID.
7363 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7364 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
7365 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
7367 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
7369 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
7371 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
7373 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7376 2004-03-07 Ulrich Drepper <drepper@redhat.com>
7378 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7381 * tst-once4.c: Remove unnecessary macro definition.
7383 * tst-mutex7.c (do_test): Limit thread stack size.
7384 * tst-once2.c (do_test): Likewise.
7385 * tst-tls3.c (do_test): Likewise.
7386 * tst-tls1.c (do_test): Likewise.
7387 * tst-signal3.c (do_test): Likewise.
7388 * tst-kill6.c (do_test): Likewise.
7389 * tst-key4.c (do_test): Likewise.
7390 * tst-join4.c (do_test): Likewise.
7391 * tst-fork1.c (do_test): Likewise.
7392 * tst-context1.c (do_test): Likewise.
7393 * tst-cond2.c (do_test): Likewise.
7394 * tst-cond10.c (do_test): Likewise.
7395 * tst-clock2.c (do_test): Likewise.
7396 * tst-cancel10.c (do_test): Likewise.
7397 * tst-basic2.c (do_test): Likewise.
7398 * tst-barrier4.c (do_test): Likewise.
7400 2004-03-05 Ulrich Drepper <drepper@redhat.com>
7402 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
7404 2004-03-01 Ulrich Drepper <drepper@redhat.com>
7406 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7407 (__pthread_cond_timedwait): Optimize wakeup test.
7408 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7409 (__pthread_cond_wait): Likewise.
7410 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7411 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7414 2004-02-29 Ulrich Drepper <drepper@redhat.com>
7416 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7417 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
7418 the atomic instruction needed.
7419 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7420 (__lll_mutex_lock_wait): Likewise.
7422 2004-02-28 Ulrich Drepper <drepper@redhat.com>
7424 * Makefile (tests): Add tst-cond14 and tst-cond15.
7425 * tst-cond14.c: New file.
7426 * tst-cond15.c: New file.
7428 2004-02-27 Ulrich Drepper <drepper@redhat.com>
7430 * sysdeps/pthread/createthread.c (create_thread): Remove use of
7431 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
7432 needs to be implemented differently to be useful.
7434 2004-02-26 Ulrich Drepper <drepper@redhat.com>
7436 * pthread_attr_setschedparam.c: Don't test priority against limits
7437 here. Set ATTR_FLAG_SCHED_SET flag.
7438 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7439 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7440 from parent thread to child. If attribute is used and scheduling
7441 parameters are not inherited, copy parameters from attribute or
7442 compute them. Check priority value.
7443 * pthread_getschedparam.c: If the parameters aren't known yet get
7444 them from the kernel.
7445 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7446 ATTR_FLAG_POLICY_SET flag for thread.
7447 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7448 and ATTR_FLAG_POLICY_SET.
7450 * sysdeps/pthread/createthread.c: Use tgkill if possible.
7452 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7453 fail if stack address hasn't been set. Just return 0.
7455 2004-02-25 Ulrich Drepper <drepper@redhat.com>
7457 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
7458 libpthread for the files in this list.
7459 (CFLAGS-tst-unload): Removed.
7460 * tst-unload.c (do_test): Don't use complete path for
7463 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7466 2004-02-22 Ulrich Drepper <drepper@redhat.com>
7468 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7469 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7470 operation per round is needed.
7471 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7472 (__lll_mutex_lock_wait): Likewise.
7474 2004-02-20 Ulrich Drepper <drepper@redhat.com>
7476 * tst-cancel9.c (cleanup): Don't print to stderr.
7478 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7480 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7482 2004-02-20 Jakub Jelinek <jakub@redhat.com>
7484 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7485 (__syscall_error_handler2): Call CDISABLE.
7486 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7487 (__syscall_error_handler2): Call CDISABLE.
7489 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7490 Release lock before the loop, don't reacquire it.
7492 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7494 2004-02-19 Andreas Schwab <schwab@suse.de>
7496 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7499 2004-02-18 Ulrich Drepper <drepper@redhat.com>
7501 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7502 (pthread_barrier_wait): After wakeup, release lock only when the
7503 last thread stopped using the barrier object.
7504 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7505 (pthread_barrier_wait): Likewise.
7506 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7508 * Makefile (tests): Add tst-barrier4.
7509 * tst-barrier4.c: New file.
7511 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7512 (__pthread_cond_timedwait): Perform timeout test while holding
7513 internal lock to prevent wakeup race.
7514 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7515 * sysdeps/pthread/pthread_cond_timedwait.c
7516 (__pthread_cond_timedwait): Likewise.
7517 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7518 (__pthread_cond_timedwait): Likewise.
7520 2004-02-18 Jakub Jelinek <jakub@redhat.com>
7522 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7523 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7524 * Makefile (tests): Add tst-rwlock13.
7525 * tst-rwlock13.c: New test.
7527 2004-02-16 Ulrich Drepper <drepper@redhat.com>
7529 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7530 (__condvar_tw_cleanup): Little optimization.
7531 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7533 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
7535 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7536 libpthread as "lib" parameter to SHLIB_COMPAT.
7537 (__novmx_siglongjmp): Fix typo in function name.
7538 (__novmx_longjmp): Fix typo in function name.
7540 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7542 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7545 * sysdeps/generic/pt-longjmp.c: Moved to...
7546 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
7548 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
7550 * Makefile (libpthread-routines): Add pt-cleanup.
7551 * pt-longjmp.c: Removed.
7552 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7553 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7554 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7555 Version longjmp, siglongjmp for GLIBC_2.3.4.
7556 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7558 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7560 * sysdeps/pthread/pthread_cond_timedwait.c
7561 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
7562 Reuse code. Add __builtin_expects.
7564 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7565 (__pthread_cond_timedwait): Get internal lock in case timeout has
7566 passed before the futex syscall.
7567 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7569 2004-01-20 Ulrich Drepper <drepper@redhat.com>
7571 * allocatestack.c: Pretty printing.
7573 * sysdeps/pthread/createthread.c (create_thread): Don't add
7574 CLONE_DETACHED bit if it is not necessary.
7576 2004-01-16 Ulrich Drepper <drepper@redhat.com>
7578 * pthread_getattr_np.c: Include ldsodefs.h.
7580 2004-01-16 Richard Henderson <rth@redhat.com>
7582 * allocatestack.c: Don't declare __libc_stack_end.
7583 * init.c (__pthread_initialize_minimal_internal): Likewise.
7584 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7586 2004-01-15 Richard Henderson <rth@redhat.com>
7588 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7589 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7590 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7591 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7592 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7593 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7594 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7595 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7597 2004-01-14 Ulrich Drepper <drepper@redhat.com>
7599 * init.c (pthread_functions): Make array const.
7601 2004-01-13 Ulrich Drepper <drepper@redhat.com>
7603 * allocatestack.c (__make_stacks_executable): Change interface.
7604 Check parameters. Pass parameter on to libc counterpart.
7605 * pthreadP.h: Change declaration.
7607 2004-01-13 Richard Henderson <rth@redhat.com>
7609 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7611 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7614 * sysdeps/alpha/Makefile: New file.
7615 * sysdeps/alpha/tcb-offsets.sym: New file.
7616 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7617 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7619 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7622 2004-01-08 Jakub Jelinek <jakub@redhat.com>
7624 * Makefile (tests): Add tst-backtrace1.
7625 * tst-backtrace1.c: New test.
7627 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7629 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7630 register as second parameter to the REGISTER macro.
7631 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7632 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7633 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7634 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7635 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7636 of thread register as second parameter to REGISTER macro in 64 case.
7638 2004-01-03 Ulrich Drepper <drepper@redhat.com>
7640 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7641 (CFLAGS-getpid.o): Defined.
7642 (CFLAGS-getpid.os): Defined.
7644 2003-12-31 Ulrich Drepper <drepper@redhat.com>
7646 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7647 returned for main thread does not overlap with any other VMA.
7648 Patch by Jakub Jelinek.
7650 2003-12-29 Jakub Jelinek <jakub@redhat.com>
7652 * tst-raise1.c: Include stdio.h.
7654 2003-12-23 Jakub Jelinek <jakub@redhat.com>
7656 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7657 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7658 If pid is 0, set it to selftid.
7659 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7660 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7661 != 0, return self->tid without doing a syscall.
7662 * descr.h (struct pthread): Move pid field after tid.
7664 * Makefile (tests): Add tst-raise1.
7665 * tst-raise1.c: New file.
7667 2003-12-23 Roland McGrath <roland@redhat.com>
7669 * tst-oddstacklimit.c: New file.
7670 * Makefile (tests): Add it.
7671 (tst-oddstacklimit-ENV): New variable.
7673 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7674 value up to page size for __default_stacksize.
7676 2003-12-21 Ulrich Drepper <drepper@redhat.com>
7678 * Makefile (tests): Add tst-eintr5.
7679 * tst-eintr5.c: New file.
7681 * eintr.c (eintr_source): Prevent sending signal to self.
7683 * tst-eintr2.c (tf1): Improve error message.
7685 2003-12-20 Ulrich Drepper <drepper@redhat.com>
7687 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7688 * sysdeps/unix/sysv/linux/getpid.c: New file.
7689 * pthread_cancel.c: Add comment explaining use of PID field.
7690 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7691 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7692 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7693 temporarily to signal the field must not be relied on and updated
7695 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7696 temporarily negative.
7697 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7699 2003-12-19 Ulrich Drepper <drepper@redhat.com>
7701 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7702 (eintr_source): If ARG != NULL, use pthread_kill.
7703 * tst-eintr1.c: Adjust for this change.
7704 * tst-eintr2.c: Likewise.
7705 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7706 * tst-eintr3.c: New file.
7707 * tst-eintr4.c: New file.
7709 2003-12-19 Jakub Jelinek <jakub@redhat.com>
7711 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7712 if CANCELSTATE_BITMASK is set.
7713 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7716 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7717 (tests-reverse): Add tst-cancel23.
7718 * tst-cancel22.c: New test.
7719 * tst-cancel23.c: New test.
7721 2003-12-18 Ulrich Drepper <drepper@redhat.com>
7723 * tst-eintr1.c: Better error messages.
7725 * Makefile (tests): Add tst-eintr2.
7726 * tst-eintr2.c: New file.
7728 2003-12-18 Jakub Jelinek <jakub@redhat.com>
7730 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7731 (CFLAGS-tst-cancelx21.c): Set.
7732 * tst-cancel21.c: New test.
7733 * tst-cancelx21.c: New test.
7735 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7737 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7738 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7739 * pt-longjmp.c: Include jmpbuf-unwind.h.
7740 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7741 _JMPBUF_UNWINDS. Adjust compared pointers.
7742 * init.c (__pthread_initialize_minimal_internal): Initialize
7743 pd->stackblock_size.
7744 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7745 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7746 * sysdeps/i386/jmpbuf-unwind.h: New file.
7747 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7748 * sysdeps/s390/jmpbuf-unwind.h: New file.
7749 * sysdeps/sh/jmpbuf-unwind.h: New file.
7750 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7751 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7752 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7753 (_JMPBUF_CFA_UNWINDS): Remove.
7754 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7756 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7758 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7759 (CFLAGS-tst-cancelx20.c): Set.
7760 * tst-cancel20.c: New test.
7761 * tst-cancelx20.c: New test.
7763 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7765 * init.c (__pthread_initialize_minimal_internal): Don't treat
7766 architectures with separate register stack special here when
7767 computing default stack size.
7769 2003-12-17 Roland McGrath <roland@redhat.com>
7771 * Makefile (tst-cancelx7-ARGS): New variable.
7772 Reportd by Greg Schafer <gschafer@zip.com.au>.
7774 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7776 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7777 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7778 (tst-stack3-ENV): Set.
7779 ($(objpfx)tst-stack3-mem): New.
7780 * tst-stack3.c: New test.
7782 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7784 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7785 Add unwind directives. Drop unused .regstk directive.
7786 (_fini_EPILOG_BEGINS): Add unwind directives.
7788 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7790 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7791 Assume parameter is a pointer.
7792 (lll_futex_wake): Likewise.
7793 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7795 (lll_futex_wake): Likewise.
7796 Reported by Boris Hu.
7797 * sysdeps/unix/sysv/linux/unregister-atfork.c
7798 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7800 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7802 2003-12-10 Ulrich Drepper <drepper@redhat.com>
7804 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7805 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7806 __rtld_lock_initialize for ld.so lock.
7807 Patch in part by Adam Li <adam.li@intel.com>.
7809 2003-12-02 David Mosberger <davidm@hpl.hp.com>
7811 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7812 in $(gnulib). Also, remove stale comment.
7814 2003-11-12 David Mosberger <davidm@hpl.hp.com>
7816 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7817 advantage of new syscall stub and optimize accordingly.
7819 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7820 from SYS_futex, to match expectations of
7821 sysdep.h:DO_INLINE_SYSCALL.
7822 (lll_futex_clobbers): Remove.
7823 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7824 (lll_futex_wake): Likewise.
7825 (lll_futex_requeue): Likewise.
7826 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7827 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7829 (__lll_mutex_lock): Likewise.
7830 (__lll_mutex_cond_lock): Likewise.
7831 (__lll_mutex_timed_lock): Likewise.
7832 (__lll_mutex_unlock): Likewise.
7833 (__lll_mutex_unlock_force): Likewise.
7835 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7836 comes before the include of <sysdep.h>.
7837 (THREAD_SELF_SYSINFO): New macro.
7838 (THREAD_SYSINFO): Likewise.
7839 (INIT_SYSINFO): New macro.
7840 (TLS_INIT_TP): Call INIT_SYSINFO.
7842 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7844 * sysdeps/pthread/createthread.c (create_thread): Use
7845 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7846 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7847 THREAD_SELF_SYSINFO instead of open code.
7848 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7849 (THREAD_SYSINFO): Likewise.
7851 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7853 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7855 2003-12-06 Ulrich Drepper <drepper@redhat.com>
7857 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7858 instead of .init. Patch by David Mosberger.
7860 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
7862 * sysdeps/pthread/configure.in: Remove broken declaration in C
7863 cleanup handling check.
7865 2003-11-30 Andreas Jaeger <aj@suse.de>
7867 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7868 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7871 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7873 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7874 * pthread_attr_destroy.c: Include shlib-compat.h.
7875 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7876 is set in iattr->flags.
7877 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7879 2003-11-21 Jakub Jelinek <jakub@redhat.com>
7881 * Makefile (distribute): Add tst-cleanup4aux.c.
7883 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7886 2003-11-21 Ulrich Drepper <drepper@redhat.com>
7888 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7889 pthread_cond_signal.
7891 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7892 store mutex address if the current value is ~0l.
7893 * sysdeps/pthread/pthread_cond_timedwait.c
7894 (__pthread_cond_timedwait): Likewise.
7895 * sysdeps/pthread/pthread_cond_broadcast.c
7896 (__pthread_cond_broadcast): Don't use requeue for pshared
7899 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7900 (__pthread_cond_wait): Don't store mutex address if the current
7902 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7903 (__pthread_cond_timedwait): Likewise.
7904 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7905 (__pthread_cond_broadcast): Don't use requeue for pshared
7908 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7909 element with ~0l for pshared condvars, with NULL otherwise.
7911 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7912 (__pthread_cond_wait): Don't store mutex address if the current
7914 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7915 (__pthread_cond_timedwait): Likewise.
7916 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7917 (__pthread_cond_broadcast): Don't use requeue for pshared
7920 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7921 * tst-cond12.c: New file.
7922 * tst-cond13.c: New file.
7924 2003-11-17 Ulrich Drepper <drepper@redhat.com>
7926 * sysdeps/pthread/configure.in: Make missing forced unwind support
7929 2003-11-11 Ulrich Drepper <drepper@redhat.com>
7931 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7933 2003-11-06 Ulrich Drepper <drepper@redhat.com>
7935 * Makefile: Add magic to clean up correctly.
7937 2003-11-05 Jakub Jelinek <jakub@redhat.com>
7939 * unwind.c (FRAME_LEFT): Define.
7940 (unwind_stop): Handle old style cleanups here.
7941 (__pthread_unwind): Handle old style cleanups only if
7942 !HAVE_FORCED_UNWIND.
7943 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7944 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7945 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7946 ($(objpfx)tst-cleanupx4): Likewise.
7947 * tst-cleanup4.c: New test.
7948 * tst-cleanup4aux.c: New.
7949 * tst-cleanupx4.c: New test.
7951 2003-11-04 Ulrich Drepper <drepper@redhat.com>
7953 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7954 lll_mutex_*lock macros to skip atomic operations on some archs.
7956 2003-11-03 Ulrich Drepper <drepper@redhat.com>
7958 * sysdeps/pthread/tst-timer.c (main): Initialize
7959 sigev2.sigev_value as well.
7961 2003-10-15 Roland McGrath <roland@redhat.com>
7963 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7965 * sysdeps/pthread/configure: Regenerated.
7967 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7969 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7970 locking macros. No distinction between normal and mutex locking
7972 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7973 Merge bits from lowlevelmutex.S we still need.
7974 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7975 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7976 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7977 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7978 new mutex implementation.
7979 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7980 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7981 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7982 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7983 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7984 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7985 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7986 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7987 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7988 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7989 symbol for entry point to avoid cancellation.
7991 2003-10-07 Jakub Jelinek <jakub@redhat.com>
7993 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7995 (SAVE_OLDTYPE_0): Fix a typo.
7997 2003-10-03 Ulrich Drepper <drepper@redhat.com>
7999 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8000 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
8002 2003-10-02 Ulrich Drepper <drepper@redhat.com>
8004 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
8007 2003-10-02 Jakub Jelinek <jakub@redhat.com>
8009 * Makefile (tests): Add tst-cancel19.
8010 * tst-cancel19.c: New test.
8012 2003-10-02 Ulrich Drepper <drepper@redhat.com>
8014 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
8015 restoring of the old cancellation type.
8017 2003-09-30 Jakub Jelinek <jakub@redhat.com>
8019 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
8021 2003-09-27 Wolfram Gloger <wg@malloc.de>
8023 * sysdeps/pthread/malloc-machine.h: New file
8025 2003-09-24 Roland McGrath <roland@redhat.com>
8027 * allocatestack.c (__make_stacks_executable): Don't ignore return
8028 value from _dl_make_stack_executable.
8030 2003-09-24 Ulrich Drepper <drepper@redhat.com>
8032 * allocatestack.c (__make_stacks_executable): Also change
8033 permission of the currently unused stacks.
8035 * allocatestack.c (change_stack_perm): Split out from
8036 __make_stacks_executable.
8037 (allocate_stack): If the required permission changed between the time
8038 we started preparing the stack and queueing it, change the permission.
8039 (__make_stacks_executable): Call change_stack_perm.
8041 * Makefile: Build tst-execstack-mod locally.
8042 * tst-execstack-mod.c: New file.
8044 2003-09-23 Jakub Jelinek <jakub@redhat.com>
8046 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
8048 2003-09-23 Roland McGrath <roland@redhat.com>
8050 * tst-execstack.c: New file.
8051 * Makefile (tests): Add it.
8052 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
8053 (LDFLAGS-tst-execstack): New variable.
8055 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
8056 whether to use PROT_EXEC for stack mmap.
8057 (__make_stacks_executable): New function.
8058 * pthreadP.h: Declare it.
8059 * init.c (__pthread_initialize_minimal_internal): Set
8060 GL(dl_make_stack_executable_hook) to that.
8062 2003-09-22 Ulrich Drepper <drepper@redhat.com>
8064 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
8065 recommendation from AMD re avoidance of lock prefix.
8067 2003-09-22 Jakub Jelinek <jakub@redhat.com>
8069 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
8070 lll_futex_timed_wait instead of lll_futex_wait.
8071 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
8072 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
8073 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
8074 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
8075 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
8076 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
8077 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
8078 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
8079 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
8080 Completely revamp the locking macros. No distinction between
8081 normal and mutex locking anymore.
8082 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
8083 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
8084 __lll_lock_timedwait): Fix prototypes.
8085 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
8086 __lll_lock_timedwait): Likewise.
8087 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
8088 macros, add __builtin_expect.
8089 (lll_mutex_timedlock): Likewise. Fix return value.
8090 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
8091 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
8092 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
8093 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
8094 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
8095 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
8096 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
8097 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
8099 2003-09-22 Ulrich Drepper <drepper@redhat.com>
8101 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8102 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
8103 operation if possible.
8105 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
8106 like jumping over the lock prefix.
8108 2003-09-21 Ulrich Drepper <drepper@redhat.com>
8110 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
8111 locking macros. No distinction between normal and mutex locking
8113 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8114 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8115 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8116 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
8117 locking. Merge bits from lowlevelmutex.S we still need.
8118 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8119 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
8120 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
8121 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
8122 * Makefile (routines): Remove libc-lowlevelmutex.
8123 (libpthread-rountines): Remove lowlevelmutex.
8124 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
8125 for new mutex implementation.
8126 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8127 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8128 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8129 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8130 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8132 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8134 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8135 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8136 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
8137 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8138 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8139 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8140 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8141 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8143 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8145 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
8146 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8147 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8149 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8150 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
8152 2003-09-20 Ulrich Drepper <drepper@redhat.com>
8154 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
8155 in parameters of asm with output parameters.
8157 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
8158 type of DECR parameter to int.
8159 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
8161 2003-09-18 Jakub Jelinek <jakub@redhat.com>
8163 * tst-attr3.c (tf, do_test): Print stack start/end/size and
8164 guardsize for each thread.
8166 2003-09-17 Jakub Jelinek <jakub@redhat.com>
8168 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
8169 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
8170 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
8172 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
8173 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
8175 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
8176 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
8177 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
8178 (pthread_getaffinity_np): Add hidden_def.
8180 * Makefile (tests): Add tst-attr3.
8181 * tst-attr3.c: New test.
8183 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
8185 2003-09-15 Jakub Jelinek <jakub@redhat.com>
8187 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
8188 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
8190 2003-09-17 Jakub Jelinek <jakub@redhat.com>
8192 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
8193 * tst-align.c: Include tst-stack-align.h.
8194 (tf, do_test): Use TEST_STACK_ALIGN macro.
8196 2003-09-17 Ulrich Drepper <drepper@redhat.com>
8198 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
8201 2003-09-16 Ulrich Drepper <drepper@redhat.com>
8203 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
8204 stack-related values for the initial thread.
8206 2003-09-15 Jakub Jelinek <jakub@redhat.com>
8208 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
8210 2003-09-11 Ulrich Drepper <drepper@redhat.com>
8212 * pthread_mutex_lock.c: Minor code rearrangements.
8214 2003-09-05 Roland McGrath <roland@redhat.com>
8216 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
8217 Instead, include ../nptl_db/db_info.c to do its magic.
8218 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
8219 (__pthread_pthread_key_2ndlevel_size): Likewise.
8220 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
8221 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
8222 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
8223 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
8224 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
8225 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
8226 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
8227 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
8228 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
8229 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
8230 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
8231 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
8232 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
8233 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
8234 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
8235 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
8236 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
8238 2003-09-08 Ulrich Drepper <drepper@redhat.com>
8240 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
8241 of pthread_t to be compatible with LT.
8242 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
8243 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8244 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8245 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8246 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
8247 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8248 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
8250 2003-09-04 Ulrich Drepper <drepper@redhat.com>
8252 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
8254 2003-09-04 Jakub Jelinek <jakub@redhat.com>
8256 * unwind-forcedunwind.c: Move to...
8257 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
8258 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
8259 * sysdeps/pthread/jmpbuf-unwind.h: New file.
8260 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
8261 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
8262 * unwind.c: Include jmpbuf-unwind.h.
8263 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
8265 2003-09-02 Jakub Jelinek <jakub@redhat.com>
8267 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
8268 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
8269 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
8270 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
8271 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8272 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
8273 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
8274 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
8275 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
8276 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
8277 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
8279 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
8280 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
8281 * Makefile (tests): Add tst-stack2.
8282 * tst-stack2.c: New test.
8283 * tst-stack1.c: Include limits.h and sys/param.h.
8284 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
8286 * pthread_condattr_setpshared.c: Include errno.h.
8287 (pthread_condattr_setpshared): Return EINVAL if pshared
8288 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
8290 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
8291 defined symbol for entry point to avoid cancellation.
8292 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8294 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
8296 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8298 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
8300 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
8302 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
8303 __close_nocancel, __read_nocancel, __write_nocancel,
8304 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
8305 libpthread.so or librt.so, define to corresponding function
8306 without _nocancel suffix.
8307 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
8308 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
8309 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
8311 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
8313 2003-09-02 Ulrich Drepper <drepper@redhat.com>
8315 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
8316 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8318 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
8319 in subsections has a symbol associated with it.
8321 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
8322 defined symbol for entry point to avoid cancellation.
8323 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
8325 2003-09-01 Jakub Jelinek <jakub@redhat.com>
8327 * Makefile (tests): Add tst-tls5.
8328 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
8329 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
8330 ($(objpfx)tst-tls5): New.
8331 ($(objpfx)tst-tls6.out): Likewise.
8332 (tests): Depend on $(objpfx)tst-tls6.out.
8333 * tst-tls3.c: Include stdint.h and pthreaddef.h.
8334 (do_test): Check pthread_self () return value alignment.
8335 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
8336 (tf): Check pthread_self () return value alignment.
8337 * tst-tls5.c: New test.
8339 * tst-tls5mod.c: New.
8340 * tst-tls5moda.c: New.
8341 * tst-tls5modb.c: New.
8342 * tst-tls5modc.c: New.
8343 * tst-tls5modd.c: New.
8344 * tst-tls5mode.c: New.
8345 * tst-tls5modf.c: New.
8346 * tst-tls6.sh: New test.
8348 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
8349 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
8350 * init.c (pthread_functions): Initialize them.
8351 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
8352 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
8353 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
8354 pthread_cond_timedwait@@GLIBC_2.3.2.
8356 2003-09-01 Jakub Jelinek <jakub@redhat.com>
8358 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
8359 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
8360 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
8361 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
8362 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
8363 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8365 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
8367 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
8368 _POSIX_THREAD_PRIORITY_SCHEDULING.
8369 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
8371 2003-08-31 Ulrich Drepper <drepper@redhat.com>
8373 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
8374 nested function, use static inline function from libio.h.
8375 Code by Richard Henderson.
8377 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
8380 2003-08-30 Jakub Jelinek <jakub@redhat.com>
8382 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
8383 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
8384 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
8385 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
8386 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
8387 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
8388 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
8389 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
8390 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
8391 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
8392 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
8393 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
8394 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
8395 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
8396 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
8397 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
8398 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
8399 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
8400 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
8401 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
8402 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
8403 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
8404 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
8405 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
8406 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
8407 * sysdeps/sparc/tls.h: New file.
8408 * sysdeps/sparc/tcb-offsets.sym: New file.
8409 * sysdeps/sparc/Makefile: New file.
8410 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
8411 * init.c [__sparc__] (__NR_set_tid_address): Define.
8413 2003-08-29 Jakub Jelinek <jakub@redhat.com>
8415 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
8416 _IO_release_lock): Define.
8418 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
8420 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
8421 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
8423 2003-08-27 Ulrich Drepper <drepper@redhat.com>
8425 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8426 (__pthread_cleanup_class): Add missing return types of member
8429 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
8431 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8432 (lll_mutex_unlock_force): Add memory barrier between store and futex
8435 2003-08-25 Ulrich Drepper <drepper@redhat.com>
8437 * tst-cancel4.c (do_test): Also unlink tempfname and remove
8438 tempmsg in first loop.
8440 2003-08-18 Ulrich Drepper <drepper@redhat.com>
8442 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8443 _POSIX_THREAD_PRIORITY_SCHEDULING.
8444 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8446 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8448 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8449 (__rtld_lock_default_lock_recursive,
8450 __rtld_lock_default_unlock_recursive): Define.
8451 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8452 __rtld_lock_unlock_recursive): Define using
8453 GL(_dl_rtld_*lock_recursive).
8454 * init.c (__pthread_initialize_minimal_internal): Initialize
8455 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8456 Lock GL(_dl_load_lock) the same number of times as
8457 GL(_dl_load_lock) using non-mt implementation was nested.
8459 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8460 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8462 2003-08-06 Jakub Jelinek <jakub@redhat.com>
8464 * tst-cancel17.c (do_test): Make len2 maximum of page size and
8467 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8469 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8471 2003-08-03 Jakub Jelinek <jakub@redhat.com>
8473 * sysdeps/pthread/createthread.c (do_clone): Move error handling
8474 to first syscall error check. Move syscall error check for tkill
8475 into __ASSUME_CLONE_STOPPED #ifdef.
8477 2003-08-02 Ulrich Drepper <drepper@redhat.com>
8479 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8480 is not defined, do explicit synchronization.
8481 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
8482 is not defined also unlock pd->lock for non-debugging case in case
8484 * pthread_create.c (start_thread): Always get and release pd->lock
8485 if __ASSUME_CLONE_STOPPED is not defined.
8486 (start_thread_debug): Removed. Adjust users.
8487 * allocatestack.c (allocate_stack): Always initialize lock if
8488 __ASSUME_CLONE_STOPPED is not defined.
8489 * Makefile (tests): Add tst-sched1.
8490 * tst-sched1.c: New file.
8492 * sysdeps/pthread/createthread.c (do_clone): Only use
8493 sched_setschduler and pass correct parameters.
8495 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8497 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8498 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8499 PTHREAD_STACK_MIN in comments.
8501 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8503 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8504 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8506 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8507 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8508 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8509 (__pthread_cleanup_upto): Fix prototype.
8510 (_longjmp_unwind): Adjust caller.
8511 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8512 Change second argument to const struct pointer.
8513 * tst-sem8.c (main): Remove unused s2 and s3 variables.
8514 * tst-sem9.c (main): Likewise.
8515 * unwind.c: Include string.h for strlen prototype.
8517 2003-07-31 Ulrich Drepper <drepper@redhat.com>
8519 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8520 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8521 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8523 Patch by Nicholas Miell <nmiell@attbi.com>.
8525 2003-07-30 Jakub Jelinek <jakub@redhat.com>
8527 * init.c (__pthread_initialize_minimal_internal): Initialize
8528 GL(dl_init_static_tls).
8529 * pthreadP.h (__pthread_init_static_tls): New prototype.
8530 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8532 * Makefile (tests): Add tst-tls4.
8533 (modules-names): Add tst-tls4moda and tst-tls4modb.
8534 ($(objpfx)tst-tls4): Link against libdl and libpthread.
8535 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8537 * tst-tls4.c: New file.
8538 * tst-tls4moda.c: New file.
8539 * tst-tls4modb.c: New file.
8541 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
8543 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8544 before __timer_dealloc.
8545 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8546 Don't call list_unlink.
8548 2003-07-29 Roland McGrath <roland@redhat.com>
8550 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8552 2003-07-25 Jakub Jelinek <jakub@redhat.com>
8554 * tst-cancel17.c (do_test): Check if aio_cancel failed.
8555 Don't reuse struct aiocb A if it failed.
8556 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8557 not just one byte, as that does not block.
8559 2003-07-22 Jakub Jelinek <jakub@redhat.com>
8561 * sysdeps/pthread/unwind-resume.c: New file.
8562 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8563 unwind-resume in csu subdir.
8564 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8566 (librt-sysdep_routines, librt-shared-only-routines): Add
8568 * sysdeps/pthread/rt-unwind-resume.c: New file.
8569 * unwind-forcedunwind.c: New file.
8570 * Makefile (libpthread-routines): Add unwind-forcedunwind.
8571 (libpthread-shared-only-routines): Likewise.
8572 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8573 * pthreadP.h (pthread_cancel_init): New prototype.
8574 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8576 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8577 attr argument const struct pthread_attr *.
8579 * res.c (__res_state): Return __resp.
8580 * descr.h: Include resolv.h.
8581 (struct pthread): Add res field.
8582 * pthread_create.c: Include resolv.h.
8583 (start_thread): Initialize __resp.
8584 * Makefile (tests): Add tst-_res1.
8585 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8586 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8587 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8589 * tst-_res1.c: New file.
8590 * tst-_res1mod1.c: New file.
8591 * tst-_res1mod2.c: New file.
8593 2003-07-21 Ulrich Drepper <drepper@redhat.com>
8595 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8597 * Makefile: Define various *-no-z-defs variables for test DSOs
8598 which has undefined symbols.
8600 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8602 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8603 Retry if the stwcx fails to store once_control.
8605 2003-07-20 Ulrich Drepper <drepper@redhat.com>
8607 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8608 pthread_attr_setaffinity.
8609 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8610 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8611 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8612 * pthread_attr_destroy.c: Free cpuset element if allocated.
8613 * pthread_create.c: Pass iattr as additional parameter to
8615 * sysdeps/pthread/createthread.c: If attribute is provided and
8616 a new thread is created with affinity set or scheduling parameters,
8617 start thread with CLONE_STOPPED.
8618 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8619 pthread_attr_setaffinity.
8620 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8623 2003-07-15 Ulrich Drepper <drepper@redhat.com>
8625 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8627 2003-07-14 Ulrich Drepper <drepper@redhat.com>
8629 * sysdeps/pthread/configure.in: Require CFI directives also for
8632 2003-07-15 Jakub Jelinek <jakub@redhat.com>
8634 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8637 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8639 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8641 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8642 registers as variables. Call __pthread_mutex_unlock_usercnt.
8643 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8644 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8645 not self pointer in __writer. Compare with TID to determine
8647 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8648 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8650 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8652 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8653 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8654 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8655 macros also when compiling librt.
8657 2003-07-11 Jakub Jelinek <jakub@redhat.com>
8659 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8660 -fasynchronous-unwind-tables.
8661 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8662 (PSEUDO): Add cfi directives.
8663 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8665 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8668 2003-07-08 Jakub Jelinek <jakub@redhat.com>
8670 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8671 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8672 * unwind.c (__pthread_unwind_next): Add hidden_def.
8673 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8675 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8676 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8677 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8679 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8680 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8682 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8683 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8684 __pthread_unregister_cancel and __pthread_unwind_next.
8686 2003-07-04 Jakub Jelinek <jakub@redhat.com>
8688 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8689 different symbol for the cancellation syscall wrapper and
8690 non-cancellation syscall wrapper.
8691 (PSEUDO_END): Define.
8693 2003-07-05 Richard Henderson <rth@redhat.com>
8695 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8696 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8697 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8698 return actual return value from the syscall, not 0.
8700 2003-07-07 Ulrich Drepper <drepper@redhat.com>
8702 * descr.h (struct pthread): Add pid field.
8703 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8704 (__reclaim_stacks): Likewise.
8705 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8706 also check for PID of the signal source.
8707 (__pthread_initialize_minimal_internal): Also initialize pid field
8708 of initial thread's descriptor.
8709 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8710 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8711 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8712 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8713 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8715 2003-07-05 Ulrich Drepper <drepper@redhat.com>
8717 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8718 Fix use of parameter.
8719 (__libc_cleanup_pop): Likewise.
8721 2003-07-04 Ulrich Drepper <drepper@redhat.com>
8723 * init.c (sigcancel_handler): Change parameters to match handler
8724 for SA_SIGACTION. Check signal number and code to recognize
8725 invalid invocations.
8727 2003-07-03 Roland McGrath <roland@redhat.com>
8729 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8730 Apply sizeof (struct pthread) bias to r13 value.
8732 2003-07-03 Ulrich Drepper <drepper@redhat.com>
8734 * sysdeps/pthread/configure.in: Require CFI directives.
8736 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8738 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8739 libpthread compilation.
8740 * unwind.c (__pthread_unwind): Add hidden_def.
8741 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8743 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8745 * libc-cancellation.c (__libc_cleanup_routine): Define.
8746 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8747 (__pthread_cleanup_pop): Define.
8749 2003-07-01 Richard Henderson <rth@redhat.com>
8751 * sysdeps/alpha/elf/pt-initfini.c: New file.
8752 * sysdeps/alpha/pthread_spin_lock.S: New file.
8753 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8754 * sysdeps/alpha/pthreaddef.h: New file.
8755 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8756 * sysdeps/alpha/tls.h: New file.
8757 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8758 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8759 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8760 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8761 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8762 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8763 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8764 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8765 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8766 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8768 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8770 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8771 cleanup support and unwind info.
8773 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8775 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8776 Use correct cleanup handler registration. Add unwind info.
8777 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8778 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8779 * tst-once3.c: Add cleanup handler and check it is called.
8780 * tst-once4.c: Likewise.
8781 * tst-oncex3.c: New file.
8782 * tst-oncex4.c: New file.
8783 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8785 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8787 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8789 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8791 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8792 (tf_msgsnd): Likewise.
8794 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8795 premature returns a bit more.
8797 2003-06-26 Ulrich Drepper <drepper@redhat.com>
8799 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8800 definition to the front.
8802 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8803 the cleanup functions to make the names unique. Fix dwarf opcode
8805 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8806 functions to make the names unique. Fix CFA offset for two blocks.
8808 2003-06-25 Ulrich Drepper <drepper@redhat.com>
8810 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8811 missing closing braces.
8812 Patch by Christophe Saout <christophe@saout.de>.
8814 2003-06-24 Roland McGrath <roland@redhat.com>
8816 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8818 2003-06-24 Ulrich Drepper <drepper@redhat.com>
8820 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8821 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8823 * pthreadP.h: Declare __find_thread_by_id.
8824 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8825 * pthread_clock_gettime.c: Allow using other thread's clock.
8826 * pthread_clock_settime.c: Likewise.
8827 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8828 * Makefile: Add rules to build and run tst-clock2.
8829 * tst-clock2.c: New file.
8831 2003-06-23 Ulrich Drepper <drepper@redhat.com>
8833 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8834 to use exception-based cleanup handler.
8835 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8837 * tst-cond8.c (ch): Announce that we are done.
8839 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8841 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8842 Also test aio_suspend with timeout value.
8844 2003-06-22 Ulrich Drepper <drepper@redhat.com>
8846 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8847 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8850 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8851 (__pthread_mutex_lock_internal): Likewise.
8852 (__pthread_mutex_unlock_internal): Likewise.
8853 (__pthread_mutex_unlock_usercnt): Declare.
8854 * pthread_mutex_destroy.c: Always fail if used in any way.
8855 * pthread_mutex_init.c: Update comment.
8856 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8857 * pthread_mutex_timedlock.c: Adjust __nusers.
8858 * pthread_mutex_trylock.c: Adjust __nusers.
8859 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8860 and public interfaces are wrapper with pass additional parameter.
8861 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8863 * tst-mutex8.c: New file.
8864 * Makefile (tests): Add tst-mutex8.
8865 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8866 __pthread_mutex_unlock_usercnt.
8867 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8868 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8869 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8870 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8871 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8872 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8873 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8875 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8876 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8877 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8878 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8879 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8881 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8882 * pthread_mutex_timedlock.c: Likewise.
8883 * pthread_mutex_trylock.c: Adjust __nusers.
8884 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8885 * tst-mutex9.c: New file.
8886 * Makefile (tests): Add tst-mutex9.
8887 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8888 * sysdeps/ia64/tls.h: Likewise.
8889 * sysdeps/powerpc/tls.h: Likewise.
8890 * sysdeps/s390/tls.h: Likewise.
8891 * sysdeps/sh/tls.h: Likewise.
8892 * sysdeps/x86_64/tls.h: Likewise.
8893 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8894 Change type of __owner.
8895 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8896 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8897 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8898 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8899 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8901 2003-06-19 Jakub Jelinek <jakub@redhat.com>
8903 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8904 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8906 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8907 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8908 instead of nr to lll_futex_wake. Only set errno and return -1
8911 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8912 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8913 return actual return value from the syscall, not 0.
8915 2003-06-18 Ulrich Drepper <drepper@redhat.com>
8917 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8918 find a random value.
8919 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8922 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8923 compat_timer_settime.
8924 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8925 compat_timer_gettime.
8926 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8927 compat_timer_getoverrun.
8928 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8929 compat_timer_delete.
8931 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8932 error-checking mutex detect busy mutexes.
8934 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8936 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8937 Add ax to clobber list.
8938 (lll_mutex_cond_lock): Likewise.
8939 (lll_mutex_unlock): Likewise.
8940 (lll_lock): Likewise.
8941 (lll_unlock): Likewise.
8943 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8944 * tst-cancel18.c: New file.
8945 * tst-cancelx18.c: New file.
8947 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8950 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8951 * tst-cancel17.c: New file.
8952 * tst-cancelx17.c: New file.
8954 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8955 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8956 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8958 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8960 2003-06-16 Jakub Jelinek <jakub@redhat.com>
8962 * sysdeps/pthread/createthread.c (create_thread): Set
8963 header.multiple_threads unconditionally.
8964 * allocatestack.c (allocate_stack): Likewise.
8965 * descr.h (struct pthread): Add header.multiple_threads
8967 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8968 Define for librt. #error if neither libpthread, libc nor librt.
8969 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8971 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8972 CDISABLE): Likewise.
8973 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8974 CDISABLE): Likewise.
8975 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8976 CDISABLE): Likewise.
8977 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8978 CDISABLE): Likewise. Access header.multiple_threads outside of
8979 libc and libpthread.
8980 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8982 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8983 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8985 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8987 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8988 Also test early cancellation before the thread reaches the cancellation
8991 * Makefile: Compile forward.c with exceptions.
8993 * sysdeps/unix/sysv/linux/sleep.c: New file.
8995 2003-06-16 Ulrich Drepper <drepper@redhat.com>
8997 * Makefile: Add CFLAGS definition to compile function wrappers
8998 duplicated from libc with exceptions.
8999 * tst-cancel4.c: Also check cancellation handlers.
9001 * Makefile: Add rules to build and run tst-cancel16 and
9002 tst-cancelx16. Add missing CFLAGS definitions.
9003 * tst-cancel16.c: New file.
9004 * tst-cancelx16.c: New file.
9006 2003-06-15 Ulrich Drepper <drepper@redhat.com>
9008 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9009 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
9010 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9011 (DL_SYSINFO_IMPLEMENTATION): Likewise.
9013 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
9014 (LIBC_CANCEL_RESET): Likewise.
9015 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
9016 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
9018 (CFLAGS-libcrt-cancellation.c): Define.
9019 * sysdeps/pthread/librt-cancellation.c: New file.
9020 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
9021 macros also when compiling librt.
9022 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
9023 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
9024 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
9025 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
9026 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
9027 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
9028 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9030 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
9031 compat_timer_create.
9033 2003-06-14 Ulrich Drepper <drepper@redhat.com>
9035 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
9037 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9039 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
9040 Add libc_hidden_def.
9042 2003-06-13 Roland McGrath <roland@redhat.com>
9044 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
9045 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
9047 2003-06-11 Ulrich Drepper <drepper@redhat.com>
9049 * allocatestack.c (queue_stack): Always inline.
9050 * ptreadhP.h (__do_cancel): Likewise.
9052 2003-06-10 Jakub Jelinek <jakub@redhat.com>
9054 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
9057 2003-06-10 Ulrich Drepper <drepper@redhat.com>
9059 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9060 (__pthread_cond_signal): Remove incorrect second addition for
9063 2003-06-09 Ulrich Drepper <drepper@redhat.com>
9065 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9066 (__pthread_cond_signal): Use correct futex pointer in
9067 __lll_mutex_lock_wait call.
9069 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9070 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
9072 2003-06-08 Ulrich Drepper <drepper@redhat.com>
9074 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
9076 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9079 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
9080 hand-written CFI generation code. Since ENTRY/END also initiated
9081 CFI frames this caused two CFI sets to be generated.
9083 2003-06-07 Ulrich Drepper <drepper@redhat.com>
9085 * cleanup_routine.c: New file.
9086 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
9087 * sysdeps/pthread/pthread.h: Add support for fully exception-based
9089 * Makefile (libpthread-routines): Add cleanup_routine.
9090 Add more CFLAGS variables to compile with exceptions. Add comments
9091 why which file needs unwind tables.
9092 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
9094 * tst-cancelx1.c: New file.
9095 * tst-cancelx2.c: New file.
9096 * tst-cancelx3.c: New file.
9097 * tst-cancelx4.c: New file.
9098 * tst-cancelx5.c: New file.
9099 * tst-cancelx6.c: New file.
9100 * tst-cancelx7.c: New file.
9101 * tst-cancelx8.c: New file.
9102 * tst-cancelx9.c: New file.
9103 * tst-cancelx10.c: New file.
9104 * tst-cancelx11.c: New file.
9105 * tst-cancelx12.c: New file.
9106 * tst-cancelx13.c: New file.
9107 * tst-cancelx14.c: New file.
9108 * tst-cancelx15.c: New file.
9109 * tst-cleanupx0.c: New file.
9110 * tst-cleanupx0.expect: New file.
9111 * tst-cleanupx1.c: New file.
9112 * tst-cleanupx2.c: New file.
9113 * tst-cleanupx3.c: New file.
9115 * tst-cleanup0.c: Make standard compliant.
9116 * tst-cleanup1.c: Likewise.
9118 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
9119 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9120 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9121 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9122 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9123 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9124 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
9126 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9127 * tst-cancel12.c: New file.
9128 * tst-cancel13.c: New file.
9129 * tst-cancel14.c: New file.
9130 * tst-cancel15.c: New file.
9131 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
9134 * tst-cancel1.c: Add some comments.
9136 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
9139 2003-06-06 Ulrich Drepper <drepper@redhat.com>
9141 * Makefile (CFLAGS-pthread_cancel.c): Define.
9143 2003-06-05 Ulrich Drepper <drepper@redhat.com>
9145 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
9146 Change type of __writer element to int.
9147 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9148 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9149 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9150 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9151 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9152 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
9153 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9154 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
9155 Compare with TID to determine deadlocks.
9156 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9157 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9158 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
9159 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9160 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9161 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9163 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9165 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9166 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9167 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
9169 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
9171 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9172 * Makefile (tests): Add tst-rwlock12.
9173 * tst-rwlock12.c: New file.
9175 2003-06-05 Jakub Jelinek <jakub@redhat.com>
9177 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
9178 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
9179 Remove bogus hidden_proto.
9180 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9182 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
9183 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
9184 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
9185 ___lll_mutex_timedlock): Likewise.
9187 2003-06-04 Ulrich Drepper <drepper@redhat.com>
9189 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9190 (__pthread_cond_signal): Add some code to eventually handle
9193 2003-06-01 Ulrich Drepper <drepper@redhat.com>
9195 * Makefile (tests): Add tst-exec4.
9196 (tst-exec4-ARGS): Define.
9197 * tst-exec4.c: New file.
9199 2003-05-31 Ulrich Drepper <drepper@redhat.com>
9201 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9202 Also fail if tv_nsec < 0.
9203 (__lll_timedwait_tid): Likewise.
9204 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
9205 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
9207 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
9209 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
9211 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9213 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
9215 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
9218 * Makefile (tests): Add tst-sem8 and tst-sem9.
9219 * tst-sem8.c: New file.
9220 * tst-sem9.c: New file.
9221 * sem_open.c: Fix creation of in_use record if the file exists but
9224 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
9227 * sysdeps/pthread/timer_create.c (timer_create): In case
9228 evp==NULL, assign timer ID to sival_ptr.
9230 * descr.h (struct pthread_unwind_buf): Change type of prev element to
9231 struct pthread_unwind_buf *.
9232 (struct pthread): Likewise for cleanup_jmp_buf element.
9234 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
9235 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
9236 * unwind.c (__pthread_unwind_next): Likewise.
9238 2003-05-30 Ulrich Drepper <drepper@redhat.com>
9240 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9241 (lll_futex_timed_wait): Use int for futex value parameter.
9242 (lll_futex_wake): Likewise.
9243 (lll_futex_requeue): Likewise.
9245 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9246 Replace one memory operation with one register operation.
9248 * tst-join4.c (do_test): Fix error message.
9250 * tst-rwlock6.c (do_test): Use correct format specifier.
9252 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9253 (__lll_mutex_lock_wait): Replace one memory operation with one
9255 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
9256 (__lll_mutex_lock_wait): Likewise.
9258 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9259 (__lll_mutex_cond_lock): Add one to value parameter of
9260 __lll_lock_wait to reflect reality in the futex syscall.
9261 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9262 (lll_mutex_cond_lock): Likewise.
9264 2003-05-30 Jakub Jelinek <jakub@redhat.com>
9266 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
9268 (lll_mutex_cond_lock): Define.
9270 2003-05-29 Ulrich Drepper <drepper@redhat.com>
9272 * Makefile (tests): Add tst-signal6.
9273 * tst-signal6.c: New file.
9275 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
9276 (__lll_mutex_unlock_force): New function
9277 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9279 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9280 (__lll_mutex_unlock_force): New function.
9281 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9283 * tst-rwlock7.c (do_test): Use correct format specifier.
9285 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
9286 Find break parameter in correct asm argument.
9288 2003-05-27 Jakub Jelinek <jakub@redhat.com>
9290 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
9292 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
9294 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9296 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
9297 lll_futex_requeue, lll_mutex_unlock_force): Define.
9299 2003-05-30 Jakub Jelinek <jakub@redhat.com>
9301 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9302 (pthread_cond_t): Add __mutex.
9303 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
9304 lll_futex_requeue, lll_mutex_unlock_force): Define.
9306 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9308 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
9309 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
9311 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
9313 (lll_futex_wait, lll_futex_wake): Define.
9314 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
9315 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
9316 FUTEX_REQUEUE instead of FUTEX_WAIT.
9317 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
9318 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
9319 mutex which was used in condvar structure. Call
9320 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
9321 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
9323 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
9324 include tcb-offsets.h. Read wakeup value in locked region.
9325 Use the value of gbr register as THREAD_ID.
9326 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9327 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9328 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9330 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
9333 2003-05-28 Ulrich Drepper <drepper@redhat.com>
9335 * sysdeps/pthread/pthread_cond_broadcast.c
9336 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
9338 2003-05-26 Ulrich Drepper <drepper@redhat.com>
9340 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
9341 typo in register name.
9342 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
9343 correctly. Actually use requeue. Little optimization.
9344 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
9345 mutex address early. Handle cancellation state as 32-bit value.
9346 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9347 Remove unnecessary label.
9349 2003-05-25 Ulrich Drepper <drepper@redhat.com>
9351 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
9352 instead of FUTEX_WAIT.
9353 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
9354 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9355 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9356 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
9357 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9358 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
9359 used in condvar structure. Call __pthread_mutex_cond_lock instead
9360 of __pthread_mutex_lock_internal.
9361 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9362 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9363 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9364 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
9365 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9366 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9367 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
9368 Add pthread_mutex_cond_lock.
9369 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
9370 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
9371 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
9372 lll_mutex_cond_lock.
9373 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
9374 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9375 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9377 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9378 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9380 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
9381 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9383 * pthreadP.h: Declare __pthread_mutex_cond_lock.
9384 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
9385 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
9386 macro don't define aliases.
9388 * cancellation.c: Remove __pthread_enable_asynccancel_2.
9389 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
9390 * sysdeps/pthread/pthread_cond_timedwait.c: Use
9391 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
9392 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9393 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9394 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9395 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9396 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9398 2003-05-17 Ulrich Drepper <drepper@redhat.com>
9400 * sem_open.c: Fix one endless loop. Implement correct semantics
9401 wrt opening the same semaphore more then once.
9402 * sem_close.c: Adjust for sem_open change.
9403 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
9404 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
9405 * Makefile (tests): Add tst-sem7.
9406 * tst-sem7.c: New file.
9408 2003-05-16 Roland McGrath <roland@redhat.com>
9410 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
9411 uninitialized variable braino.
9413 2003-05-16 Ulrich Drepper <drepper@redhat.com>
9415 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
9416 test for syscall availability.
9418 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
9419 __no_posix_timers to -1 if the syscalls don't exist.
9421 * pthread_join.c (pthread_join): Set tid field of the joined
9422 thread to -1. This isn't necessary but helps to recognize some
9423 error conditions with almost no cost.
9425 * allocatestack.c (FREE_P): Also negative values indicate an
9428 * unwind.c: Include <unistd.h>.
9430 2003-05-14 Ulrich Drepper <drepper@redhat.com>
9432 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9434 2003-05-14 Jakub Jelinek <jakub@redhat.com>
9436 * Makefile (crti-objs, crtn-objs): New variables.
9437 (omit-deps, extra-objs): Add crtn.
9438 ($(objpfx)libpthread.so): Depend on both crti and crtn
9439 and links to them in multidir.
9440 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9442 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
9444 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9445 (lll_mutex_unlock): Use atomic_exchange_rel.
9447 2003-05-11 Ulrich Drepper <drepper@redhat.com>
9449 * cond-perf.c (cons): Add missing locking around setting of alldone.
9451 2003-05-10 Ulrich Drepper <drepper@redhat.com>
9453 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9455 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9457 2003-05-09 Ulrich Drepper <drepper@redhat.com>
9459 * tst-sem6.c: New file.
9460 * Makefile (tests): Add tst-sem6.
9462 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9463 Use atomic_exchange_rel instead of atomic_exchange.
9464 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9467 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9468 code for lll_futex_wait and lll_futex_wake in static apps. Use
9469 vsyscall is possible.
9471 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9472 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9473 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9474 pthread_setaffinity_np.
9475 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9476 and pthread_setaffinity_np.
9477 * Makefile (libpthread-routines): Add pthread_getaffinity and
9478 pthread_setaffinity.
9480 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9481 use it in case mmap to allocate the stack fails.
9482 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9483 ARCH_MAP_FLAGS here.
9484 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9487 2003-05-08 Ulrich Drepper <drepper@redhat.com>
9489 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9490 handler implementation. It is now lockless in fork().
9491 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9492 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9493 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
9494 declare the __fork_*_lists.
9495 (struct fork_handler): Include pointers to all three functions.
9496 Add next, refcntr and need_signal elements.
9497 (__fork_handlers): New declaration.
9498 (__register_atfork_malloc): Remove declaration.
9499 (HAVE_register_atfork_malloc): Remove definition.
9500 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9501 __pthread_child_handler variable.
9502 (__libc_pthread_init): Use __register_atfork instead of explicitly
9504 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9506 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9508 * unwind.c (unwind_cleanup): Print error message and then abort. This
9509 function must never be reached.
9511 * cond-perf.c: New file.
9513 2003-05-05 Ulrich Drepper <drepper@redhat.com>
9515 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9517 2003-05-04 Roland McGrath <roland@redhat.com>
9519 * Makefile ($(objpfx)../libc.so): New target.
9521 2003-05-02 Ulrich Drepper <drepper@redhat.com>
9523 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9524 (pthread_condattr_t): Size is only an int, don't use long for
9526 (pthread_mutexattr_t): Likewise.
9527 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9528 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9529 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9531 2003-05-01 Ulrich Drepper <drepper@redhat.com>
9533 * sysdeps/i386/tls.h: Define THREAD_ID.
9534 * sysdeps/ia64/tls.h: Likewise.
9535 * sysdeps/powerpc/tls.h: Likewise.
9536 * sysdeps/s390/tls.h: Likewise.
9537 * sysdeps/sh/tls.h: Likewise.
9538 * sysdeps/x86_64/tls.h: Likewise.
9539 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9541 * pthread_mutex_timedlock.c: Likewise.
9542 * pthread_mutex_trylock.c: Likewise.
9543 * pthread_mutex_unlock.c: Likewise.
9544 * pthread_rwlock_trywrlock.c: Likewise.
9545 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9546 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9547 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9548 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9550 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9553 2003-04-29 Jakub Jelinek <jakub@redhat.com>
9555 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9556 (__SIZEOF_PTHREAD_COND_T): Define to 48.
9557 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9558 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9559 Make __align long long instead of long.
9560 (pthread_rwlock_t): Formatting.
9561 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9562 (pthread_rwlock_t): Formatting.
9563 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9564 (pthread_cond_t): Make __align long long instead of long.
9565 (pthread_rwlock_t): Move __flags field to the same position as in
9568 2003-04-30 Ulrich Drepper <drepper@redhat.com>
9570 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9571 * tst-rwlock7.c (do_test): Likewise.
9573 2003-04-26 Roland McGrath <roland@redhat.com>
9575 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9577 2003-04-22 Jakub Jelinek <jakub@redhat.com>
9579 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9580 sizeof (struct pthread).
9581 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9583 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9585 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9587 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9589 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9591 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9593 (NO_TLS_OFFSET): Define.
9594 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9595 add TLS_TCB_SIZE unnecessarily.
9597 2003-04-22 Roland McGrath <roland@redhat.com>
9599 * Makeconfig (shared-thread-library): Reverse link order to work
9602 2003-04-22 Ulrich Drepper <drepper@redhat.com>
9604 * semaphore.h: Fix typo in comment.
9606 2003-04-21 Ulrich Drepper <drepper@redhat.com>
9608 * sysdeps/pthread/sigfillset.c: New file.
9610 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9611 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9612 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9613 * sysdeps/pthread/sigaction.c: Likewise.
9614 * sysdeps/pthread/sigprocmask.c: New file.
9615 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9617 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9618 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9621 2003-04-19 Ulrich Drepper <drepper@redhat.com>
9623 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9624 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9626 * sysdeps/unix/sysv/linux/unregister-atfork.c
9627 (__unregister_atfork): Don't free memory not allocated dynamically.
9629 * semaphore.h: Remove __THROW marker from cancellation points.
9630 * nptl/sysdeps/pthread/pthread.h: Likewise.
9632 2003-04-18 Ulrich Drepper <drepper@redhat.com>
9634 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9635 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9638 2003-04-16 Jakub Jelinek <jakub@redhat.com>
9640 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9642 2003-04-15 Roland McGrath <roland@redhat.com>
9644 * forward.c (__pthread_unwind): Tweak to avoid warning.
9646 2003-04-15 Ulrich Drepper <drepper@redhat.com>
9648 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9650 2003-04-14 Ulrich Drepper <drepper@redhat.com>
9652 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9653 overflow CFA advance instructions.
9654 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9656 2003-04-14 Jakub Jelinek <jakub@redhat.com>
9658 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9659 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9660 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9663 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9664 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9665 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9666 DW_CFA_advance_loc for .Laddl-.Lsubl.
9668 2003-04-13 Ulrich Drepper <drepper@redhat.com>
9670 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9671 position-independent unwind data for static libraries.
9672 Add missing unwind info. Add comments.
9674 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9675 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9676 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9677 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9679 2003-04-12 Ulrich Drepper <drepper@redhat.com>
9681 * Makefile: Make sure all cancellation points are compiled with
9682 exception and asynchronous unwind tables.
9684 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9685 which mishandles loading of global object addresses in PIC.
9686 (THREAD_SETMEM_NC): Likewise.
9688 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9690 * pthread.h: Define new data structure for cleanup buffer. Declare
9691 new cleanup handler interfaces.
9692 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9693 (struct pthread): Add cleanup_jmp_buf pointer. Define
9694 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9695 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9696 it. Declare old cleanup handler installation functions.
9697 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9699 * cleanup_defer.c: Likewise.
9700 * cleanup_compat.c: New file. Old cleanup code.
9701 * cleanup_def_compat.c: New file. Old cleanup code.
9702 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9703 if own thread descriptor.
9704 * unwind.c: New file.
9705 * forward.c: Add __pthread_unwind.
9706 * init.c (pthread_functions): Add __pthread_unwind.
9707 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9708 Add ptr___pthread_unwind.
9709 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9710 and unwind function.
9711 * Makefile (libpthread-routines): Add cleanup_compat,
9712 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9713 table generation if necessary.
9714 * version.c: Record whether unwind support is compiled in.
9715 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9716 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9718 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9719 complication to generate unwind information for syscall wrappers.
9720 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9721 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9722 __cleanup_fct_attribute.
9724 * Makefile: Add rules to build and run tst-cleanup0.
9725 * tst-cleanup0.c: New file.
9726 * tst-cleanup0.expect: New file.
9728 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9729 caller. Optimize to avoid often unecessary local variable.
9731 2003-04-11 Roland McGrath <roland@redhat.com>
9733 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9734 sets variable `multidir'; include that.
9735 (generated): Add it.
9736 ($(objpfx)$(multidir)/crti.o): New target.
9737 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9739 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9741 * tst-attr2.c (do_test): Add cast to avoid warning.
9742 * tst-mutex4.c (do_test): Likewise.
9744 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9746 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9749 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9751 * Makefile (tests): Add tst-detach1.
9752 * tst-detach1.c: New file.
9754 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9756 * sysdeps/pthread/pthread.h: Remove duplicate
9757 pthread_cleanup_{push,pop} definitions.
9759 * tst-barrier2.c: Eliminate warnings.
9760 * tst-cancel4.c: Likewise.
9761 * tst-cond4.c: Likewise.
9762 * tst-cond6.c: Likewise.
9763 * tst-detach1.c: Likewise.
9764 * tst-rwlock4.c: Likewise.
9765 * tst-rwlock6.c: Likewise.
9766 * tst-rwlock7.c: Likewise.
9767 * tst-sem3.c: Likewise.
9768 * tst-spin2.c: Likewise.
9769 * tst-umask1.c: Likewise.
9771 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9773 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9775 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9777 * descr.h (struct pthread): Move cancelhandling member to the front.
9779 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9781 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9782 malloc_parent, and malloc_child statically.
9783 (__register_atfork_malloc): New function.
9784 (free_mem): Don't free any of the malloc_* variables on the list.
9785 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9786 Define HAVE_register_atfork_malloc.
9788 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9790 * sysdeps/pthread/createthread.c (create_thread): Add some more
9791 comments explaining when to set multiple_threads and when not.
9793 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9794 THREAD_ATOMIC_BIT_SET if not already defined.
9795 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9796 THREAD_ATOMIC_BIT_SET:
9797 * sysdeps/x86_64/tls.h: Likewise.
9798 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9799 THREAD_ATOMIC_CMPXCHG_VAL.
9800 (_pthread_cleanup_pop_restore): Likewise.
9801 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9802 (__pthread_enable_asynccancel_2): Likewise.
9803 (__pthread_disable_asynccancel): Likewise.
9804 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9805 (__libc_disable_asynccancel): Likewise.
9806 * init.c (sigcancel_handler): Likewise.
9807 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9808 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9810 2003-04-03 Ulrich Drepper <drepper@redhat.com>
9812 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9813 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9814 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9815 * Makefile (tests): Add tst-cancel11.
9816 * tst-cancel11.c: New file.
9818 2003-04-01 Ulrich Drepper <drepper@redhat.com>
9820 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9821 round, not the first. Use specific_used flag instead of local
9822 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9823 (__free_tcb): Don't call deallocate_tsd here.
9824 (start_thread): Call deallocate_tsd here.
9825 * pthread_setspecific.c: Set specific_used flag really only when
9827 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9828 * tst-tsd3.c: New file.
9829 * tst-tsd4.c: New file.
9831 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9833 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9834 Use atomic_exchange_and_add instead of __lll_add.
9835 (__lll_mutex_timedlock): Likewise.
9836 Patch by Ian Wienand.
9838 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9840 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9841 (SINGLE_THREAD_P): Fix typo.
9842 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9844 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9846 * Makefile (tests): Add tst-align.
9847 * tst-align.c: New file.
9848 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9850 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9853 * tst-tsd2.c: Add casts to avoid warnings.
9855 2003-03-30 Ulrich Drepper <drepper@redhat.com>
9857 * descr.h (struct pthread): Move most often used elements to the front.
9859 2003-03-29 Ulrich Drepper <drepper@redhat.com>
9861 * Makefile (libpthread-routines): Add pthread_atfork.
9862 (libpthread-static-only-routines): Add pthread_atfork.
9864 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9866 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9868 (INSTALL_DTV): Add parens.
9869 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9870 Use passed descr instead of THREAD_SELF.
9871 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9872 (__lll_mutex_timedlock_wait): Correct expected value after
9874 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9875 Release lock before waking up the waiters.
9876 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9877 criteria. Reorderstruct passed to cleanup handler. Fix
9878 handling of cancellation and failung pthread_mutex_unlock call.
9879 Use __pthread_enable_asynccancel_2 instead of
9880 __pthread_enable_asynccancel.
9881 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9882 Return result of lock re-get if it fails.
9883 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9884 for __pthread_cleanup_push.
9885 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9886 completely broken rwlock implementation.
9887 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9888 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9889 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9890 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9891 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9892 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9893 versioned_symbol macro.
9894 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9895 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9897 2003-03-27 Ulrich Drepper <drepper@redhat.com>
9899 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9900 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9902 (struct timer): Remove th and bar field.
9903 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9904 debugging code. Create only one helper thread.
9905 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9907 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9908 Renamed. Define statically. Use thread info from siginfo.
9909 (__helper_once): New variable.
9910 (__helper_tid): New variable.
9911 (__reset_helper_control): New function.
9912 (__start_helper_thread): New function.
9914 * pthread_create.c (start_thread): Don't use setjmp inside
9915 __builtin_expect to work around gcc bug.
9917 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9918 timer_delete syscall fails, but not with ENOSYS, set
9921 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9922 (timer_settime): Fix typo.
9923 * sysdeps/unix/sysv/linux/timer_getoverr.c
9924 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9926 2003-03-27 Jakub Jelinek <jakub@redhat.com>
9928 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9929 offset of cleanupbuf.__prev.
9931 2003-03-26 Jakub Jelinek <jakub@redhat.com>
9933 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9936 2003-03-26 Ulrich Drepper <drepper@redhat.com>
9938 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9939 NULL provide default definition to syscall.
9941 2003-03-25 Roland McGrath <roland@redhat.com>
9943 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9944 (timer_id2ptr): Fix typo.
9946 2003-03-25 Ulrich Drepper <drepper@redhat.com>
9948 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9949 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9950 * sysdeps/ia64/pthreaddef.h: Likewise.
9951 * sysdeps/powerpc/pthreaddef.h: Likewise.
9952 * sysdeps/s390/pthreaddef.h: Likewise.
9953 * sysdeps/sh/pthreaddef.h: Likewise.
9954 * sysdeps/x86_64/pthreaddef.h: Likewise.
9955 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9956 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9958 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9959 SIGTIMER is not unblocked.
9960 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9962 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9964 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9965 pass pointer through as ID.
9966 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9967 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9968 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9969 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9970 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9971 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9972 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9973 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9974 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9975 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9976 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9977 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9978 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9979 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9980 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9981 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9982 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9983 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9984 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9985 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9986 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9987 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9988 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9989 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9990 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9991 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9992 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9993 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9994 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9995 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9996 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9997 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9998 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
10000 * pthreadP.h: Remove FRAME_LEFT definition.
10001 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
10002 already left frame. Programs which have this problem are not POSIX
10004 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
10006 2003-03-24 Ulrich Drepper <drepper@redhat.com>
10008 * sysdeps/pthread/tst-timer.c: Check return values of the
10011 2003-03-23 Roland McGrath <roland@redhat.com>
10013 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
10014 * tst-tls3mod.c: Likewise.
10015 * tst-tls1.c: Likewise.
10016 * tst-tls2.c: Likewise.
10018 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
10019 undefined behavior.
10021 * tst-join5.c (tf1, tf2): Add a cast.
10023 * Makeconfig (includes): Append -I$(..)nptl to this variable.
10025 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
10026 Don't test anything.
10027 * tst-cond4.c: Likewise.
10028 * tst-cond6.c: Likewise.
10029 * tst-flock2.c: Likewise.
10030 * tst-mutex4.c: Likewise.
10031 * tst-rwlock4.c: Likewise.
10032 * tst-signal1.c: Likewise.
10033 * tst-spin2.c: Likewise.
10034 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
10036 * tst-mutex4.c: Use test-skeleton.c.
10037 * tst-spin2.c: Likewise.
10038 * tst-sysconf.c: Likewise.
10039 * tst-barrier2.c: Likewise.
10040 * tst-cond4.c: Likewise.
10041 * tst-cond6.c: Likewise.
10042 * tst-rwlock4.c: Likewise.
10043 * tst-unload.c: Likewise.
10044 * tst-flock2.c (do_test): Use return instead of exit.
10046 2003-03-22 Jakub Jelinek <jakub@redhat.com>
10048 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
10050 2003-03-21 Ulrich Drepper <drepper@redhat.com>
10052 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
10053 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
10054 instead of __lll_compare_and_swap.
10055 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
10057 Removed definition if __lll_compare_and_swap.
10059 * cancellation.c: Adjust for new form of compare&exchange macros.
10060 * cleanup_defer.c: Likewise.
10061 * init.c: Likewise.
10062 * libc-cancellation.c: Likewise.
10063 * old_pthread_cond_broadcast.c: Likewise.
10064 * old_pthread_cond_signal.c: Likewise.
10065 * old_pthread_cond_timedwait.c: Likewise.
10066 * old_pthread_cond_wait.c: Likewise.
10067 * pthread_cancel.c: Likewise.
10068 * pthread_create.c: Likewise.
10069 * pthread_detach.c: Likewise.
10070 * pthread_join.c: Likewise.
10071 * pthread_key_delete.c: Likewise.
10072 * pthread_setcancelstate.c: Likewise.
10073 * pthread_setcanceltype.c: Likewise.
10074 * pthread_timedjoin.c: Likewise.
10075 * pthread_tryjoin.c: Likewise.
10076 * sysdeps/pthread/createthread.c: Likewise.
10078 2003-03-20 Ulrich Drepper <drepper@redhat.com>
10080 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
10081 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
10082 definitions. Replace uses with calls to atomic_* functions.
10083 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
10084 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
10085 __lll_test_and_set calls with atomic_exchange_and_add and
10086 atomic_exchange calls respectively.
10087 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
10088 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
10089 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
10090 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
10091 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
10092 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
10093 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
10095 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
10096 returns the old value.
10098 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
10100 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
10101 int for variable OLDVAL and correct inline assembler contraint.
10102 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
10103 type int for variable OLD.
10105 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
10107 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10108 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
10109 instead of multiple_threads field in the TCB.
10111 2003-03-19 Ulrich Drepper <drepper@redhat.com>
10113 * sysdeps/i386/i686/bits/atomic.h: Removed.
10114 * sysdeps/i386/i586/bits/atomic.h: Removed.
10115 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
10116 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
10117 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
10118 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
10119 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
10120 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
10121 * atomic.h: Removed. Moved to glibc.
10123 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
10124 support for clock selection.
10126 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
10127 signalling waiters.
10129 2003-03-18 Roland McGrath <roland@redhat.com>
10131 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10132 Add __lll_rel_instr first. Add memory clobber.
10133 (lll_mutex_unlock): Use __lll_test_and_set.
10134 From Paul Mackerras <paulus@samba.org>.
10136 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
10138 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10139 (SINGLE_THREAD_P): Add `header.' prefix.
10140 From Paul Mackerras <paulus@samba.org>.
10142 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
10143 pthread_timedjoin_np to ...
10144 (libpthread: GLIBC_2.3.3): ... here.
10145 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
10147 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10148 Avoid shadowing VAL variable.
10150 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10153 2003-03-18 Ulrich Drepper <drepper@redhat.com>
10155 * Makefile (tests): Add tst-cond11.
10156 * tst-cond11.c: New file.
10158 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
10159 struct passed to cleanup handler to eliminate one more
10161 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10163 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10164 (pthrad_cond_t): Replace __unused field with __clock.
10166 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
10167 waken all waiters in cleanup handler.
10168 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10169 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10171 * pthread_condattr_getclock.c: New file.
10172 * pthread_condattr_setclock.c: New file.
10173 * sysdeps/pthread/pthread.h: Declare these new functions.
10174 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
10175 * Makefile (libpthread-routines): Add the new functions.
10176 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
10177 Renamed field to value. Document use of the bits.
10178 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
10180 * pthread_condattr_setpshared.c: Likewise.
10181 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
10182 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
10183 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10185 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
10186 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
10187 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
10188 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
10189 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
10190 Implement clock selection.
10191 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10192 * pthread-errnos.sym: Add ENOSYS.
10193 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10194 _POSIX_CLOCK_SELECTION.
10195 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10197 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
10198 invalid .size directive.
10200 2003-03-17 Roland McGrath <roland@redhat.com>
10202 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
10205 2003-03-17 Ulrich Drepper <drepper@redhat.com>
10207 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
10208 Use __lll_add instead of spelling it out. Use protected symbol names.
10209 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
10211 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
10212 Renamed from lll_compare_and_swap. Use new name where necessary.
10213 (__lll_add): Defined.
10214 (__lll_dec_if_positive): Defined.
10215 (__lll_test_and_set): Defined.
10216 * sysdeps/ia64/pthread_spin_init.c: Removed.
10217 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
10218 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
10219 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
10220 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
10221 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
10222 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
10223 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
10224 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
10225 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
10226 __sync_lock_release_si.
10227 Patch by Jakub Jelinek.
10229 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
10230 Fix timeout handling.
10231 (__lll_timedwait_tid): Likewise.
10232 (lll_unlock_wake_cb): Wake up other waiters if necessary.
10233 Patch by Jakub Jelinek.
10235 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
10237 2003-03-17 Roland McGrath <roland@redhat.com>
10239 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
10240 * sysdeps/pthread/pthread_spin_init.c: New file.
10241 * sysdeps/pthread/pthread_spin_unlock.c: New file.
10242 * sysdeps/powerpc/Makefile: New file.
10243 * sysdeps/powerpc/pthread_spin_lock.c: New file.
10244 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
10245 * sysdeps/powerpc/pthreaddef.h: New file.
10246 * sysdeps/powerpc/tcb-offsets.sym: New file.
10247 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
10248 * sysdeps/powerpc/tls.h: New file.
10249 * sysdeps/powerpc/bits/atomic.h: New file.
10250 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
10251 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
10252 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
10254 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
10255 * sysdeps/unix/sysv/linux/sem_post.c: New file.
10256 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
10257 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
10258 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
10259 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
10260 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
10261 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
10262 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
10263 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
10264 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
10265 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
10266 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
10267 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
10268 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
10270 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
10272 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
10273 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10274 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
10275 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
10276 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10278 2003-03-17 Ulrich Drepper <drepper@redhat.com>
10280 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
10281 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10282 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10283 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10284 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
10286 2003-03-16 Roland McGrath <roland@redhat.com>
10288 * tst-fork4.c: Include <string.h>.
10289 * tst-signal2.c: Likewise.
10290 * tst-mutex5.c (do_test): exit -> return.
10291 * tst-mutex2.c: Include <stdlib.h>.
10293 2003-03-16 Ulrich Drepper <drepper@redhat.com>
10295 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10296 (__lll_mutex_timedlock_wait): Correct expected value after
10297 spurious wakeup. Otherwise we would never wait again.
10299 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
10300 zone versus inline asm stupidity. Use correct instructions.
10302 * tst-rwlock6.c: Add some more status output.
10304 2003-03-15 Roland McGrath <roland@redhat.com>
10306 * sysdeps/pthread/configure.in: New file.
10307 * sysdeps/pthread/configure: New file (generated).
10309 2003-03-15 Ulrich Drepper <drepper@redhat.com>
10311 * allocatestack.c (allocate_stack): Store the exact stack size of
10312 user allocated stacks.
10314 2003-03-15 Jakub Jelinek <jakub@redhat.com>
10316 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
10317 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
10318 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10319 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
10320 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
10321 Use `header.' prefix.
10322 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10324 2003-03-15 Ulrich Drepper <drepper@redhat.com>
10326 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
10327 __builtin_frame_address, use stack pointer.
10329 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
10330 instead of __builtin_frame_pointer.
10332 2003-03-14 Ulrich Drepper <drepper@redhat.com>
10334 * tst-basic1.c (do_test): Add cast to avoid warning.
10335 * tst-basic2.c (do_test): Likewise.
10337 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
10338 amount of stack correction.
10340 * tst-fork4.c: Use test-skeleton.c.
10342 2003-03-14 Roland McGrath <roland@redhat.com>
10344 * init.c: Fix typo "#eli" for "#else".
10346 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
10348 * allocatestack.c (__stack_user): Use hidden_data_def.
10349 * pthread_create.c (__pthread_keys): Likewise.
10351 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
10353 2003-03-14 Roland McGrath <roland@redhat.com>
10355 * tst-fork4.c: New file.
10356 * Makefile (tests): Add it.
10358 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
10359 we always define the padding space.
10360 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
10361 stopped supporting its own extensions fully.
10362 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
10363 struct also called `header', so `header.multiple_threads' is the field
10364 name to use on all machines.
10365 * allocatestack.c (allocate_stack): Use `header.' prefix.
10366 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10367 * pthread_create.c (__pthread_create_2_1): Likewise.
10368 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
10369 (THREAD_SELF): Likewise.
10370 * sysdeps/x86_64/tls.h: Likewise.
10371 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10372 (SINGLE_THREAD_P): Likewise.
10373 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10374 (SINGLE_THREAD_P): Likewise.
10375 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10376 (SINGLE_THREAD_P): Likewise.
10378 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
10381 2003-03-14 Ulrich Drepper <drepper@redhat.com>
10383 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
10384 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
10386 * pthread_create.c (start_thread): setjmp is expected to return 0.
10388 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
10389 (THREAD_GETMEM_NC): Likewise.
10391 2003-03-13 Ulrich Drepper <drepper@redhat.com>
10393 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
10394 and the size of the stack which must be allocated is a multiple,
10395 allocate one more page.
10396 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
10397 MULTI_PAGE_ALIASING.
10399 2003-03-13 Roland McGrath <roland@redhat.com>
10401 * pthread_create.c (start_thread): Set EXITING_BIT after the
10402 event-reporting (and destructors), not before.
10404 2003-03-13 Jakub Jelinek <jakub@redhat.com>
10406 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
10407 lll_futex_wake): Declare register variables as long int instead of
10408 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
10409 Make syscall arguments clobbered by the syscall.
10410 (lll_futex_wait): Define using lll_futex_timed_wait.
10412 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
10415 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
10416 PPID if [! NDEBUG].
10418 * allocatestack.c (nptl_ncreated): Only declare if
10419 COLORING_INCREMENT != 0.
10421 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10422 (__libc_enable_asynccancel_2): Remove prototype.
10424 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10425 ctid to match kernel.
10427 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10429 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10430 libc_multiple_threads.
10431 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10432 __libc_multiple_threads to...
10433 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
10435 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10437 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10438 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10440 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10441 (__pthread_once_internal): Define.
10443 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10444 macros instead of .symver directly.
10445 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10446 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10448 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10449 * sysdeps/x86_64/tcb-offsets.sym: New file.
10450 * sysdeps/x86_64/Makefile: New file.
10452 * sysdeps/i386/tcb-offsets.sym: Add SELF.
10453 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10454 to access own pthread_t in TCB.
10455 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10457 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10459 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10461 2003-03-12 Roland McGrath <roland@redhat.com>
10463 * pthread-errnos.sym: New file.
10464 * Makefile (gen-as-const-headers): New variable, list that file.
10465 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10466 header <pthread-errnos.h> instead of defining errno values here.
10467 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10468 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10469 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10470 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10471 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10473 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10475 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10476 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10477 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10478 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10479 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10480 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10481 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10482 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10483 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10484 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10485 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10486 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10487 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10488 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10489 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10490 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10491 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10492 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10493 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10494 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10495 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10496 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10497 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10498 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10499 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10500 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10501 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10503 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10504 CLONE_CHILD_SETTID worked.
10506 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10508 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10510 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10513 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10514 (pthread_cond_t): Add padding.
10516 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10517 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10518 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10520 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10521 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10522 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10523 (__pthread_rwlock_timedrdlock): Likewise.
10524 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10525 (__pthread_rwlock_wrlock): Likewise.
10526 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10527 (__pthread_rwlock_rdlock): Likewise.
10529 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10531 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10532 result of lock re-get if it fails.
10534 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10536 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10537 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10538 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10539 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10540 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10541 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10542 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10543 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10544 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10545 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10547 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10548 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10550 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10551 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10552 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10553 (create_thread): Likewise.
10554 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10555 * init.c (__pthread_initialize_minimal_internal): Initialize
10556 __libc_multiple_threads_ptr if necessary.
10557 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
10558 __pthread_multiple_threads and __libc_multiple_threads_ptr.
10559 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10560 __libc_multiple_threads.
10561 (__libc_pthread_init): Return pointer to __libc_pthread_init if
10564 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10565 (THREAD_SETMEM_NC): Likewise.
10567 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10568 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10569 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10570 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10572 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10573 Eliminate one entire instruction.
10575 * cancellation.c (__pthread_enable_asynccancel_2): New function.
10576 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10577 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10578 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10579 instead of __pthread_enable_asynccancel.
10580 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10581 (__pthread_cond_wait): Likewise.
10582 * sysdeps/pthread/pthread_cond_timedwait.c
10583 (__pthread_cond_timedwait): Likewise.
10584 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10586 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10587 (__condvar_cleanup): Wake up all waiters in case we got signaled
10588 after being woken up but before disabling asynchronous
10590 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10591 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10592 (__condvar_cleanup): Likewise.
10594 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10595 Make it an error if architecture has no #if case. Add x86-64.
10597 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10598 pt-initfini.s generation.
10600 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10601 (TLS_INIT_TP): Fix typo.
10603 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10605 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10606 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10608 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10609 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10610 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10611 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10612 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10613 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10614 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10615 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10617 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10619 * sysdeps/pthread/pthread_cond_timedwait.c
10620 (__pthread_cond_timedwait): Return the result of the final
10621 locking. If it succeeds, the regular function return value.
10623 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10624 Return result of the final locking.
10625 * version.c (__nptl_main): Work around problems with the strange
10626 INTERNAL_SYSCALL macro on ppc32.
10627 * init.c (__pthread_initialize_minimal_internal): Unblock
10628 SIGCANCEL in case the parent blocked it.
10629 Reported by Paul Mackerras <paulus@samba.org>.
10631 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10632 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10633 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10635 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10637 * sysdeps/pthread/pthread_cond_timedwait.c
10638 (__pthread_cond_timedwait): Unlock and fail if
10639 __pthread_mutex_unlock_internal failed.
10641 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10642 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10644 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10645 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10646 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10647 ALLOCATE_STACK): New macros.
10648 (TLS_TPADJ): New macro.
10649 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10650 (allocate_stack): Handle TLS_DTV_AT_TP and
10651 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10652 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10653 Don't set PD->self.
10654 * init.c [__ia64__] (__NR_set_tid_address): Define.
10656 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10657 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10658 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10659 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10660 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10661 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10662 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10663 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10664 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10665 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10666 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10667 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10668 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10669 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10670 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10671 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10672 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10673 * sysdeps/ia64/bits/atomic.h: New file.
10674 * sysdeps/ia64/Makefile: New file.
10675 * sysdeps/ia64/pthread_spin_init.c: New file.
10676 * sysdeps/ia64/pthread_spin_lock.c: New file.
10677 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10678 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10679 * sysdeps/ia64/pthreaddef.h: New file.
10680 * sysdeps/ia64/tcb-offsets.sym: New file.
10681 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10682 * sysdeps/ia64/tls.h: New file.
10684 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10685 to syscall instead of no arguments.
10687 2003-03-10 Ulrich Drepper <drepper@redhat.com>
10689 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10690 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10691 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10692 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10694 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10697 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10699 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10700 lowlevelbarrier.sym.
10701 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10702 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10703 Include lowlevelbarrier.h and don't define offsets locally.
10704 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10706 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10707 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10708 (__lll_mutex_timedlock_wait): Likewise.
10709 (lll_mutex_lock): Adjust asm for that.
10710 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10711 (lll_lock): Adjust asm for operand order change.
10712 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10713 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10715 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10716 Reverse order of parameters.
10717 (__lll_timedwait_tid): Remove regparms attribute.
10718 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10719 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10721 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10722 (__lll_timedwait_tid): Remove one unnecessary instruction.
10724 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10725 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10726 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10729 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10730 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10732 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10735 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10736 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10738 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10739 define LOCK here (if UP is not defined). The actual code is in
10742 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10743 LOCK is already defined. Don't define lll_unlock_wake_cb and
10744 __lll_timedwait_tid for libc.so.
10745 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10746 define LOCK here (if UP is not defined). The actual code is in
10749 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10750 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10751 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10752 instead of lowlevelsem.h.
10753 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10754 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10755 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10757 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10758 lowlevelrwlock.sym.
10759 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10760 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10761 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10763 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10765 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10766 last changed. D'oh.
10768 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10770 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10771 of __libc_locking_needed.
10772 (lll_trylock): Initialize %eax to zero.
10774 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10775 pthread_cond_t definition.
10777 2003-03-10 Roland McGrath <roland@redhat.com>
10779 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10780 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10781 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10782 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10783 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10785 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10786 Instead of setting PD->multiple_threads, set globals
10787 __pthread_multiple_threads and __libc_multiple_threads.
10788 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10789 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10790 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10792 * descr.h (struct pthread): Conditionalize first member on
10793 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10794 containing an anonymous tcbhead_t. Move `list' member out.
10795 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10796 * allocatestack.c: Remove use of `header.data.' prefix.
10797 * pthread_create.c: Likewise.
10798 * init.c (__pthread_initialize_minimal_internal): Likewise.
10799 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10800 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10801 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10802 * sysdeps/x86_64/tls.h: Likewise.
10803 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10804 (SINGLE_THREAD_P): Likewise.
10805 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10806 (SINGLE_THREAD_P): Likewise.
10807 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10808 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10810 2003-03-09 Ulrich Drepper <drepper@redhat.com>
10812 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10814 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10815 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10817 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10818 leftovers from the ia32 code.
10820 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10822 (clear_once_control): Don't load %esi.
10824 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10827 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10829 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10830 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10832 * Makefile (tests): Add tst-cond10.
10833 * tst-cond10.c: New file.
10835 2003-03-08 Ulrich Drepper <drepper@redhat.com>
10837 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10838 * tst-signal3.c (do_test): Likewise.
10839 * tst-sem5.c (do_test): Likewise.
10840 * tst-kill6.c (do_test): Likewise.
10841 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10843 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10845 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10846 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10847 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10848 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10849 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10850 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10851 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10853 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10855 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10856 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10857 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10858 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10859 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10860 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10861 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10862 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10864 * allocatestack.c (allocate_stack): If mprotect() fails free the
10867 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10869 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10871 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10872 lll_wake_tid. This was used only to work around kernel limits in
10874 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10875 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10876 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10877 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10879 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10880 (__pthread_initialize_minimal_internal): Change initialization of
10881 __static_tls_align_m1 appropriately.
10882 * pthreadP.h (__static_tls_align_m1): Renamed from
10883 __static_tls_align.
10884 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10885 instead of __static_tls_align-1.
10887 2003-03-04 Ulrich Drepper <drepper@redhat.com>
10889 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10891 * pthread_create.c: Define __pthread_keys using nocommon
10892 attribute, not by placing it explicitly in bss.
10893 Remove DEFINE_DEALLOC definition. Not needed anymore.
10895 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10896 Use it in mmap call to allocate stacks.
10898 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10900 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10901 result of the thread function.
10903 2003-03-03 Ulrich Drepper <drepper@redhat.com>
10905 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10906 version is just fine.
10908 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10909 (__pthread_child_handler): Renamed from pthread_child_handler,
10910 exported, and marked hidden. Change all users.
10911 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10912 free __pthread_child_handler from child list.
10914 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10916 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10918 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10919 Fix handling of cancellation and failing pthread_mutex_unlock call.
10920 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10921 (__pthread_cond_wait): Likewise.
10923 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10924 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10925 lll_futex_timed_wait call.
10926 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10927 (pthread_rwlock_timedwrlock): Likewise.
10929 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10930 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10931 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10933 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10934 check of lll_futex_wake return value.
10936 2003-03-03 Roland McGrath <roland@redhat.com>
10938 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10940 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10941 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10942 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10944 2003-03-02 Ulrich Drepper <drepper@redhat.com>
10946 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10947 error for CPU clocks.
10949 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10950 _POSIX_MONOTONIC_CLOCK.
10951 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10953 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10956 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10958 * descr.h (struct pthread): Move cleanup field to the front.
10960 2003-03-01 Roland McGrath <roland@redhat.com>
10962 * sem_open.c (sem_open): Braino fix.
10964 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10966 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10967 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10968 __pthread_cleanup_pop functionality.
10969 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10971 * descr.h (struct pthread): Move tid field to the front now that
10974 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10975 (__lll_mutex_timedlock_wait): Remove.
10976 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10977 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10978 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10979 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10980 (lll_unlock_wake_cb): Don't save and restore %esi.
10981 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10983 (__lll_timedwait_tid): Add alignment.
10984 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10985 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10987 (__lll_timedwait_tid): Removed.
10988 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10989 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10990 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10991 (pthread_barrier_wait): Don't save, load, and restore %esi for
10993 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10994 (__pthread_cond_signal): Don't save, load, and restore %esi.
10995 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10996 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10997 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10998 Don't save, load, and restore %esi.
11000 2003-02-27 Ulrich Drepper <drepper@redhat.com>
11002 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
11003 Release lock before waking up the waiters.
11005 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
11007 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
11008 (reader_thread): Likewise.
11010 * sysdeps/pthread/pthread_rwlock_unlock.c
11011 (__pthread_rwlock_unlock): Release internal lock early. Don't try
11012 to wake up readers if there are none.
11014 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
11015 Release internal lock before wake threads.
11017 2003-02-26 Ulrich Drepper <drepper@redhat.com>
11019 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
11020 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
11022 * tst-rwlock9.c: Likewise.
11023 * tst-rwlock10.c: New file.
11024 * tst-rwlock11.c: New file.
11026 * Makefile (tests): Add tst-dlsym1.
11027 * tst-dlsym1.c: New file.
11029 * init.c (__pthread_initialize_minimal_internal): Set
11030 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
11031 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
11033 2003-02-24 Ulrich Drepper <drepper@redhat.com>
11035 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
11037 * tst-cond2.c: Fix sychronization with child.
11039 * tst-rwlock8.c (reader_thread): Remove unused variable.
11041 * Makefile: Add rules to build and run tst-tls3.
11042 * tst-tls3.c: New file.
11043 * tst-tls3mod.c: New file.
11045 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
11046 * tst-rwlock8.c: New file.
11047 * tst-rwlock9.c: New file.
11048 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
11049 complete broken rwlock implementation.
11050 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11052 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11054 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
11055 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
11056 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
11057 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
11058 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
11059 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
11060 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
11062 2003-02-23 Roland McGrath <roland@redhat.com>
11064 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
11066 2003-02-23 Ulrich Drepper <drepper@redhat.com>
11068 * Makefile (tests): Add tst-context1.
11069 * tst-context1.c: New file.
11071 * Makefile (tests): Add tst-tls1 and tst-tls2.
11072 * tst-tls1.c: New file.
11073 * tst-tls2.c: New file.
11075 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
11076 for failed cmpxchg.
11078 * pthread_create.c (start_thread): Set EXITING_BIT early.
11080 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
11081 (THREAD_GETMEM_NC): Likewise.
11083 2003-02-22 Ulrich Drepper <drepper@redhat.com>
11085 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
11086 off 3 more bytes by using offset-less instructions when possible.
11088 * Makefile: Add dependency for $(objpfx)version.d.
11090 * eintr.c (eintr_source): Add unnecessary return but the compiler
11093 * tst-kill3.c: Include <unistd.h>.
11095 2003-02-21 Roland McGrath <roland@redhat.com>
11097 * pthread_create.c (start_thread): Call __libc_thread_freeres.
11099 2003-02-21 Ulrich Drepper <drepper@redhat.com>
11101 * Makefile (tests): Add tst-eintr1.
11102 (distribute): Add eintr.c.
11103 * tst-eintr1.c: New file.
11104 * eintr.c: New file.
11106 * pthread_cancel.c (pthread_cancel): Use tkill directly.
11108 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
11109 Disallow sending SIGCANCEL.
11111 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
11112 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
11113 * tst-kill1.c: New file.
11114 * tst-kill2.c: New file.
11115 * tst-kill3.c: New file.
11116 * tst-kill5.c: New file.
11117 * tst-kill6.c: New file.
11118 * tst-basic7.c: Renamed to...
11119 * tst-kill4.c: ...this.
11121 2003-02-21 Roland McGrath <roland@redhat.com>
11123 * Makefile (install-lib-ldscripts): New variable.
11125 2003-02-21 Ulrich Drepper <drepper@redhat.com>
11127 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
11128 * pthread_cancel.c: Use INVALID_TD_P.
11129 * pthread_detach.c: Likewise.
11130 * pthread_getschedparam.c: Likewise.
11131 * pthread_setschedparam.c: Likewise.
11132 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
11133 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
11134 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
11135 * pthread_timedjoin.c: Likewise.
11137 * tst-basic7.c: Include <signal.h>.
11139 * pthread_join.c (pthread_join): Limited checking for invalid
11141 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
11143 2003-02-20 Ulrich Drepper <drepper@redhat.com>
11145 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
11146 beginning of the loop. Clear the entire first block of TSD.
11147 * Makefile (tests): Add tst-key4.
11148 * tst-key4.c: New file.
11150 2003-02-18 Ulrich Drepper <drepper@redhat.com>
11152 * Makefile (tests): Add tst-basic7.
11153 * tst-basic7.c: New file.
11155 * pthread_create.c (deallocate_tsd): Mark as internal_function.
11156 Add some more __builtin_expect.
11158 * pthreadP.h: Define dummy version of DEBUGGING_P.
11160 2003-02-17 Ulrich Drepper <drepper@redhat.com>
11162 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
11163 _POSIX_THREAD_PRIORITY_SCHEDULING.
11164 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
11165 _XOPEN_REALTIME_THREADS.
11166 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
11168 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
11169 kernel returns EINVAL for PID <= 0, work around it.
11171 * Makefile (tests): Add tst-signal5.
11172 * tst-signal5.c: New file.
11174 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
11175 and LOGIN_NAME_MAX.
11177 * tst-cancel1.c (tf): Block all signals.
11179 * Makefile (tests): Add tst-basic6.
11180 * tst-basic6.c: New file.
11182 * tst-basic1.c: Add test for process ID.
11184 * Makefile (tests): Add tst-cancel10.
11185 * tst-cancel10.c: New file.
11187 * Makefile (tests): Add tst-signal4.
11188 * tst-signal4.c: New file.
11190 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
11191 __sigismember instead of sigismember. Add __builtin_expect.
11193 2003-02-16 Ulrich Drepper <drepper@redhat.com>
11195 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
11196 pthread_setcancelstate, and pthread_rwlock_setpshared.
11198 * tst-cancel7.c (do_test): Make sure the pid file exists before
11199 canceling the thread.
11201 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
11202 pthread_rwlock_timedrdlock tests.
11203 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
11204 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11205 Check for invalid tv_nsec field.
11206 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11209 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
11210 recursive mutex of overflow.
11212 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
11214 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
11215 going into an endless loop.
11216 * Makefile (tests): Add tst-cancel9.
11217 * tst-cancel9.c: New file.
11219 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
11221 2003-02-15 Ulrich Drepper <drepper@redhat.com>
11223 * tst-mutex5.c (do_test): Add more timedlock tests.
11225 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
11226 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
11228 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
11229 use INLINE_SYSCALL. Error number is returned, not -1.
11231 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
11232 and __deallocate_stack with internal_function.
11233 * pthread_create.c: Adjust definitions appropriately.
11234 * allocatestack.c: Likewise.
11236 * pthread_join.c: Add one more __builtin_expect.
11237 * pthread_timedjoin.c: Likewise.
11239 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
11240 not data of sequence number does not match.
11241 Add one __builtin_expect.
11243 * Makefile (tests): Add tst-clock1.
11244 * tst-clock1.c: New file.
11246 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
11247 negative arguments.
11248 * Makefile (tests): Add tst-basic5.
11249 * tst-basic5.c: New file.
11251 2003-02-14 Ulrich Drepper <drepper@redhat.com>
11253 * Makefile (tests): Add tst-basic4.
11254 * tst-basic4.c: New file.
11256 * pthreadP.h: Add declaraction for __nptl_nthreads.
11257 * pthread_create.c: Define __nptl_nthreads
11258 (start_thread): Increment __nptl_nthreads at beginning. Decrement
11259 after thread is done. If then zero, call exit(0).
11260 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11261 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
11262 * init.c (pthread_functions): Initialize ptr_nthreads.
11263 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
11264 (__reclaim_stacks): Decrement __nptl_nthreads.
11265 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
11267 * Makefile (tests): Add tst-basic3.
11268 * tst-basic3.c: New file.
11270 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
11271 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
11272 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
11273 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
11274 if asynchronous canceling is enabled.
11275 * pthread_join.c (pthread_join): When recognizing circular joins,
11276 take into account the other thread might be already canceled.
11277 * Makefile (tests): Add tst-join5.
11278 * tst-join5.c: New file.
11280 * Makefile (tests): Add tst-join4.
11281 * tst-join4.c: New file.
11283 2003-02-13 Ulrich Drepper <drepper@redhat.com>
11285 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
11287 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
11289 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
11290 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
11291 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
11293 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
11295 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
11296 error if lll_futex_wake failed.
11298 2003-02-13 Ulrich Drepper <drepper@redhat.com>
11300 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
11301 handling of cancellation and failung pthread_mutex_unlock call.
11302 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11303 * Makefile (tests): Add tst-cond8 and tst-cond9.
11304 * tst-cond8.c: New file.
11305 * tst-cond9.c: New file.
11307 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
11309 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
11310 non-standard initializers with __USE_GNU.
11312 * Makefile (tests): Add tst-cleanup3.
11313 * tst-cleanup3.c: New file.
11315 2003-02-12 Ulrich Drepper <drepper@redhat.com>
11317 * Makefile (tests): Add tst-attr1 and tst-attr2.
11318 * tst-attr1.c: New file.
11319 * tst-attr2.c: New file.
11321 * Makefile: Add rules to build and run tst-atfork2 test.
11322 * tst-atfork2.c: New file.
11323 * tst-atfork2mod.c: New file.
11325 * sysdeps/unix/sysv/linux/unregister-atfork.c
11326 (__unregister_atfork): Free the memory allocated for the handlers
11327 after removing them from the lists.
11329 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
11332 * tst-atfork1.c (do_test): Wait for the child we forked.
11333 Report error in child.
11335 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
11337 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
11339 2003-02-10 Ulrich Drepper <drepper@redhat.com>
11341 * Makefile (tests): Add tst-cancel8.
11342 * tst-cancel8.c: New file.
11344 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
11345 clearing of control variable.
11346 * Makefile (tests): Add tst-once3 and tst-once4.
11347 * tst-once3.c: New file.
11348 * tst-once4.c: New file.
11350 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
11352 * sysdeps/sh/Makefile: New file.
11353 * sysdeps/sh/bits/atomic.h: New file.
11354 * sysdeps/sh/pthread_spin_init.c: New file.
11355 * sysdeps/sh/pthread_spin_lock.c: New file.
11356 * sysdeps/sh/pthread_spin_trylock.S: New file.
11357 * sysdeps/sh/pthread_spin_unlock.S: New file.
11358 * sysdeps/sh/pthreaddef.h: New file.
11359 * sysdeps/sh/tcb-offsets.sym: New file.
11360 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
11361 * sysdeps/sh/tls.h: New file.
11362 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
11363 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
11364 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
11365 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
11366 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
11367 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
11368 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
11369 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
11370 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
11371 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
11372 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
11373 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
11374 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
11375 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
11376 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
11377 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
11378 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
11379 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
11380 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
11381 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
11382 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
11383 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
11384 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
11385 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
11386 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
11387 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
11388 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
11389 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
11390 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
11391 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
11393 2003-02-08 Ulrich Drepper <drepper@redhat.com>
11395 * tst-cond2.c: Rearrange code to not rely on behavior undefined
11396 according to POSIX.
11398 * tst-basic2.c (do_test): Lock mutex before creating the thread.
11400 2003-02-07 Ulrich Drepper <drepper@redhat.com>
11402 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
11403 (TLS_GET_FS): New #define.
11404 (TLS_SET_FS): New #define.
11405 Correct value of __NR_set_thread_area.
11407 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
11409 2003-02-06 Ulrich Drepper <drepper@redhat.com>
11411 * Makefile (tests): Add tst-popen1.
11412 * tst-popen1.c: New file.
11414 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
11415 but inactive generalization.
11416 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11417 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11418 Minor optimization, remove one instruction.
11419 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11421 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
11423 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11425 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
11427 * init.c (__NR_set_tid_address): Add #ifdef for s390.
11428 * sysdeps/pthread/pthread_barrier_wait.c: New file.
11429 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11430 * sysdeps/pthread/pthread_cond_signal.c: New file.
11431 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11432 * sysdeps/pthread/pthread_cond_wait.c: New file.
11433 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11434 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11435 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11436 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11437 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11438 * sysdeps/s390/Makefile: New file.
11439 * sysdeps/s390/bits/atomic.h: New file.
11440 * sysdeps/s390/pthread_spin_init.c: New file.
11441 * sysdeps/s390/pthread_spin_lock.c: New file.
11442 * sysdeps/s390/pthread_spin_trylock.c: New file.
11443 * sysdeps/s390/pthread_spin_unlock.c: New file.
11444 * sysdeps/s390/pthreaddef.h: New file.
11445 * sysdeps/s390/tcb-offsets.sym: New file.
11446 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11447 * sysdeps/s390/tls.h: New file.
11448 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11449 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11450 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11451 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11452 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11453 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11454 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11455 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11456 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11457 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11458 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11459 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11460 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11461 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11462 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11463 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11464 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11465 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11466 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11467 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11468 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11469 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11470 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11472 2003-02-04 Ulrich Drepper <drepper@redhat.com>
11474 * atomic.h: Add a couple more default implementations.
11475 (atomic_compare_and_exchange_acq): Use
11476 __arch_compare_and_exchange_32_acq in return value definition. It
11478 (atomic_bit_set): Renamed from atomic_set_bit.
11479 Add missing atomic_ prefixes.
11481 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11482 thread library is available, use correct value to mark initialized
11485 2003-02-03 Ulrich Drepper <drepper@redhat.com>
11487 * allocatestack.c (allocate_stack): Use __getpagesize instead of
11488 __sysconf to determine pagesize.
11490 * pthread_create.c: Include <atomic.h>.
11491 * allocatestack.c (allocate_stack): Implement coloring of the
11492 allocated stack memory. Rename pagesize to pagesize_m1. It's the
11493 size minus one. Adjust users.
11494 * sysdeps/i386/i686/Makefile: New file.
11496 2003-02-02 Ulrich Drepper <drepper@redhat.com>
11498 * allocatestack.c: Improve comment throughout the file.
11500 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11501 (__lll_lock_wait): Add branch prediction.
11502 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11503 (__lll_lock_wait): Likewise.
11504 (lll_unlock_wake_cb): Removed.
11506 2003-01-31 Ulrich Drepper <drepper@redhat.com>
11508 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11509 _POSIX_THREAD_PRIORITY_SCHEDULING.
11511 2003-01-30 Jakub Jelinek <jakub@redhat.com>
11513 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11514 Fix return type of ptr___pthread_getspecific.
11516 2003-01-29 Ulrich Drepper <drepper@redhat.com>
11518 * Makefile (tests): Add tst-umask1.
11519 (tst-umask1-ARGS): Define.
11520 * tst-umask1.c: New file.
11522 2003-01-28 Ulrich Drepper <drepper@redhat.com>
11524 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
11525 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11526 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11527 pthread_rwlock_unlock.
11528 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11529 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11530 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11531 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11532 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11534 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11535 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11537 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11538 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11539 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11541 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11542 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11544 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11545 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11546 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11548 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11549 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11551 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11553 * Makefile (libpthread-routines): Remove lowlevelcond and
11554 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11555 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11556 and pthread_cond_broadcast.
11557 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11558 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11559 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11560 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11561 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11562 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11563 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11564 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11565 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11566 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11567 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11568 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11569 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11570 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11571 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11572 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11573 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11574 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11575 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11576 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11577 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11578 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11579 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11580 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11581 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11582 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11583 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11584 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11585 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11586 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11587 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11589 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11590 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11591 of the code is moved to ...
11592 * sysdeps/pthread/createthread.c: ...here. New file.
11594 2003-01-27 Ulrich Drepper <drepper@redhat.com>
11596 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11597 (__new_sem_post): Clear %eax before returning.
11598 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11600 * Makefile (tests): Add tst-cleanup2.
11601 * tst-cleanup2.c: New file.
11603 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11604 Interpret first parameter correctly.
11606 2003-01-17 Ulrich Drepper <drepper@redhat.com>
11608 * Makefile (headers): Add bits/semaphore.h.
11610 2003-01-16 Jakub Jelinek <jakub@redhat.com>
11612 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11615 2003-01-14 Ulrich Drepper <drepper@redhat.com>
11617 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11618 must be used and mapping failed.
11619 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11621 * Makefile (CFLAGS-pthread_self.os): Define this, not
11622 CFLAGS-pthread_self.c.
11624 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11626 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11627 lll_unlock_wake_cb.
11629 * Makefile (libpthread-routines): Add version. Add rules to build
11630 version.os and banner.h.
11631 * version.c: New file.
11633 2003-01-13 Jakub Jelinek <jakub@redhat.com>
11635 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11636 the alias unconditional.
11637 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11639 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11641 * Makefile (CFLAGS-pthread_self.c): New definition.
11643 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11645 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11646 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11647 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11648 * init.c (__pthread_initialize_minimal_internal): Likewise.
11650 2003-01-07 Jakub Jelinek <jakub@redhat.com>
11652 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11654 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11655 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11656 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11657 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11658 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11659 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11661 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11663 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11664 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11665 * tst-cancel-wrappers.sh: Remove all exceptions.
11667 2003-01-05 Ulrich Drepper <drepper@redhat.com>
11669 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11670 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11672 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11673 Use __libc_pthread_functions array if SHARED.
11675 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11676 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11678 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11679 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11680 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11681 __libc_ptf_call instead of __libc_maybe_call.
11682 (PTF): New #define.
11683 (__libc_cleanup_region_start): Wrap function name with PTF call.
11684 (__libc_cleanup_region_end): Likewise.
11685 (__libc_cleanup_end): Likewise.
11687 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11688 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11689 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11690 * pthreadP.h: Add prototypes.
11692 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11693 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11694 __pthread_rwlock_unlock aliases.
11695 * pthreadP.h: Add prototypes for new aliases.
11697 * pthreadP.h (struct pthead_functions): Moved to...
11698 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11699 * init.c (pthread_functions): Add initializers for new elements.
11701 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11702 __pthread_cleanup_pop_restore aliases.
11703 * pthreadP.h: Add prototypes.
11705 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11706 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11707 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11708 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11709 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11710 * pthreadP.h: Adjust prototypes and callers.
11712 2003-01-04 Ulrich Drepper <drepper@redhat.com>
11714 * Makefile (tests): Add tst-cancel7.
11715 (tst-cancel7-ARGS): New variable.
11716 * tst-cancel7.c: New file.
11718 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11719 around gcc defficiencies.
11720 * old_pthread_cond_signal.c: Likewise.
11721 * old_pthread_cond_timedwait.c: Likewise.
11722 * old_pthread_cond_wait.c: Likewise.
11724 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11726 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11728 * Makefile (tests): Add tst-cond7.
11729 * tst-cond7.c: New file.
11731 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11732 (condvar_cleanup): Get condvar address from the right place.
11734 * atomic.h: Correct definitions of atomic_full_barrier,
11735 atomic_read_barrier, atomic_write_barrier.
11737 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11739 * old_pthread_cond_signal.c: Likewise.
11740 * old_pthread_cond_timedwait.c: Likewise.
11741 * old_pthread_cond_wait.c: Likewise.
11743 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11745 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11747 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11749 * pthreadP.h (pthread_cond_2_0_t): New type.
11750 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11751 Use new type for the 2.0 condvar function prototypes.
11752 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11753 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11755 * old_pthread_cond_destroy.c: Likewise.
11756 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11757 * old_pthread_cond_signal.c: Likewise.
11758 * old_pthread_cond_timedwait.c: Likewise.
11759 * old_pthread_cond_wait.c: Likewise.
11761 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11762 (__pthread_cond_wait): Don't save cancellation mode and seq value
11765 * herrno.c (__h_errno_location): Don't define as weak.
11767 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11769 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11770 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11771 and pthread_cond_wait.
11772 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11774 (__pthread_cond_broadcast_2_0): ... this.
11775 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11777 (__pthread_cond_destroy_2_0): ... this.
11778 * old_pthread_cond_init.c (__old_pthread_cond_init):
11780 (__pthread_cond_init_2_0): ... this.
11781 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11783 (__pthread_cond_signal_2_0): ... this.
11784 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11786 (__pthread_cond_wait_2_0): ... this.
11787 * pthread_cond_destroy.c: Include shlib-compat.h.
11788 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11789 * pthread_cond_init.c: Include shlib-compat.h.
11790 (pthread_cond_init): Change strong_alias into versioned_symbol.
11791 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11792 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11794 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11795 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11796 __pthread_cond_wait_2_0): New prototypes.
11797 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11798 __old_pthread_cond_init, __old_pthread_cond_signal,
11799 __old_pthread_cond_wait): Removed.
11800 * init.c: Include shlib-compat.h.
11801 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11802 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11803 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11804 ptr___pthread_cond_*_2_0 fields.
11805 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11806 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11808 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11809 LIBC_SIGACTION was not yet defined.
11810 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11811 [!defined LIBC_SIGACTION] (__sigaction): New function and
11813 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11814 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11816 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11818 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11820 2003-01-02 Ulrich Drepper <drepper@redhat.com>
11822 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11823 New, larger type definition.
11824 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11826 * Versions [libpthread]: Add definitions for new pthread_cond_*
11827 interfaces for version GLIBC_2.3.2.
11828 * pthread_cond_init.c: Update initialization for new type definition.
11829 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11830 pthread_cond_timedwait, pthread_cond_signal, and
11831 pthread_cond_broadcast. Add old_pthread_cond_init,
11832 old_pthread_cond_destroy, old_pthread_cond_wait,
11833 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11834 old_pthread_cond_broadcast.
11835 * old_pthread_cond_broadcast.c: New file.
11836 * old_pthread_cond_destroy.c: New file.
11837 * old_pthread_cond_init.c: New file.
11838 * old_pthread_cond_signal.c: New file.
11839 * old_pthread_cond_timedwait.c: New file.
11840 * old_pthread_cond_wait.c: New file.
11841 * pthreadP.h: Add prototypes for the compatibility interfaces.
11843 * pthread_cond_destroy.c: Don't include <errno.h>.
11845 2003-01-01 Ulrich Drepper <drepper@redhat.com>
11847 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11848 unnecessary zero offset when addressing MUTEX.
11850 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11852 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11854 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11855 for __register_atfork.
11857 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11859 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11860 instead of ASSEMBLER test macro.
11862 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11863 __libc_current_sigrtmax): Add libc_hidden_def.
11865 * sysdeps/pthread/list.h: Remove assert.h include.
11867 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11869 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11870 __pthread_initialize_minimal_internal not
11871 __pthread_initialize_minimal.
11873 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11875 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11876 __pthread_initialize_minimal as hidden.
11878 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11881 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11883 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11884 $(common-objpfx)format.lds, include that into the output script.
11886 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11888 2002-12-28 Andreas Jaeger <aj@suse.de>
11890 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11891 nsec resolution changes.
11892 (xstat64_conv): Likewise.
11893 (xstat32_conv): Likewise.
11894 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11895 struct kernel_stat.
11896 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11897 structs stat and stat64.
11898 * time/time.h (__timespec_defined): Define for __USE_MISC.
11899 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11901 2002-12-30 Jakub Jelinek <jakub@redhat.com>
11903 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11905 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11906 (pthread_exit): Use strong_alias to avoid warnings.
11907 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11908 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11909 ptr___pthread_attr_init_2_*.
11910 * init.c (pthread_functions): Adjust.
11912 2002-12-29 Ulrich Drepper <drepper@redhat.com>
11914 * forward.c: Make all functions available by default again. It
11915 caused too much trouble.
11917 * pt-siglongjmp.c: Removed.
11919 2002-12-28 Jakub Jelinek <jakub@redhat.com>
11921 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11922 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11923 * sysdeps/i386/Makefile: New file.
11924 * sysdeps/i386/tcb-offsets.sym: New file.
11925 * sysdeps/pthread/tcb-offsets.h: New file.
11926 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11927 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11929 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11930 __register_atfork...
11931 (GLIBC_2.3.2): ...here.
11933 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11935 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11936 pthread_attr_setstackaddr with __attribute_deprecated__.
11938 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11940 * pt-system.c (system): Remove cancellation handling.
11941 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11942 cancellation routines.
11944 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11946 * descr.h: Include <dl-sysdep.h>.
11947 (struct pthread): Move header.data.list to the back of the struct.
11948 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11949 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11950 (SYSINFO_OFFSEET): Likewise.
11952 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11954 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11956 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11957 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11958 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11959 (USE_DL_SYSINFO): Undef.
11961 2002-12-22 Jakub Jelinek <jakub@redhat.com>
11963 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11964 $(common-objpfx)libc.so.
11965 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11966 it is bigger than pipe buffer size even on arches with bigger
11968 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11970 2002-12-25 Ulrich Drepper <drepper@redhat.com>
11972 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11973 correct errno access for case that USE___THREAD is not defined.
11975 2002-12-24 Ulrich Drepper <drepper@redhat.com>
11977 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11978 Patch by Marijn Ros <marijn@mad.scientist.com>.
11980 2002-12-22 Roland McGrath <roland@redhat.com>
11982 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11984 2002-12-20 Ulrich Drepper <drepper@redhat.com>
11986 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11988 2002-12-19 Ulrich Drepper <drepper@redhat.com>
11990 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11991 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11992 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11994 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11996 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11997 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11998 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11999 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
12000 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
12001 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
12002 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
12003 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
12005 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
12007 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
12009 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
12011 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
12013 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
12014 that sysinfo is properly initialized.
12015 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
12016 to 1 only for ld.so.
12018 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
12019 RTLD_CORRECT_DYNAMIC_WEAK.
12021 2002-12-19 Jakub Jelinek <jakub@redhat.com>
12023 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
12024 Use return 0 as 6th argument to FORWARD4.
12025 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
12027 2002-12-18 Ulrich Drepper <drepper@redhat.com>
12029 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
12030 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
12031 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
12032 (INIT_SYSINFO): New #define.
12033 (TLS_TP_INIT): Use INIT_SYSINFO.
12034 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12035 At test to make sure SYSINFO_OFFSET value is correct.
12036 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
12038 2002-12-18 Jakub Jelinek <jakub@redhat.com>
12040 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
12041 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
12042 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
12043 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
12044 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
12045 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
12046 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
12048 2002-12-18 Ulrich Drepper <drepper@redhat.com>
12050 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
12051 macro instead of using int $0x80 directly.
12053 * sysdeps/pthread/bits/stdio-lock.h: New file.
12054 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
12055 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
12056 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
12057 * Makefile (routines): Add libc-lowlevelmutex.
12059 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
12060 __i686.get_pc_thunk.dx.
12062 2002-12-17 Jakub Jelinek <jakub@redhat.com>
12064 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
12065 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
12066 ($(objpfx)tst-cancel-wrappers.out): New rule.
12067 * tst-cancel-wrappers.sh: New test.
12068 * tst-locale1.c: Include signal.h.
12069 (uselocale): Test static linking of __libc_current_sigrt*.
12071 2002-12-17 Ulrich Drepper <drepper@redhat.com>
12073 * Makefile (tests): Add tst-cancel6.
12074 * tst-cancel6.c: New file
12076 2002-12-17 Jakub Jelinek <jakub@redhat.com>
12078 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
12079 Define meaningfully for assembler as well.
12080 * pthreadP.h (struct pthread_functions): Remove
12081 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
12082 and ptr_pthread_attr_init_2_1 fields.
12083 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
12084 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
12085 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
12086 (FORWARD3): Define using FORWARD4.
12087 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
12089 * pt-system.c: Remove duplicate stdlib.h include.
12091 2002-12-16 Ulrich Drepper <drepper@redhat.com>
12093 * sem_init.c: Define sem_init@GLIBC_2.0.
12094 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
12095 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
12097 * flockfile.c: Moved to...
12098 * sysdeps/pthread/flockfile.c: ...here. New file.
12099 * funlockfile.c: Moved to...
12100 * sysdeps/pthread/funlockfile.c: ...here. New file.
12101 * ftrylockfile.c: Moved to...
12102 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
12104 2002-12-16 Jakub Jelinek <jakub@redhat.com>
12106 * libc-cancellation.c: Guard both function with
12107 #if !defined NOT_IN_libc.
12108 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
12109 automatically provided pthread wrappers.
12110 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
12111 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
12113 * pt-open.c: Removed.
12114 * pt-fcntl.c: Removed.
12115 * pt-fsync.c: Removed.
12116 * pt-lseek.c: Removed.
12117 * pt-msgrcv.c: Removed.
12118 * pt-msgsnd.c: Removed.
12119 * pt-msync.c: Removed.
12120 * pt-nanosleep.c: Removed.
12121 * pt-open64.c: Removed.
12122 * pt-pause.c: Removed.
12123 * pt-pread.c: Removed.
12124 * pt-pread64.c: Removed.
12125 * pt-pwrite.c: Removed.
12126 * pt-pwrite64.c: Removed.
12127 * pt-read.c: Removed.
12128 * pt-recv.c: Removed.
12129 * pt-recvfrom.c: Removed.
12130 * pt-recvmsg.c: Removed.
12131 * pt-send.c: Removed.
12132 * pt-sendto.c: Removed.
12133 * pt-sigtimedwait.c: Removed.
12134 * pt-sigwait.c: Removed.
12135 * pt-wait.c: Removed.
12136 * pt-waitpid.c: Removed.
12137 * pt-write.c: Removed.
12138 * pt-accept.c: Removed.
12139 * pt-close.c: Removed.
12140 * pt-connect.c: Removed.
12141 * pt-lseek64.c: Removed.
12142 * pt-sendmsg.c: Removed.
12143 * pt-tcdrain.c: Removed.
12145 2002-12-15 Ulrich Drepper <drepper@redhat.com>
12147 * init.c (__pthread_initialize_minimal_internal): Renamed from
12148 __pthread_initialize_minimal. Make old name an alias. This
12149 converts a normal relocation into a relative relocation.
12151 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
12153 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
12154 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
12155 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
12156 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
12157 pt-sigwaitinfo, pt-waitid, and pt-writev.
12158 * pt-creat.c: Removed.
12159 * pt-poll.c: Removed.
12160 * pt-pselect.c: Removed.
12161 * pt-readv.c: Removed.
12162 * pt-select.c: Removed.
12163 * pt-sigpause.c: Removed.
12164 * pt-sigsuspend.c: Removed.
12165 * pt-sigwaitinfo.c: Removed.
12166 * pt-waitid.c: Removed.
12167 * pt-writev.c: Removed.
12169 * init.c (pthread_functions): New variable.
12170 (__pthread_initialize_minimal): Pass pointer to pthread_functions
12171 (or NULL) to __libc_pthread_init.
12172 * forward.c: Rewrite to use __libc:pthread_functions array to get
12173 function addresses.
12174 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
12176 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12177 Take new parameter. Copy content of variable pointed to by it
12178 to __libc_pthread_init.
12180 * pthreadP.h (struct pthread_functions): New type.
12181 (__libc_pthread_init): Declare.
12183 * pthread_attr_destroy.c: Add namespace protected alias.
12184 * pthread_attr_getdetachstate.c: Likewise.
12185 * pthread_attr_getinheritsched.c: Likewise.
12186 * pthread_attr_getschedparam.c: Likewise.
12187 * pthread_attr_getschedpolicy.c: Likewise.
12188 * pthread_attr_getscope.c: Likewise.
12189 * pthread_attr_setdetachstate.c: Likewise.
12190 * pthread_attr_setinheritsched.c: Likewise.
12191 * pthread_attr_setschedparam.c: Likewise.
12192 * pthread_attr_setschedpolicy.c: Likewise.
12193 * pthread_attr_setscope.c: Likewise.
12194 * pthread_cond_broadcast.c: Likewise.
12195 * pthread_cond_destroy.c: Likewise.
12196 * pthread_cond_init.c: Likewise.
12197 * pthread_cond_signal.c: Likewise.
12198 * pthread_cond_wait.c: Likewise.
12199 * pthread_condattr_destroy.c: Likewise.
12200 * pthread_condattr_init.c: Likewise.
12201 * pthread_equal.c: Likewise.
12202 * pthread_exit.c: Likewise.
12203 * pthread_getschedparam.c: Likewise.
12204 * pthread_self.c: Likewise.
12205 * pthread_setcancelstate.c: Likewise.
12206 * pthread_setschedparam.c: Likewise.
12207 * pthread_mutex_destroy.c: Likewise.
12208 * pthread_mutex_init.c: Likewise.
12209 * pthreadP.h: Add prototypes for the aliases.
12211 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
12212 multiple_threads member in correct TCB to 1.
12214 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
12215 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
12216 member of thread decriptor, otherwise return unconditionally 1.
12218 2002-12-14 Ulrich Drepper <drepper@redhat.com>
12220 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
12221 regular Linux version. Remove file.
12222 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
12223 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
12224 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
12225 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
12226 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
12227 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
12228 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
12229 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
12230 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
12231 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
12232 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
12233 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
12234 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
12235 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
12236 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
12237 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
12238 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
12239 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
12240 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
12241 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
12242 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
12243 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
12244 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
12245 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
12246 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
12247 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
12248 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
12249 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
12250 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
12251 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
12253 2002-12-14 Jakub Jelinek <jakub@redhat.com>
12255 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
12256 * sysdeps/unix/sysv/linux/open.c: Removed.
12257 * sysdeps/unix/sysv/linux/fsync.c: Removed.
12258 * sysdeps/unix/sysv/linux/lseek.c: Removed.
12259 * sysdeps/unix/sysv/linux/msync.c: Removed.
12260 * sysdeps/unix/sysv/linux/read.c: Removed.
12261 * sysdeps/unix/sysv/linux/close.c: Removed.
12262 * sysdeps/unix/sysv/linux/creat.c: Removed.
12263 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
12264 * sysdeps/unix/sysv/linux/pause.c: Removed.
12265 * sysdeps/unix/sysv/linux/select.c: Removed.
12266 * sysdeps/unix/sysv/linux/write.c: Removed.
12268 2002-12-14 Ulrich Drepper <drepper@redhat.com>
12270 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
12271 element in TCB to see whether locking is needed.
12273 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
12274 MULTIPLE_THREADS_OFFSET value is correct.
12276 * sysdeps/unix/sysv/linux/close.c: New file.
12277 * sysdeps/unix/sysv/linux/connect.S: New file.
12278 * sysdeps/unix/sysv/linux/creat.c: New file.
12279 * sysdeps/unix/sysv/linux/fsync.c: New file.
12280 * sysdeps/unix/sysv/linux/llseek.c: New file.
12281 * sysdeps/unix/sysv/linux/lseek.c: New file.
12282 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
12283 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
12284 * sysdeps/unix/sysv/linux/msync.c: New file.
12285 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
12286 * sysdeps/unix/sysv/linux/open.c: New file.
12287 * sysdeps/unix/sysv/linux/open64.c: New file.
12288 * sysdeps/unix/sysv/linux/pause.c: New file.
12289 * sysdeps/unix/sysv/linux/poll.c: New file.
12290 * sysdeps/unix/sysv/linux/pread.c: New file.
12291 * sysdeps/unix/sysv/linux/pread64.c: New file.
12292 * sysdeps/unix/sysv/linux/pselect.c: New file.
12293 * sysdeps/unix/sysv/linux/pwrite.c: New file.
12294 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
12295 * sysdeps/unix/sysv/linux/readv.c: New file.
12296 * sysdeps/unix/sysv/linux/recv.S: New file.
12297 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
12298 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
12299 * sysdeps/unix/sysv/linux/select.c: New file.
12300 * sysdeps/unix/sysv/linux/send.S: New file.
12301 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
12302 * sysdeps/unix/sysv/linux/sendto.S: New file.
12303 * sysdeps/unix/sysv/linux/sigpause.c: New file.
12304 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
12305 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
12306 * sysdeps/unix/sysv/linux/sigwait.c: New file.
12307 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
12308 * sysdeps/unix/sysv/linux/system.c: New file.
12309 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
12310 * sysdeps/unix/sysv/linux/wait.c: New file.
12311 * sysdeps/unix/sysv/linux/waitid.c: New file.
12312 * sysdeps/unix/sysv/linux/waitpid.c: New file.
12313 * sysdeps/unix/sysv/linux/writev.c: New file.
12314 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
12316 * pt-readv.c: Fix comment.
12318 2002-12-14 Jakub Jelinek <jakub@redhat.com>
12320 * tst-cleanup1.c: Include stdlib.h.
12322 * tst-cancel5.c: New test.
12323 * Makefile (tests): Add tst-cancel5.
12324 (tst-cancel5): Link against libc.so libpthread.so in that order.
12326 2002-12-13 Ulrich Drepper <drepper@redhat.com>
12328 * forward.c (test_loaded): Prevent recursive calls.
12330 * Makefile (routines): Add libc-cancellation.
12331 * libc-cancellation.c: New file.
12332 * descr.h (struct pthread): Add multiple_threads field.
12333 * allocatestack.c (allocate_stack): Initialize multiple_header field of
12334 new thread descriptor to 1.
12335 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
12336 Initialize multiple_thread field after successful thread creation.
12337 * cancellation.c (__do_cancel): Move to pthreadP.h.
12338 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
12339 (__pthread_disable_asynccancel): Add internal_function attribute.
12340 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
12341 * pthread_setcancelstate.c: Likewise.
12342 * pthread_setcanceltype.c: Likewise.
12343 * pthread_exit.c: Likewise.
12344 * pthreadP.h (CANCELLATION_P): Likewise.
12345 (__do_cancel): Define as static inline.
12346 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
12347 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
12349 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
12350 fields. Define MULTIPLE_THREADS_OFFSET.
12351 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
12353 * sysdeps/unix/sysv/linux/accept.S: New file.
12354 * sysdeps/unix/sysv/linux/read.c: New file.
12355 * sysdeps/unix/sysv/linux/write.c: New file.
12356 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
12357 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
12358 initialization of __libc_locking_needed.
12359 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
12360 __libc_locking_needed, use multiple_threads field in TCB.
12361 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12363 2002-12-12 Ulrich Drepper <drepper@redhat.com>
12365 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
12367 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
12369 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
12370 access to __libc_locking_needed for PIC.
12372 2002-12-12 Jakub Jelinek <jakub@redhat.com>
12374 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
12375 declare for libc.so.
12376 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
12378 (__libc_lock_lock): Put into statement expression.
12379 (__libc_lock_unlock): Remove trailing semicolon.
12380 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
12382 2002-12-12 Roland McGrath <roland@redhat.com>
12384 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
12385 "m" constraint to refer to __libc_locking_needed. Declare it here.
12387 2002-12-12 Ulrich Drepper <drepper@redhat.com>
12389 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
12390 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
12391 Initialize __libc_locking_needed.
12392 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
12393 instead of __register_pthread_fork_handler.
12394 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
12395 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
12396 fork-gen with libc_pthread_init.
12397 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
12398 of __register_pthread_fork_handler.
12399 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
12400 of __register_pthread_fork_handler.
12401 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
12402 __libc_locking_needed to determine whether lock prefix can be avoided.
12403 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12405 2002-12-11 Ulrich Drepper <drepper@redhat.com>
12407 * Makefile (tests): Add tst-cleanup1.
12408 * tst-cleanup1.c: New file.
12409 * cancellation.c (__cleanup_thread): Removed.
12410 (__do_cancel): Remove call to __cleanup_thread.
12411 * pthreadP.h: Remove __cleanup_thread prorotype.
12413 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
12414 Remember function and argument even if cancellation handler
12415 function is not available.
12416 (__libc_cleanup_region_end): Execute registered function directly if
12417 pthread functions are not available.
12418 (__libc_cleanup_end): Likewise.
12420 * init.c (__pthread_initialize_minimal): Fix initialization in
12421 static lib by preventing gcc from being too clever.
12423 2002-12-10 Ulrich Drepper <drepper@redhat.com>
12425 * init.c (__pthread_initialize_minimal): Remove unneccesary
12428 * Makefile (tests): We can run tst-locale2 now.
12430 2002-12-09 Ulrich Drepper <drepper@redhat.com>
12432 * Versions: Remove duplicated sigwait entry.
12434 2002-12-08 Ulrich Drepper <drepper@redhat.com>
12436 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12439 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12441 * pthreadP.h: Declare __pthread_enable_asynccancel and
12442 __pthread_disable_asynccancel.
12443 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12444 (CANCEL_RESET): Use __pthread_disable_asynccancel.
12445 * cancellation.c (__pthread_enable_asynccancel): New function.
12446 (__pthread_disable_asynccancel): New function.
12447 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12448 * pt-close.c: Likewise.
12449 * pt-connect.c: Likewise.
12450 * pt-creat.c: Likewise.
12451 * pt-fcntl.c: Likewise.
12452 * pt-fsync.c: Likewise.
12453 * pt-lseek.c: Likewise.
12454 * pt-lseek64.c: Likewise.
12455 * pt-msgrcv.c: Likewise.
12456 * pt-msgsnd.c: Likewise.
12457 * pt-msync.c: Likewise.
12458 * pt-nanosleep.c: Likewise.
12459 * pt-open.c: Likewise.
12460 * pt-open64.c: Likewise.
12461 * pt-pause.c: Likewise.
12462 * pt-poll.c: Likewise.
12463 * pt-pread.c: Likewise.
12464 * pt-pread64.c: Likewise.
12465 * pt-pselect.c: Likewise.
12466 * pt-pwrite.c: Likewise.
12467 * pt-pwrite64.c: Likewise.
12468 * pt-read.c: Likewise.
12469 * pt-readv.c: Likewise.
12470 * pt-recv.c: Likewise.
12471 * pt-recvfrom.c: Likewise.
12472 * pt-recvmsg.c: Likewise.
12473 * pt-select.c: Likewise.
12474 * pt-send.c: Likewise.
12475 * pt-sendmsg.c: Likewise.
12476 * pt-sendto.c: Likewise.
12477 * pt-sigpause.c: Likewise.
12478 * pt-sigsuspend.c: Likewise.
12479 * pt-sigtimedwait.c: Likewise.
12480 * pt-sigwait.c: Likewise.
12481 * pt-sigwaitinfo.c: Likewise.
12482 * pt-system.c: Likewise.
12483 * pt-tcdrain.c: Likewise.
12484 * pt-wait.c: Likewise.
12485 * pt-waitid.c: Likewise.
12486 * pt-waitpid.c: Likewise.
12487 * pt-write.c: Likewise.
12488 * pt-writev.c: Likewise.
12489 * pthread_join.c: Likewise.
12490 * pthread_timedjoin.c: Likewise.
12492 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12493 (__xpg_sigpause): New function.
12494 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12496 2002-12-07 Ulrich Drepper <drepper@redhat.com>
12498 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12500 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12501 _GI_pthread_cleanup_pop to pthreadP.h.
12503 * ftrylockfile.c: Use _IO_lock_trylock instead of
12504 pthread_mutex_trylock.
12506 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12507 (CANCEL_RESET): Likewise.
12508 (__pthread_setcanceltype_): Declare.
12509 (__pthread_mutex_lock_internal): Declare.
12510 (__pthread_mutex_unlock_internal): Declare.
12511 (__pthread_once_internal): Declare.
12512 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12513 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12515 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12516 and pthread_mutex_unlock.
12517 * pthread_cond_wait.c: Likewise.
12518 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12519 * pthread_mutex_unlock.c: Likewise.
12521 * pthread_setcanceltype.c: Add additional alias
12522 __pthread_setcanceltype.
12524 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12525 * sem_open.c (sem_open): Likewise.
12526 Use __libc_open, __libc_write, and __libc_close instead of
12527 open, write, and close respectively.
12529 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12530 Rewrite as statement expression since it must return a value.
12532 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12533 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12536 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12537 alias __pthread_once_internal.
12539 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12541 2002-12-06 Ulrich Drepper <drepper@redhat.com>
12543 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12544 * tst-stdio1.c: New file.
12545 * tst-stdio2.c: New file.
12547 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12549 * Makefile (tests): Comment out tst-locale2 for now.
12550 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12552 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12554 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12555 Use _IO_lock_init instead of explicit assignment.
12557 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12558 Define __libc_lock_* and __libc_lock_recursive macros with
12559 lowlevellock macros, not pthread mutexes.
12561 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
12562 of pthread_mutex_lock.
12563 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
12564 instead of pthread_mutex_unlock.
12566 2002-12-06 Roland McGrath <roland@redhat.com>
12568 * allocatestack.c (__stack_user): Use uninitialized defn.
12569 * init.c (__pthread_initialize_minimal): Initialize it here.
12571 2002-12-05 Roland McGrath <roland@redhat.com>
12573 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12575 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12577 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12578 missing & here too.
12580 2002-12-05 Ulrich Drepper <drepper@redhat.com>
12582 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12584 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12585 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12586 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12587 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12588 for __libc_lock_* macros.
12589 * Makefile (routines): Add libc-lowlevellock.
12591 2002-10-09 Roland McGrath <roland@redhat.com>
12593 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12594 Under [__PIC__], call the function via the pointer fetched for
12595 comparison rather than a call by name that uses the PLT.
12596 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12597 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12598 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12599 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12600 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12602 2002-12-04 Roland McGrath <roland@redhat.com>
12604 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12606 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12607 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12609 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12611 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12613 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12614 a completely opaque, non-integer type.
12615 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12617 2002-12-05 Jakub Jelinek <jakub@redhat.com>
12619 * sysdeps/i386/tls.h: Include stdlib.h.
12620 * sysdeps/x86_64/tls.h: Likewise.
12622 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12624 * Makefile (tests): Add tst-locale2.
12625 (tests-static): Likewise.
12626 * tst-locale2.c: New file.
12628 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12629 volatile and add memory clobbers to lock operations.
12631 2002-12-03 Ulrich Drepper <drepper@redhat.com>
12633 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12634 * sysdeps/i386/i486/bits/atomic.h: New file.
12635 * sysdeps/i386/i586/bits/atomic.h: New file.
12636 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12637 include i486 version.
12638 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12639 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12640 Patch by Marijn Ros <marijn@mad.scientist.com>.
12642 * allocatestack.c (get_cached_stack): Don't crash if we first
12643 found a stack with a larger size then needed.
12644 Reported by Hui Huang <hui.huang@sun.com>.
12646 * Makefile (tests): Add tst-sysconf.
12647 * tst-sysconf.c: New file.
12649 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12650 PTHREAD_THREADS_MAX.
12652 2002-12-02 Roland McGrath <roland@redhat.com>
12654 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12655 Declare using hidden_proto instead of attribute_hidden, so there are
12656 non-.hidden static symbols for gdb to find.
12657 (__pthread_keys): Likewise.
12658 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12659 * allocatestack.c (__stack_user): Likewise.
12660 * pthread_create.c (__pthread_keys): Likewise.
12661 (__nptl_threads_events, __nptl_last_event): Make these static instead
12663 * pthread_key_create.c (__pthread_pthread_keys_max,
12664 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12666 2002-12-02 Ulrich Drepper <drepper@redhat.com>
12668 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12670 * tst-locale1.c: New file.
12672 * pthread_cond_timedwait.c: Include <stdlib.h>.
12674 * Makefile (tests): Add tst-fork2 and tst-fork3.
12675 * tst-fork2.c: New file.
12676 * tst-fork3.c: New file.
12678 2002-11-28 Ulrich Drepper <drepper@redhat.com>
12680 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12682 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12683 require it to 200112L.
12685 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12686 instruction only if HAVE_CMOV is defined.
12687 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12689 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12691 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12693 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12695 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12697 2002-11-27 Ulrich Drepper <drepper@redhat.com>
12699 * sysdeps/x86_64/bits/atomic.h: New file.
12701 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12704 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12705 possible since gettid cannot fail.
12707 * sysdeps/x86_64/pthreaddef.h: New file.
12709 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12711 * sysdeps/x86_64/pthread_spin_init.c: New file.
12712 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12713 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12714 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12716 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12717 Add missing lock prefix. Minute optimization.
12719 * tst-spin2.c (main): Also check successful trylock call.
12721 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12722 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12724 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12725 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12727 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12728 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12729 value in case of an error. Add support for INTERNAL_SYSCALL.
12731 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12732 value in case of an error.
12734 * sysdeps/x86_64/tls.h: New file.
12736 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12738 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12739 takes the array member name and the index as parameters.
12740 (THREAD_SETMEM_NC): Likewise.
12741 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12742 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12745 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12746 to decide which code to use.
12747 (THREAD_SETMEM_NC): Likewise.
12749 * allocatestack.c (queue_stack): Don't remove stack from list here.
12750 Do it in the caller. Correct condition to prematurely terminate
12751 loop to free stacks.
12752 (__deallocate_stack): Remove stack from list here.
12754 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12756 * Makefile (tests): Add tst-stack1.
12757 * tst-stack1.c: New file.
12759 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12762 * pthread_attr_getstack.c: Return bottom of the thread area.
12764 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12766 * Makefile (libpthread-routines): Add pt-allocrtsig and
12767 pthread_kill_other_threads.
12768 * pt-allocrtsig.c: New file.
12769 * pthread_kill_other_threads.c: New file.
12770 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12771 all three functions.
12772 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12774 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12775 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12776 and __libc_allocate_rtsig_private.
12777 * Versions (libpthread): Export pthread_kill_other_threads_np,
12778 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12780 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12782 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12783 the end of the stack. Adjust computations.
12784 When mprotect call fails dequeue stack and free it.
12785 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12787 * pthread_getattr_np.c: Likewise.
12789 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12792 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12794 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12795 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12797 2002-11-22 Ulrich Drepper <drepper@redhat.com>
12799 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12800 * pthread_setspecific.c: Likewise.
12802 2002-11-21 Ulrich Drepper <drepper@redhat.com>
12804 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12805 definitions. Get them from the official place.
12806 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12808 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12809 Use new CLONE_ flags in clone() calls.
12811 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12812 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12814 * Versions: Add pthread_* functions for libc.
12815 * forward.c: New file.
12817 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12819 * herrno.c: New file.
12822 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12823 sem_trywait, and sem_timedwait. Add herrno and res.
12824 * sem_init.c: Don't initialize lock and waiters members.
12825 * sem_open.c: Likewise.
12826 * sem_post.c: Removed.
12827 * sem_wait.c: Removed.
12828 * sem_trywait.c: Removed.
12829 * sem_timedwait.c: Removed.
12830 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12831 Includes full implementations of sem_post, sem_wait, sem_trywait,
12833 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12834 for new implementation.
12835 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12836 and waiters fields.
12838 * tst-sem3.c: Improve error message.
12839 * tst-signal3.c: Likewise.
12841 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12842 to tell the kernel about the termination futex and to initialize tid
12843 member. Don't initialize main_thread.
12844 * descr.h (struct pthread): Remove main_thread member.
12845 * cancelllation.c (__do_cancel): Remove code handling main thread.
12846 The main thread is not special anymore.
12848 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12849 size of the stacks to stack_cache_actsize.
12851 * pt-readv.c: Add missing "defined".
12852 * pt-sigwait.c: Likewise.
12853 * pt-writev.c: Likewise.
12855 2002-11-09 Ulrich Drepper <drepper@redhat.com>
12857 * Versions: Export __connect from libpthread.
12858 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12860 * Makefile (libpthread-routines): Add pt-raise.
12861 * sysdeps/unix/sysv/linux/raise.c: New file.
12862 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12863 * sysdeps/generic/pt-raise.c: New file.
12865 * pthread_cond_init.c: Initialize all data elements of the condvar
12866 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12868 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12869 * pthread_create.c: Likewise.
12871 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12872 * tst-key1.c: New file.
12873 * tst-key2.c: New file.
12874 * tst-key3.c: New file.
12876 * Versions: Export pthread_detach for version GLIBC_2.0.
12877 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12879 2002-11-08 Ulrich Drepper <drepper@redhat.com>
12881 * pthread_key_create.c: Terminate search after an unused key was found.
12882 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12884 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12885 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12887 2002-10-10 Ulrich Drepper <drepper@redhat.com>
12889 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12890 dynamic lookup for errno in PIC.
12892 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12893 release the stack lock as soon as possible.
12894 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12895 the static TLS block.
12896 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12898 * cancellation.c: Renamed from cancelation.c.
12899 * Makefile: Adjust accordingly.
12900 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12901 * cleanup_defer.c: Use CANCELLATION_P.
12902 * pthread_testcancel.c: Likewise.
12903 * descr.h: Fix spelling in comments.
12904 * init.c: Likewise.
12905 * pthread_getattr_np.c: Likewise.
12906 * pthread_getschedparam.c: Likewise.
12907 * pthread_setschedparam.c: Likewise.
12908 * Versions: Likewise.
12910 * pt-pselect.c: New file.
12911 * Makefile (libpthread-routines): Add pt-pselect.
12912 * Versions: Add pselect.
12914 * tst-cancel4.c: New file.
12915 * Makefile (tests): Add tst-cancel4.
12917 2002-10-09 Ulrich Drepper <drepper@redhat.com>
12919 * pthread_mutex_lock.c: Always record lock ownership.
12920 * pthread_mutex_timedlock.c: Likewise.
12921 * pthread_mutex_trylock.c: Likewise.
12923 * pt-readv.c: New file.
12924 * pt-writev.c: New file.
12925 * pt-creat.c: New file.
12926 * pt-msgrcv.c: New file.
12927 * pt-msgsnd.c: New file.
12928 * pt-poll.c: New file.
12929 * pt-select.c: New file.
12930 * pt-sigpause.c: New file.
12931 * pt-sigsuspend.c: New file.
12932 * pt-sigwait.c: New file.
12933 * pt-sigwaitinfo.c: New file.
12934 * pt-waitid.c: New file.
12935 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12936 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12937 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12938 * Versions: Add all the new functions.
12940 * tst-exit1.c: New file.
12941 * Makefile (tests): Add tst-exit1.
12943 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12945 2002-10-08 Ulrich Drepper <drepper@redhat.com>
12947 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12949 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12950 call. pthread_join is an official cancellation point.
12951 * pthread_timedjoin.c: Likewise.
12953 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12954 and the condvar's mutex are retrieved.
12955 * pthread_cond_timedwait.c: Likewise.
12956 Reported by dice@saros.East.Sun.COM.
12958 2002-10-07 Ulrich Drepper <drepper@redhat.com>
12960 * pthreadP.h: Cut out all type definitions and move them...
12961 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12962 * pthreadP.h: Include <internaltypes.h>.
12964 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12965 performance tweaks.
12967 * sem_trywait.c: Shuffle #includes around to get right order.
12968 * sem_timedwait.c: Likewise.
12969 * sem_post.c: Likewise.
12970 * sem_wait.c: Likewise.
12972 * nptl 0.3 released.
12974 * Makefile (tests): Add tst-signal3.
12975 * tst-signal3.c: New file.
12977 2002-10-05 Ulrich Drepper <drepper@redhat.com>
12979 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12980 the asms modify the sem object.
12981 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12983 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12984 the actual members.
12985 * pthreadP.h (struct sem): New type. Actual semaphore type.
12986 * semaphoreP.h: Include pthreadP.h.
12987 * sem_getvalue.c: Adjust to sem_t change.
12988 * sem_init.c: Likewise.
12989 * sem_open.c: Likewise.
12990 * sem_post.c: Likewise.
12991 * sem_timedwait.c: Likewise.
12992 * sem_trywait.c: Likewise.
12993 * sem_wait.c: Likewise.
12995 2002-10-04 Ulrich Drepper <drepper@redhat.com>
12997 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12998 * tst-basic2.c: New file.
12999 * tst-exec1.c: New file.
13000 * tst-exec2.c: New file.
13001 * tst-exec3.c: New file.
13003 * tst-fork1.c: Remove extra */.
13005 * nptl 0.2 released. The API for IA-32 is complete.