1 2013-04-04 Siddhesh Poyarekar <siddhesh@redhat.com>
4 * sysdeps/unix/sysv/linux/x86_64/cancellation.S
6 [SHARED && defined DO_VERSIONING && !defined NO_HIDDEN]: Mark
7 __pthread_unwind hidden.
9 2013-03-28 Roland McGrath <roland@hack.frob.com>
11 * pthread_create.c (start_thread) [!SHARED]:
12 Call __call_tls_dtors only if it's not NULL.
14 2013-03-19 Siddhesh Poyarekar <siddhesh@redhat.com>
16 * allocatestack.c (allocate_stack): Use __default_pthread_attr
17 instead of __default_stacksize.
18 * nptl-init.c (__pthread_initialize_minimal_internal):
19 Likewise. Initialize guardsize.
20 * pthreadP.h (__default_pthread_attr): Declare.
21 * pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
22 Use __default_pthread_attr instead of __default_stacksize.
23 * pthread_create.c (default_attr): Remove.
24 (__pthread_create_2_1): Use __default_pthread_attr instead of
26 * vars.c (__default_stacksize): Remove.
27 (__default_pthread_attr): New static variable to store
28 default thread attributes.
30 2013-03-18 Siddhesh Poyarekar <siddhesh@redhat.com>
32 * pthread_barrier_init.c (default_attr): Rename to
34 (pthread_barrier_init): Adjust for the rename.
35 * pthread_mutex_init.c (default_attr): Rename to
37 (__pthread_mutex_init): Adjust for the rename.
38 * pthread_rwlock_init.c (default_attr): Rebane to
40 (__pthread_rwlock_init): Adjust for the rename.
42 2013-03-12 Carlos O'Donell <carlos@redhat.com>
44 * sysdeps/unix/sysv/linux/lowlevellock.c: Include <atomic.h>.
46 2013-03-04 Roland McGrath <roland@hack.frob.com>
48 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h:
49 Change multiple inclusion guard to _LINUX_I686_DL_SYSDEP_H.
51 (HAVE_DL_DISCOVER_OSVERSION): Remove definition, now redundant.
52 (RTLD_PRIVATE_ERRNO): Likewise.
53 (NEED_DL_SYSINFO, DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION):
54 Move macros and associated declaration to ...
55 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: ... here.
56 Change multiple include guard to _LINUX_I386_DL_SYSDEP_H.
59 2013-03-01 Carlos O'Donell <carlos@redhat.com>
61 * Makefile (tests): Revert last change.
62 (tst-pthread-stack-env-ENV): Likewise.
63 * nptl-init.c (set_default_stacksize): Likewise.
64 (__pthread_initialize_minimal_internal): Likewise.
65 * tst-pthread-stack-env.c: Likewise.
67 2013-03-01 Siddhesh Poyarekar <siddhesh@redhat.com>
69 * tst-oddstacklimit.c: Include stdlib.h.
71 * Makefile (tests): Add tst-pthread-stack-env.
72 (tst-pthread-stack-env-ENV): Set environment for test.
73 * nptl-init.c (set_default_stacksize): New function.
74 (__pthread_initialize_minimal_internal): Accept ARGC, ARGV and
75 ENVP. Initialize __ENVIRON and set __DEFAULT_STACKSIZE.
76 * tst-pthread-stack-env.c: New test case.
78 2013-02-21 David S. Miller <davem@davemloft.net>
80 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
81 (FUTEX_WAIT_REQUEUE_PI): Define.
82 (FUTEX_CMP_REQUEUE_PI): Likewise.
83 (lll_futex_wait_requeue_pi): Likewise.
84 (lll_futex_timed_wait_requeue_pi): Likewise.
85 (lll_futex_cmp_requeue_pi): Likewise.
87 2013-02-21 Carlos O'Donell <carlos@redhat.com>
89 * sysdeps/unix/sysv/linux/fork.c: Fix comment typo.
91 2013-02-18 Siddhesh Poyarekar <siddhesh@redhat.com>
93 * sysdeps/pthread/tst-timer.c: Include stdlib.h for declaration
95 * tst-barrier4.c: Likewise.
96 * tst-robust7.c: Likewise.
99 * pthreadP.h (USE_REQUEUE_PI): New macro to check if mutex is
101 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Use
102 PI-aware futex operations if available and mutex is PI-aware.
103 * pthread_cond_signal.c (__pthread_cond_signal): Likewise.
104 * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait):
106 * pthread_cond_wait.c (__condvar_cleanup): Adjust lock if
107 cancellation occurred just after futex returned successfully
108 from a PI operation with the mutex held.
109 (__pthread_cond_wait): Use PI-aware futex operations if
110 available and mutex is PI-aware.
111 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
112 (FUTEX_WAIT_REQUEUE_PI): Define.
113 (FUTEX_CMP_REQUEUE_PI): Likewise.
114 (lll_futex_wait_requeue_pi): Likewise.
115 (lll_futex_timed_wait_requeue_pi): Likewise.
116 (lll_futex_cmp_requeue_pi): Likewise.
117 * nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
118 (FUTEX_WAIT_REQUEUE_PI): Define.
119 (FUTEX_CMP_REQUEUE_PI): Likewise.
120 (lll_futex_wait_requeue_pi): Likewise.
121 (lll_futex_timed_wait_requeue_pi): Likewise.
122 (lll_futex_cmp_requeue_pi): Likewise.
123 * sysdeps/unix/sysv/linux/kernel-features.h: Define
124 __ASSUME_REQUEUE_PI for Linux version higher than 2.6.31.
126 2013-02-04 Andreas Schwab <schwab@suse.de>
129 * tst-cancel14.c: Include <sys/time.h>.
130 * tst-cancel15.c: Likewise.
131 * tst-mutex9.c: Include <stdint.h>, <stdlib.h> and <sys/time.h>.
132 * tst-stackguard1.c: Include <tls.h>
134 2013-01-16 Andreas Schwab <schwab@suse.de>
137 * sem_open.c (sem_open): Use __mktemp instead of mktemp.
139 2013-01-11 Carlos O'Donell <codonell@redhat.com>
141 * allocatestack.c (allocate_stack): Add comment. Remove assert
144 2013-01-11 H.J. Lu <hongjiu.lu@intel.com>
146 * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd)
147 with $(host-test-program-cmd).
148 (tst-exec4-ARGS): Likewise.
149 (tst-stackguard1-ARGS): Likewise.
150 ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh.
151 Replace $(rtld-installed-name) with $(test-via-rtld-prefix).
152 * tst-tls6.sh (elf_objpfx): Removed.
153 (rtld_installed_name): Renamed to ...
154 (test_via_rtld_prefix): This.
155 (tst_tls5): Prepend ${test_via_rtld_prefix}.
157 2013-01-02 Joseph Myers <joseph@codesourcery.com>
159 * All files with FSF copyright notices: Update copyright dates
160 using scripts/update-copyrights.
162 2013-01-01 Joseph Myers <joseph@codesourcery.com>
164 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat
167 2012-12-28 Andi Kleen <ak@linux.intel.com>
169 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert
171 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
174 2012-12-27 David S. Miller <davem@davemloft.net>
176 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
177 (lll_futex_timed_wait_bitset): New macro.
179 2012-12-27 Siddhesh Poyarekar <siddhesh@redhat.com>
181 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
183 (lll_futex_timed_wait): Replace assembly code with
185 (lll_futex_timed_wait_bitset): Likewise.
186 (lll_futex_wake): Likewise.
187 (lll_futex_requeue): Likewise.
188 (lll_futex_wake_unlock): Likewise.
190 2012-12-08 Siddhesh Poyarekar <siddhesh@redhat.com>
192 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
193 Declare LOCAL_VAR as char.
195 2012-12-04 Joseph Myers <joseph@codesourcery.com>
197 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
198 Cast result of atomic_increment_val to (void) instead of storing
199 in otherwise-unused variable.
201 2012-12-03 Allan McRae <allan@archlinux.org>
203 * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
205 2012-11-26 H.J. Lu <hongjiu.lu@intel.com>
207 * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
209 * sysdeps/i386/tls.h: Include <libc-internal.h>.
210 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
211 (THREAD_SETMEM_NC): Likewise.
212 * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
213 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
214 (THREAD_SETMEM_NC): Likewise.
216 2012-11-21 Joseph Myers <joseph@codesourcery.com>
218 * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
219 of atomic_increment_val to (void) instead of storing in
220 otherwise-unused variable.
222 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
223 [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
224 instead of storing in otherwise-unused variable.
226 2012-11-14 Marcus Shawcroft <marcus.shawcroft@linaro.org>
228 * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
229 (CFLAGS-recv.c, CFLAGS-send.c): Define.
231 2012-11-06 Chris Metcalf <cmetcalf@tilera.com>
233 * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
234 * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
236 2012-11-05 Siddhesh Poyarekar <siddhesh@redhat.com>
238 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
239 if absolute timeout is negative.
240 [__ASSUME_FUTEX_CLOCK_REALTIME &&
241 lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
242 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
244 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
246 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
247 (__lll_robust_timedlock_wait): Likewise.
248 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
249 (lll_futex_timed_wait_bitset): New macro.
250 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
251 (lll_futex_timed_wait_bitset): Likewise.
253 2012-11-03 David S. Miller <davem@davemloft.net>
255 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
257 (__cpu_relax): Likewise.
259 2012-11-02 H.J. Lu <hongjiu.lu@intel.com>
261 * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
262 (__128bits): New struct typedef.
263 (tcbhead_t): Replace __m128 with __128bits.
265 2012-10-30 Aurelien Jarno <aurelien@aurel32.net>
266 Joseph Myers <joseph@codesourcery.com>
268 * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
270 2012-10-28 David S. Miller <davem@davemloft.net>
272 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
273 Define when we have v9 instructions available.
274 * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
275 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
277 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
279 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
280 to libpthread-routines.
282 2012-10-25 Roland McGrath <roland@hack.frob.com>
284 * tst-cond-except.c (TEST_FUNCTION): New macro.
286 2012-10-25 Joseph Myers <joseph@codesourcery.com>
288 * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
290 * tst-tls6.sh: Use /bin/bash not /bin/sh.
292 2012-10-25 Roland McGrath <roland@hack.frob.com>
294 * tst-basic2.c (do_test): Return RESULT, not always zero.
296 * tst-cond25.c: Include <stdint.h>
297 (waiter): Add casts to uintptr_t between casting integer<->pointer.
298 (timed_waiter): Likewise.
299 (do_test_wait): Likewise.
300 * tst-cond-except.c (thr): Likewise.
301 (do_test): Use prototype definition.
303 2012-10-24 Joseph Myers <joseph@codesourcery.com>
304 Jim Blandy <jimb@codesourcery.com>
306 * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
308 * tst-tls6.sh (test_wrapper_env): New variable. Use it to run
309 programs with LD_PRELOAD set.
311 2012-10-24 Roland McGrath <roland@hack.frob.com>
313 * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
314 ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
315 ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
316 ($(objpfx)tst-rwlock14): Likewise.
318 2012-10-24 Joseph Myers <joseph@codesourcery.com>
320 * Makefile (tests): Remove tst-oddstacklimit.
321 (test-srcs): New variable.
322 (tst-oddstacklimit-ENV): Remove.
323 [$(run-built-tests) = yes] (tests): Depend on
324 $(objpfx)tst-oddstacklimit.out.
325 [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
327 * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
328 setrlimit before executing tst-basic1 test passed to --command.
330 2012-10-23 Joseph Myers <joseph@codesourcery.com>
332 * Makefile [$(cross-compiling) = no]: Change condition to
333 [$(run-built-tests) = yes].
335 2012-10-23 Jim Blandy <jimb@codesourcery.com>
336 Joseph Myers <joseph@codesourcery.com>
338 * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
339 (tst-exec4-ARGS): Likewise.
340 (tst-stackguard1-ARGS): Likewise.
342 2012-10-21 Jim Blandy <jimb@codesourcery.com>
343 Joseph Myers <joseph@codesourcery.com>
345 * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
346 tst-cancel-wrappers.sh.
347 * tst-cancel-wrappers.sh: Use nm program given as first argument,
350 2012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
352 * tst-cond25.c (do_test_wait): Don't check for return value from
355 2012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
358 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
359 (__condvar_tw_cleanup): Adjust the mutex data structure if it
360 was locked by FUTEX_WAIT_REQUEUE_PI.
361 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
362 (__condvar_w_cleanup): Likewise.
363 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
364 (__condvar_cleanup2): Likewise.
365 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
366 (__condvar_cleanup1): Likewise.
368 2012-10-10 Carlos O'Donell <carlos@systemhalted.org>
370 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
371 defined __EXCEPTIONS) && defined __USE_GNU]
372 (pthread_cleanup_push_defer_np): Fix formatting.
374 2012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
377 * Makefile (tests): New test case tst-cond25.
378 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
379 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
380 (__condvar_tw_cleanup): Lock mutex only if we don't already
382 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
383 (__condvar_w_cleanup): Likewise.
384 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
385 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
386 (__condvar_cleanup2): Lock mutex only if we don't already
388 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
389 (__condvar_cleanup1): Likewise.
390 * tst-cond25.c: New test case.
392 2012-10-09 Roland McGrath <roland@hack.frob.com>
394 * sysdeps/pthread/configure: Regenerated.
395 * sysdeps/x86_64/configure: Regenerated.
397 2012-10-05 David S. Miller <davem@davemloft.net>
400 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
401 (DB_THREAD_SELF): Use constants for the register offsets. Correct
402 the case of a 64-bit debugger with a 32-bit inferior.
404 2012-10-05 H.J. Lu <hongjiu.lu@intel.com>
407 * Makefile (tests-static): Add tst-cancel24-static,
408 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
409 tst-sem11-static and tst-sem12-static.
411 (LDLIBS-tst-cancel24-static): New macro.
412 * tst-cancel24-static.cc: New file.
413 * tst-cond8-static.c: Likewise.
414 * tst-mutex8-static.c: Likewise.
415 * tst-mutexpi8-static.c: Likewise.
416 * tst-sem11-static.c: Likewise.
417 * tst-sem12-static.c: Likewise.
419 2012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
422 * Makefile (tests): New test case tst-cond24.
423 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
424 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
425 (__pthread_cond_timedwait): Unlock mutex before going back to
427 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
428 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
429 return from futex_wait.
430 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
431 (__pthread_cond_timedwait): Unlock mutex before going back to
432 wait in PI case. Set requeue_pi flag only if wait returned 0.
433 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
434 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
435 return from futex_wait.
436 * tst-cond24.c: New test case.
438 2012-10-04 Roland McGrath <roland@hack.frob.com>
440 * pthread_create.c (start_thread): Use __madvise, not madvise.
442 2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
444 * sysdeps/i386/tls.h: Update copyright years.
446 2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
448 * pthread_create.c (start_thread): Fix clone flag name in
449 comment to CLONE_CHILD_CLEARTID.
450 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
451 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
452 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
453 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
454 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
455 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
457 2012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
460 * Makefile (tests): Add tst-cond-except.
461 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
462 (__pthread_cond_timedwait): Mark instructions where %ebx is
463 incremented in PI case.
464 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
465 for the marked PI case instructions.
466 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
467 (__pthread_cond_wait): Mark instructions where %ebx is
468 incremented in PI case.
469 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
470 for the marked PI case instructions.
471 * tst-cond-except.c: New test case.
473 2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
475 * tst-tls6.sh: Add "set -e".
476 * Makefile: Do not specify -e option when running testsuite
479 * tst-tls6.sh: Add copyright header.
481 2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
483 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
484 to uint64_t for 64-bit store.
485 (THREAD_SETMEM_NC): Likewise.
487 2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
489 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
491 (THREAD_SETMEM_NC): Likewise.
493 2012-09-14 Jeff Law <law@redhat.com>
496 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
498 2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
501 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
504 2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
506 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
507 (LDLIBS-tst-cancel24): This.
509 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
512 * Makefile (tests-static): Add tst-cancel21-static.
514 * tst-cancel21-static.c: New file.
516 2012-09-01 Joseph Myers <joseph@codesourcery.com>
518 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
519 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
520 [__NR_clock_getres]: Make code unconditional.
521 (pthread_getcpuclockid): Remove code left unreachable by removal
524 2012-08-31 Joseph Myers <joseph@codesourcery.com>
527 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
528 atomic_compare_and_exchange_bool_rel.
529 * tst-sem14.c: New file.
530 * Makefile (tests): Add tst-sem14.
532 2012-08-15 Roland McGrath <roland@hack.frob.com>
534 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
536 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
537 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
539 2012-08-16 Joseph Myers <joseph@codesourcery.com>
541 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
542 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
543 * pthread_condattr_setclock.c (pthread_condattr_setclock)
544 [!__ASSUME_POSIX_TIMERS]: Likewise.
545 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
546 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
547 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
548 [!__ASSUME_POSIX_TIMERS]: Likewise.
549 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
550 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
551 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
553 [!__NR-timer_create]: Remove conditional code.
554 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
555 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
557 [!__NR_timer_delete]: Remove conditional code.
558 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
559 * sysdeps/unix/sysv/linux/timer_getoverr.c
560 [__NR_timer_getoverrun]: Make code unconditional.
561 [!__NR_timer_getoverrun]: Remove conditional code.
562 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
563 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
564 Make code unconditional.
565 [!__NR_timer_gettime]: Remove conditional code.
566 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
567 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
568 Make code unconditional.
569 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
570 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
571 Make code unconditional.
572 [!__NR_timer_settime]: Remove conditional code.
573 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
574 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
575 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
578 2012-08-15 Tom de Vries <vries@codesourcery.com>
579 Maxim Kuvyrkov <maxim@codesourcery.com>
581 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
582 (__libc_lock_trylock): Allow pre-existing definitions.
584 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
586 * pthread_spin_lock.c: New file.
587 * pthread_spin_trylock.c: New file.
589 2012-08-08 Joseph Myers <joseph@codesourcery.com>
591 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
593 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
594 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
596 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
597 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
598 Make code unconditional.
599 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
600 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
601 __NR_tgkill]: Make code unconditional.
602 (raise) [__ASSUME_TGKILL]: Likewise.
603 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
604 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
605 [__ASSUME_TGKILL]: Make code unconditional.
606 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
607 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
608 __NR_tgkill]: Make code unconditional.
609 (raise) [__ASSUME_TGKILL]: Likewise.
610 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
612 2012-08-07 Joseph Myers <joseph@codesourcery.com>
614 * sysdeps/pthread/createthread.c (create_thread)
615 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
617 2012-08-03 Joseph Myers <joseph@codesourcery.com>
619 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
621 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
623 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
625 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
626 (pagesize): New static variable.
627 (allocate_and_test): Return MEM. Rename parameter to TARGET.
628 (check_stack_top): New local variables MEM and PAGEMASK. Cap
629 stack size to MAX_STACK_SIZE. Call allocate_and_test for
630 halfway up the stack top page. Verify that the top page was
632 (do_test): Get pagesize using sysconf.
634 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
636 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
638 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
639 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
642 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
644 * tst-pthread-getattr.c: Revert last change.
646 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
648 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
651 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
653 (check_stack_top): Read valued written into STACKADDR in
654 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
656 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
658 * nptl-init.c (sighandler_setxid): Fix the comment that
661 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
663 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
664 (__lll_robust_timedlock_wait): Simplify CFI directives.
666 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
669 * Makefile (tests): Add test case.
670 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
671 the __libc_stack_end page from stacksize. Truncate stacksize to
672 make it page aligned when it is computed from RLIMIT_STACK.
673 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
676 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
679 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
682 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
683 Jakub Jelinek <jakub@redhat.com>
686 * sysdeps/pthread/pthread.h
687 [!(defined __GNUC__ && defined __EXCEPTIONS)]
688 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
689 __libc_unlikely instead of __builtin_expect.
691 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
694 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
695 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
696 * sysdeps/unix/sysv/linux/i386/Implies: New file.
697 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
698 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
700 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
701 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
703 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
705 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
708 * nptl-init.c (pthread_functions): Remove use of INTUSE and
710 (__pthread_initialize_minimal_internal): Likewise.
711 * sem_open.c: Likewise.
712 * sem_unlink.c: Likewise.
713 * pthreadP.h: Replace _internal aliases by hidden_proto
715 * pthread_getspecific.c: Replace _internal alias by hidden_def.
716 * pthread_key_create.c: Likewise.
717 * pthread_mutex_destroy.c: Likewise.
718 * pthread_mutex_init.c: Likewise.
719 * pthread_mutex_lock.c: Likewise.
720 * pthread_mutex_unlock.c: Likewise.
721 * pthread_once.c: Likewise.
722 * pthread_rwlock_rdlock.c: Likewise.
723 * pthread_rwlock_unlock.c: Likewise.
724 * pthread_rwlock_wrlock.c: Likewise.
725 * pthread_setspecific.c: Likewise.
726 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
728 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
730 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
732 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
733 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
734 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
735 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
736 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
737 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
738 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
739 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
740 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
741 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
743 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
745 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
748 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
750 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
751 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
753 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
754 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
756 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
757 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
758 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
759 (pthread_barrier_wait): Likewise.
760 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
761 (__pthread_cond_broadcast): Likewise.
762 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
763 (__pthread_cond_signal): Likewise.
764 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
765 (__pthread_cond_timedwait): Likewise.
766 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
768 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
769 (__pthread_rwlock_rdlock): Likewise.
770 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
771 (pthread_rwlock_timedrdlock): Likewise.
772 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
773 (pthread_rwlock_timedwrlock): Likewise.
774 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
775 (__pthread_rwlock_unlock): Likewise.
776 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
777 (__pthread_rwlock_wrlock): Likewise.
778 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
779 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
780 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
782 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
784 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
787 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
788 __libc_stack_end rounded to the end of containing page as the
791 2012-05-25 Rayson Ho <rho@redhat.com>
793 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
795 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
796 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
797 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
798 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
799 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
800 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
801 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
802 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
804 2012-05-25 Rayson Ho <rho@redhat.com>
805 Roland McGrath <roland@hack.frob.com>
807 * DESIGN-systemtap-probes.txt: New file.
808 * pthread_cond_broadcast.c: SystemTap probes.
809 * pthread_cond_init.c: Likewise.
810 * pthread_cond_signal.c: Likewise.
811 * pthread_cond_wait.c: Likewise.
812 * pthread_cond_destroy.c: Likewise.
813 * pthread_create.c: Likewise.
814 * pthread_join.c: Likewise.
815 * pthread_mutex_destroy.c: Likewise.
816 * pthread_mutex_init.c: Likewise.
817 * pthread_mutex_lock.c: Likewise.
818 * pthread_mutex_timedlock.c: Likewise.
819 * pthread_mutex_unlock.c: Likewise.
820 * pthread_rwlock_destroy.c: Likewise.
821 * pthread_rwlock_rdlock.c: Likewise.
822 * pthread_rwlock_unlock.c: Likewise.
823 * pthread_rwlock_wrlock.c: Likewise.
824 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
825 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
826 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
827 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
828 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
829 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
830 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
831 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
833 2012-05-24 Roland McGrath <roland@hack.frob.com>
835 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
837 2012-05-17 Andreas Jaeger <aj@suse.de>
839 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
840 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
841 only for older kernels.
843 2012-05-15 Joseph Myers <joseph@codesourcery.com>
845 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
848 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
850 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
851 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
852 (lll_robust_lock): Likewise.
853 (lll_cond_lock): Likewise.
854 (lll_robust_cond_lock): Likewise.
855 (lll_timedlock): Likewise.
856 (lll_robust_timedlock): Likewise.
857 (lll_unlock): Likewise.
858 (lll_robust_unlock): Likewise.
860 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
862 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
863 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
865 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
867 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
869 (__gcc_personality_v0): Replace 8-byte data alignment with
870 LP_SIZE alignment and .quad with ASM_ADDR.
872 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
874 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
876 (__gcc_personality_v0): Replace 8-byte data alignment with
877 LP_SIZE alignment and .quad with ASM_ADDR.
879 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
881 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
882 NWAITERS, which is unsigned long int.
884 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
886 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
887 (__gcc_personality_v0): Replace 8-byte data alignment with
888 LP_SIZE alignment and .quad with ASM_ADDR.
890 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
892 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
893 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
894 __vdso_clock_gettime pointer into RAX_LP.
895 (__gcc_personality_v0): Replace 8-byte data alignment with
896 LP_SIZE alignment and .quad with ASM_ADDR.
898 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
900 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
901 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
902 __vdso_clock_gettime pointer into RAX_LP.
903 (__gcc_personality_v0): Replace 8-byte data alignment with
904 LP_SIZE alignment and .quad with ASM_ADDR.
906 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
908 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
909 LP_OP(cmp) and R8_LP on dep_mutex pointer.
911 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
913 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
914 to update pointer in memory. Load pointer into RDI_LP.
916 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
918 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
919 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
921 (LLL_STUB_UNWIND_INFO_END): Likewise.
922 (lll_timedlock): Load timeout pointer into RDX_LP.
923 (lll_robust_timedlock): Likewise.
925 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
926 Jakub Jelinek <jakub@redhat.com>
929 * Makefile (tests): Add test cases.
930 * descr.h (struct pthread): Add a comment describing multiple_threads.
931 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
933 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
934 before setting cancelstate of the thread.
935 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
936 (__libc_multiple_threads): Add explanatory comment.
937 * tst-cancel-self-cancelstate.c: New test case.
938 * tst-cancel-self-canceltype.c: Likewise.
939 * tst-cancel-self-cleanup.c: Supporting file for test cases.
940 * tst-cancel-self-testcancel.c: New test case.
941 * tst-cancel-self.c: Likewise.
942 * vars.c: Expand comment to include single-process case.
944 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
946 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
947 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
950 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
952 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
954 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
955 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
957 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
959 * shlib-versions: Move x86_64-.*-linux.* entry to ...
960 * sysdeps/x86_64/64/shlib-versions: Here. New file.
961 * sysdeps/x86_64/x32/shlib-versions: New file.
963 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
965 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
966 __SIZEOF_PTHREAD_XXX_T.
967 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
968 (pthread_mutex_t): Likewise.
969 (pthread_rwlock_t): Likewise.
970 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
973 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
975 * sysdeps/x86_64/x32/tls.h: New file.
977 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
979 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
981 (THREAD_SETMEM_NC): Likewise.
983 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
985 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
988 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
990 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
991 (__cleanup_fct_attribute): Check __x86_64__ instead of
994 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
996 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
997 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
998 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
999 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1000 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1002 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1004 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
1005 instead of __WORDSIZE.
1007 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
1010 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
1012 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
1014 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1015 (__pthread_cond_timedwait): Use CFI directives.
1016 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1017 (__pthread_cond_wait): Likewise.
1018 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1019 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1021 2012-05-03 David S. Miller <davem@davemloft.net>
1023 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
1024 always have to return 0, especially for the pthread_spin_init
1026 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
1028 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
1029 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
1031 2012-05-02 David S. Miller <davem@davemloft.net>
1033 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
1034 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
1035 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
1036 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
1037 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
1038 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
1039 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
1040 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
1041 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
1042 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
1043 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
1044 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
1045 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
1046 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
1047 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
1048 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
1049 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
1050 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
1052 2012-05-02 Allan McRae <allan@archlinux.org>
1054 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
1055 (LDFLAGS-tst-cancel24): Likewise.
1057 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
1059 * sysdeps/i386/pthread_spin_lock.S: New.
1060 * sysdeps/i386/pthread_spin_lock.c: Delete.
1061 * sysdeps/x86_64/pthread_spin_lock.S: New.
1062 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
1064 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
1066 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
1067 run when cross-compiling.
1069 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
1071 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
1072 instead of libgcc_s.h.
1074 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
1076 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
1078 2012-03-27 David S. Miller <davem@davemloft.net>
1080 * tst-cond16.c (do_test): Use a thread stack size which is either
1081 PTHREAD_STACK_MIN or the page size, whichever is larger.
1082 * tst-cond18.c (do_test): Likewise.
1084 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1086 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
1087 register char * __asm__("rsp") to get stack frame.
1089 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1091 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
1092 __NR_futex directly.
1094 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1096 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
1099 2012-03-16 David S. Miller <davem@davemloft.net>
1102 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
1104 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
1107 2012-03-15 David S. Miller <davem@davemloft.net>
1110 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
1112 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
1115 * pt-crti.S: Replace FSF snail mail address with URL.
1117 2012-03-09 Joseph Myers <joseph@codesourcery.com>
1119 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
1120 Do not define before including <time.h>.
1122 2012-03-08 David S. Miller <davem@davemloft.net>
1124 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
1126 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
1128 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1129 Check for timestamp before the Epoch.
1131 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
1134 * tst-sem13.c (do_test): Add another test case.
1135 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1136 Fix updating nwaiters.
1138 2012-03-07 Joseph Myers <joseph@codesourcery.com>
1141 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
1142 link test to a compile test.
1143 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
1145 * sysdeps/pthread/configure: Regenerated.
1147 2012-03-07 Ulrich Drepper <drepper@gmail.com>
1149 * Makefile (distribute): Remove variable.
1151 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
1153 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
1154 superfluous assignment.
1155 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
1157 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1158 (sem_timedwait): Likewise.
1160 2012-03-06 Ulrich Drepper <drepper@gmail.com>
1162 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
1163 installed headers to...
1164 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
1166 2012-03-06 David S. Miller <davem@davemloft.net>
1168 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
1169 atomic_increment and remove unused local variable.
1170 (__old_sem_post): Likewise.
1172 2012-02-27 David S. Miller <davem@davemloft.net>
1174 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
1175 non-existing __pthread_attr.
1176 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1177 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1178 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1179 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1180 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1182 2012-02-26 Ulrich Drepper <drepper@gmail.com>
1184 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
1186 * sysdeps/pthread/pthread.h: Define __need_timespec before including
1188 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1190 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1191 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1192 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1193 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1194 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1196 2012-02-21 Joseph Myers <joseph@codesourcery.com>
1199 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1201 [crti.S not in sysdirs] (omit-deps): Do not append.
1202 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1203 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1204 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1205 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1206 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1207 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1208 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1209 [crti.S in sysdirs] (extra-objs): Append unconditionally.
1210 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1212 * sysdeps/pthread/pt-initfini.c: Remove file.
1214 2012-02-16 Richard Henderson <rth@twiddle.net>
1216 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1217 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1219 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1221 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1223 2012-02-16 David S. Miller <davem@davemloft.net>
1225 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1227 2012-02-15 Marek Polacek <polacek@redhat.com>
1229 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1231 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
1233 Replace FSF snail mail address with URLs, as per GNU coding standards.
1235 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
1237 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1239 2012-02-08 Joseph Myers <joseph@codesourcery.com>
1241 Support crti.S and crtn.S provided directly by architectures.
1242 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1243 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1244 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1245 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1246 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1247 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1248 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1249 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1250 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1251 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1252 * pt-crti.S: New file.
1253 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1255 2012-02-03 Joseph Myers <joseph@codesourcery.com>
1257 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1258 macros for PIC register setup.
1259 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1260 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1261 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1262 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1263 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1265 2012-01-11 Marek Polacek <polacek@redhat.com>
1267 * forward.c (FORWARD_NORETURN): Define macro.
1268 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1269 (__pthread_exit): Likewise.
1271 2012-01-10 Ulrich Drepper <drepper@gmail.com>
1273 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1275 * pthreadP.h: Add noreturn to __pthread_exit.
1276 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1278 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
1280 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1281 Call pthread_attr_setstacksize() with result of
1282 __pthread_get_minstack() to account for application TLS usage.
1284 2012-01-08 Marek Polacek <polacek@redhat.com>
1286 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1288 2012-01-07 Ulrich Drepper <drepper@gmail.com>
1291 * pthreadP.h: Use const instead of __const.
1292 * semaphore.h: Likewise.
1293 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1294 * sysdeps/pthread/bits/sigthread.h: Likewise.
1295 * sysdeps/pthread/pthread.h: Likewise.
1297 * Makefile: Remove elf=yes test, only ELF is supported.
1299 * shlib-versions: Remove entries for ports architectures.
1301 In case anyone cares, the IA-64 architecture could move to ports.
1302 * sysdeps/ia64/*: Removed.
1303 * sysdeps/unix/sysv/linux/ia64/*: Removed.
1305 2011-12-22 Ulrich Drepper <drepper@gmail.com>
1307 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1308 __pthread_get_minstack.
1309 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1312 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1313 through __pthread_get_minstack.
1314 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1315 directly from _rtld_global_ro.
1316 (__pthread_get_minstack): New function.
1317 * pthreadP.h: Declare __pthread_get_minstack.
1318 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1320 2011-12-21 Ulrich Drepper <drepper@gmail.com>
1323 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1324 Correct reading name from file.
1326 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
1328 * allocatestack.c (allocate_stack): Return errno on failure.
1330 2011-12-14 Jeff Law <law@redhat.com>
1333 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1335 2011-11-28 Andreas Schwab <schwab@redhat.com>
1337 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1338 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1339 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1341 2011-11-15 Ulrich Drepper <drepper@gmail.com>
1343 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1346 2011-10-29 Ulrich Drepper <drepper@gmail.com>
1349 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1350 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1351 path for kernels with FUTEX_CLOCK_REALTIME.
1352 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1354 2011-10-27 Andreas Schwab <schwab@redhat.com>
1357 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1358 for memory synchronization functions.
1359 * semaphore.h: Likewise.
1361 2011-10-24 Ulrich Drepper <drepper@gmail.com>
1363 * tst-cancel7.c: Avoid warning.
1364 * tst-mutex6.c: Likewise.
1365 * tst-mutex9.c: Likewise.
1366 * tst-mutexpi6.c: Likewise.
1368 2011-10-23 Ulrich Drepper <drepper@gmail.com>
1370 * sysdeps/i386/tls.h: Remove #include <list.h>.
1372 2011-10-15 Ulrich Drepper <drepper@gmail.com>
1374 * pthread_create.c (start_thread): Call __ctype_init.
1376 2011-09-15 Andreas Schwab <schwab@redhat.com>
1378 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1380 (list_add): Add atomic_write_barrier.
1381 * descr.h: Define __need_list_t before including <list.h>.
1382 * nptl-init.c: Include <list.h>
1383 * allocatestack.c: Likewise.
1385 2011-09-11 Ulrich Drepper <drepper@gmail.com>
1387 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1388 * sysdeps/ia64/tls.h: Likewise.
1389 * sysdeps/powerpc/tls.h: Likewise.
1390 * sysdeps/s390/tls.h: Likewise.
1391 * sysdeps/sh/tls.h: Likewise.
1392 * sysdeps/sparc/tls.h: Likewise.
1393 * sysdeps/x86_64/tls.h: Likewise.
1395 2011-09-10 Ulrich Drepper <drepper@gmail.com>
1397 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1399 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1401 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1402 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1403 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1404 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1405 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1406 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1407 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1408 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1409 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1410 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1411 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1412 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1414 * tst-tls1.c: Support for __thread is now mandatory.
1415 * tst-tls2.c: Likewise.
1416 * tst-tls3.c: Likewise.
1417 * tst-tls3mod.c: Likewise.
1418 * tst-tls4.c: Likewise.
1419 * tst-tls4moda.c: Likewise.
1420 * tst-tls4modb.c: Likewise.
1421 * tst-tls5.h: Likewise.
1423 2011-09-08 Ulrich Drepper <drepper@gmail.com>
1426 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1427 (pthread_rwlock_timedwrlock): Use correct macro in test.
1428 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1430 2011-09-06 Ulrich Drepper <drepper@gmail.com>
1432 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1433 use gettimeofday vsyscall, just call gettimeofday.
1434 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1435 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1436 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1438 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1440 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1441 Simplify __vdso_clock_gettime use.
1443 2011-09-05 David S. Miller <davem@davemloft.net>
1445 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1447 (sem_timedwait): Call it to force an exception region around
1448 the async cancel enable and the futex operation.
1449 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1450 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1451 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1452 (__new_sem_wait): Call it to force an exception region around
1453 the async cancel enable and the futex operation.
1454 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1455 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1457 2011-08-31 Andreas Schwab <schwab@redhat.com>
1459 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1462 2011-08-20 David S. Miller <davem@davemloft.net>
1464 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1466 2011-08-14 Roland McGrath <roland@hack.frob.com>
1468 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1469 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1471 2011-08-08 Andreas Schwab <schwab@redhat.com>
1473 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1475 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1476 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1478 2011-07-22 Ulrich Drepper <drepper@gmail.com>
1480 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1482 (__gcc_personality_v0): Likewise.
1483 (_Unwind_ForcedUnwind): Likewise.
1484 (_Unwind_GetCFA): Likewise.
1486 2011-07-14 Roland McGrath <roland@hack.frob.com>
1488 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1491 2011-06-30 Ulrich Drepper <drepper@gmail.com>
1493 * nptl-init.c (__nptl_set_robust): New function.
1494 (pthread_functions): Add reference.
1495 * npthreadP.h: Declare __nptl_set_robust.
1496 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1497 ptr_set_robust member.
1498 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1499 child if threads are used.
1501 2011-06-14 Andreas Jaeger <aj@suse.de>
1503 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1505 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1508 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1510 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1513 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1515 Patch partly by Robert Rex <robert.rex@exasol.com>.
1517 2011-01-19 Roland McGrath <roland@redhat.com>
1519 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1520 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1521 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1522 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1523 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1524 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1526 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1528 * Makefile (test-extras): Add tst-cleanup4aux.
1530 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1533 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1534 (__SETXID_2): Likewise.
1535 (__SETXID_3): Likewise.
1537 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1540 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1541 * alloca_cutoff.c: Add libc_hidden_def.
1543 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1546 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1547 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1548 of "struct pthread".
1550 2010-09-21 Andreas Schwab <schwab@redhat.com>
1552 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1553 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1554 (pthread_cleanup_push_defer_np): Likewise.
1556 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1558 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1561 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1562 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1564 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1565 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1567 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1569 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1571 2010-05-01 Alan Modra <amodra@gmail.com>
1573 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1574 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1575 to save temps. Correct cfi for possible later frame manipulation.
1576 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1577 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1578 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1579 (DOCARGS_6, UNDOCARGS_6): Likewise.
1580 (CENABLE, CDISABLE): Add nops for non-shared calls.
1582 2010-07-06 Andreas Schwab <schwab@redhat.com>
1584 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1587 2010-07-03 Ulrich Drepper <drepper@redhat.com>
1589 * tst-abstime.c (do_test): Some more cleanups
1591 2010-07-02 Ulrich Drepper <drepper@redhat.com>
1593 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1595 2010-07-01 Andreas Schwab <schwab@redhat.com>
1596 Ulrich Drepper <drepper@redhat.com>
1598 * Makefile (tests): Add tst-abstime.
1599 * tst-abstime.c: New file.
1600 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1601 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1602 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1603 (__lll_timedlock_wait): Likewise.
1604 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1605 (__lll_robust_timedlock_wait): Likewise.
1606 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1607 (__pthread_cond_timedwait): Likewise.
1608 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1609 (pthread_rwlock_timedrdlock): Likewise.
1610 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1611 (pthread_rwlock_timedwrlock): Likewise.
1612 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1615 2010-07-01 Ulrich Drepper <drepper@redhat.com>
1617 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1619 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1621 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1622 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1624 2010-04-09 Ulrich Drepper <drepper@redhat.com>
1627 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1628 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1629 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1631 * Makefile (libpthread-routines): Add pthread_getname and
1633 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1635 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1637 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1638 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1639 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1640 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1642 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1644 * pthread_cond_timedwait.c: Add check for
1645 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1646 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1649 2010-03-09 Ulrich Drepper <drepper@redhat.com>
1651 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1652 and the call fails wake eventually waiting setxid threads. Don't free
1653 stack here if we try starting a thread.
1654 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1655 if the clone call failed.
1657 2010-03-08 Andreas Schwab <schwab@redhat.com>
1659 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1660 * allocatestack.c (get_cached_stack): Set setxid_futex.
1661 (allocate_stack): Likewise.
1663 2010-03-05 Andreas Schwab <schwab@redhat.com>
1664 Ulrich Drepper <drepper@redhat.com>
1666 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1667 it is creating a thread or it is just being created.
1668 * pthread_create.c (start_thread): Wake setxid thread if it is
1670 (__pthread_create_2_1): Initialize setxid_futex.
1671 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1674 2010-01-15 Ulrich Drepper <drepper@redhat.com>
1676 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1678 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1680 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
1682 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1683 Fix pthread_cond_timedwait with requeue-PI.
1684 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1685 Fix pthread_cond_wait with requeue-PI.
1687 2010-01-14 Ulrich Drepper <drepper@redhat.com>
1689 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1690 and pthread_mutexattr_setrobust for GLIBC_2.12.
1691 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1692 * pthread_mutexattr_getrobust.c: Define alias
1693 pthread_mutexattr_getrobust.
1694 * pthread_mutexattr_setrobust.c: Define alias
1695 pthread_mutexattr_setrobust.
1697 2010-01-12 Ulrich Drepper <drepper@redhat.com>
1699 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1701 2010-01-08 Ulrich Drepper <drepper@redhat.com>
1703 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1705 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1707 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1708 call __gmon_start__.
1709 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1711 2009-12-17 Ulrich Drepper <drepper@redhat.com>
1713 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1716 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1718 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1719 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1720 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1721 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1722 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1723 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1724 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1725 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1727 2009-12-12 Ulrich Drepper <drepper@redhat.com>
1729 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1730 Don't update nwaiters after invalid timeout is recognized.
1732 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1734 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1737 2009-11-27 Andreas Schwab <schwab@redhat.com>
1739 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1740 THREAD_SELF->cancelhandling after returning from futex call.
1742 2009-11-24 Ulrich Drepper <drepper@redhat.com>
1744 * tst-sem13.c: New file.
1745 * Makefile (tests): Add tst-sem13.
1747 2009-11-22 Roland McGrath <roland@redhat.com>
1749 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1750 instead of recapitulating its contents.
1752 2009-11-18 Ulrich Drepper <drepper@redhat.com>
1754 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1755 optimizations and cleanups.
1757 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1759 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1760 Remove redundant code. Fix cfi offsets.
1761 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1764 2009-11-17 Ulrich Drepper <drepper@redhat.com>
1766 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1767 reduce size of unwind info.
1769 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1771 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1772 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1774 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1777 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1779 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1781 2009-10-30 Ulrich Drepper <drepper@redhat.com>
1783 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1786 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1787 steps to avoid races with creation and terminations.
1788 * nptl-init.c (sighandler_setxid): Adjust.
1789 Patch by Daniel Jacobowitz.
1791 2009-09-07 Andreas Schwab <schwab@redhat.com>
1793 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1795 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
1796 Joseph Myers <joseph@codesourcery.com>
1799 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1800 Initialize the sigev_notify field for newly created timer to make sure
1801 the timer gets deleted from the active timer's list upon timer_delete.
1803 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
1805 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1806 Correct a logic error.
1808 2009-08-25 Ulrich Drepper <drepper@redhat.com>
1810 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1811 of the field in local variables.
1812 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1813 variable and don't unconditionally clear it.
1815 2009-08-24 Ulrich Drepper <drepper@redhat.com>
1817 * pthread_create.c (start_thread): Hint to the kernel that memory for
1818 the stack can be reused. We do not mark all the memory. The part
1819 still in use and some reserve are kept.
1821 2009-08-23 Ulrich Drepper <drepper@redhat.com>
1823 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1825 2009-08-11 Ulrich Drepper <drepper@redhat.com>
1827 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1830 2009-08-10 Ulrich Drepper <drepper@redhat.com>
1832 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1834 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1836 2009-08-10 Andreas Schwab <schwab@redhat.com>
1838 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1839 (__pthread_cond_signal): Don't clobber register used for syscall
1842 2009-08-08 Ulrich Drepper <drepper@redhat.com>
1844 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1845 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1847 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1848 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1851 2009-08-07 Ulrich Drepper <drepper@redhat.com>
1853 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1854 enabled by the special *_asynccancel functions.
1855 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1856 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1858 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1860 2009-08-04 Ulrich Drepper <drepper@redhat.com>
1862 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1863 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1864 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1865 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1866 since we can assume the special __*_{en,dis}able_asynccancel
1868 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1869 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1870 and PTHREAD_CANCELED.
1872 2009-07-31 Ulrich Drepper <drepper@redhat.com>
1874 * descr.h: Better definition of *_BITMASK macros for cancellation.
1876 2009-07-29 Ulrich Drepper <drepper@redhat.com>
1878 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1880 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1881 dynamic linker might have to save.
1882 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1883 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1886 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1888 2009-07-28 Ulrich Drepper <drepper@redhat.com>
1890 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1892 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1893 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1894 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1895 requeue_pi for robust mutexes.
1896 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1897 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1898 Don't only skip __pthread_mutex_cond_lock. Call instead
1899 __pthread_mutex_cond_lock_adjust.
1900 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1902 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1903 optimization of PI mutex handling.
1905 2009-07-27 Ulrich Drepper <drepper@redhat.com>
1908 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1909 instead of of _acq variants of cmpxchg.
1911 2009-07-23 Ulrich Drepper <drepper@redhat.com>
1913 * sysdeps/x86_64/configure.in: New file.
1915 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1916 path when not using absolute timeout futex.
1918 2009-07-20 Ulrich Drepper <drepper@redhat.com>
1920 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1921 optimizations of last changes.
1922 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1924 2009-07-19 Ulrich Drepper <drepper@redhat.com>
1926 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1927 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1928 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1929 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1930 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1931 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1932 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1933 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1935 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1936 (__pthread_cond_timedwait): Make more robust.
1938 2009-07-18 Ulrich Drepper <drepper@redhat.com>
1940 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1941 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1942 directly use absolute timeout.
1944 * tst-sem5.c (do_test): Add test for premature timeout.
1945 * Makefile: Linu tst-sem5 with librt.
1947 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1948 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1949 directly use absolute timeout.
1950 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1951 (pthread_rwlock_timedrdlock): Likewise.
1953 * tst-cond11.c (run_test): Add test to check that the timeout is
1956 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1957 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1958 directly use absolute timeout.
1960 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1961 (__pthread_cond_wait): Convert to using exception handler instead of
1962 registered unwind buffer.
1963 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1964 (__pthread_cond_timedwait): Likewise.
1966 2009-07-17 Ulrich Drepper <drepper@redhat.com>
1968 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1969 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1970 use absolute timeout.
1972 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1973 handling of uncontested semaphore.
1975 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1976 (__condvar_cleanup): Rewrite to use cfi directives instead of
1977 hand-coded unwind tables.
1978 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1980 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1981 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1984 2009-06-12 Ulrich Drepper <drepper@redhat.com>
1986 * Makefile (libpthread-routines): Add pthread_sigqueue.
1987 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1988 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1989 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1991 2009-06-11 Ulrich Drepper <drepper@redhat.com>
1994 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1995 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1997 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1999 2009-05-16 Ulrich Drepper <drepper@redhat.com>
2001 * libc-cancellation.c: Move __libc_cleanup_routine to...
2002 * libc-cleanup.c: ...here. New file.
2003 * Makefile (routines): Add libc-cleanup.
2005 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
2007 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
2008 * sysdeps/pthread/librt-cancellation.c: Likewise.
2011 * nptl-init.c: Renamed from init.c.
2012 * Makefile: Change all occurences of init.c to nptl-init.c.
2014 2009-05-15 Ulrich Drepper <drepper@redhat.com>
2016 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
2017 to test when deciding on the delay.
2018 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2019 * pthread_cancel.c: Close race between deciding on sending a signal
2020 and setting the CANCELING_BIT bit.
2022 * cancellation.c (__pthread_disable_asynccancel): Don't return if
2024 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2026 2009-04-27 Ulrich Drepper <drepper@redhat.com>
2028 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
2030 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2031 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
2032 * sysdeps/i386/tls.h: Likewise.
2033 (tcbhead_t): Add __private_tm member.
2035 2009-04-26 Ulrich Drepper <drepper@redhat.com>
2037 * sem_open.c (sem_open): Rewrite initialization of initsem to
2040 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2041 Avoid warning by using may_alias attribute on ptrhack.
2043 2009-04-22 Ulrich Drepper <drepper@redhat.com>
2046 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
2047 Check policy and priority for validity.
2048 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
2050 2009-03-15 Ulrich Drepper <drepper@redhat.com>
2052 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2053 (__pthread_cond_timedwait): Change to use cfi directives instead of
2054 hand-coded unwind sections.
2056 2009-03-10 Ulrich Drepper <drepper@redhat.com>
2058 * init.c (nptl_freeres): Compile only for SHARED.
2060 2009-03-09 Jakub Jelinek <jakub@redhat.com>
2062 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
2063 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
2064 FUTEX_BITSET_MATCH_ANY.
2066 2009-02-27 Roland McGrath <roland@redhat.com>
2068 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
2069 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
2071 2009-02-26 Ulrich Drepper <drepper@redhat.com>
2073 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2074 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
2075 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
2078 2009-02-25 Ulrich Drepper <drepper@redhat.com>
2080 * sysdeps/pthread/pthread.h: The robust mutex functions are in
2083 2009-02-24 Ulrich Drepper <drepper@redhat.com>
2085 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
2086 Unify name of include protector macro.
2088 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
2090 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2091 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
2093 2009-01-29 Ulrich Drepper <drepper@redhat.com>
2095 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
2098 * allocatestack.c (__free_stacks): Renamed from free_stacks.
2099 (__free_stack_cache): Removed. Change callers to call __free_stacks.
2100 * init.c (nptl_freeres): New function.
2101 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
2102 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
2103 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
2105 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
2106 load DSO. Assign last.
2107 (__unwind_freeres): New function.
2109 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
2110 for better debugging. No need to use stack_list_add here.
2112 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2114 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2115 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2116 instead of computing relative timeout.
2117 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2118 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2120 2009-01-25 Ulrich Drepper <drepper@redhat.com>
2122 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
2124 2009-01-08 Ulrich Drepper <drepper@redhat.com>
2126 * sysdeps/pthread/list.h (list_add): Initialize new element first.
2127 (list_add_tail): Removed.
2129 2009-01-07 Ulrich Drepper <drepper@redhat.com>
2131 * (in_flight_stack): New variable.
2132 (stack_list_del): New function. Use instead of list_del.
2133 (stack_list_add): New function. Use instead of list_add when adding to
2134 stack_cache and stack_used lists.
2135 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
2136 when the fork call interrupted another thread.
2138 2009-01-04 Ulrich Drepper <drepper@redhat.com>
2140 * init.c (__pthread_initialize_minimal_internal): Optimize test
2141 FUTEX_CLOCK_REALTIME a bit.
2143 2009-01-03 Ulrich Drepper <drepper@redhat.com>
2145 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
2146 only passing five parameters to FUTEX_WAIT_BITSET call.
2148 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2149 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2150 instead of computing relative timeout.
2152 2009-01-02 Ulrich Drepper <drepper@redhat.com>
2154 * init.c (__pthread_initialize_minimal_internal): Check for
2155 FUTEX_CLOCK_REALTIME flag.
2156 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2157 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
2160 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2161 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2162 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2163 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2164 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2165 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2167 2008-12-09 Ulrich Drepper <drepper@redhat.com>
2169 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
2170 loop body instead of ; to avoid gcc warnings.
2171 (pthread_cleanup_pop_restore_np): Likewise.
2172 Patch by Caolán McNamara <caolanm@redhat.com>.
2174 2008-12-09 Jakub Jelinek <jakub@redhat.com>
2176 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
2177 fast path here, for robust/PI/PP mutexes call
2178 __pthread_mutex_lock_full. Don't use switch, instead use a series
2179 of ifs according to their probability.
2180 (__pthread_mutex_lock_full): New function.
2181 * pthread_mutex_unlock.c: Include assert.h.
2182 (__pthread_mutex_unlock_usercnt): Handle only the
2183 fast path here, for robust/PI/PP mutexes call
2184 __pthread_mutex_unlock_full. Don't use switch, instead use a series
2185 of ifs according to their probability.
2186 (__pthread_mutex_unlock_full): New function.
2187 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
2188 (__pthread_mutex_lock_full): Define.
2190 2008-12-08 Ulrich Drepper <drepper@redhat.com>
2192 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2193 implementation. Add necessary padding and.
2194 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2197 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2199 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2200 and FUTEX_WAKE_BITSET.
2202 2008-12-02 Ulrich Drepper <drepper@redhat.com>
2204 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2205 and FUTEX_WAKE_BITSET.
2206 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2207 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2208 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2209 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2211 2008-11-25 Roland McGrath <roland@redhat.com>
2213 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2214 Subdirectories moved to ports repository as
2215 sysdeps/.../nptl subdirectories.
2217 2008-11-12 Jakub Jelinek <jakub@redhat.com>
2220 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2222 * pthread_cond_init.c (__pthread_cond_init): Fix
2223 cond->__data.__nwaiters initialization.
2224 * Makefile (tests): Add tst-cond23.
2225 * tst-cond23.c: New test.
2227 2008-11-07 Jakub Jelinek <jakub@redhat.com>
2229 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2231 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2234 2008-11-01 Ulrich Drepper <drepper@redhat.com>
2237 * pthread_mutex_lock.c: Add support for private PI mutexes.
2238 * pthread_mutex_timedlock.c: Likewise.
2239 * pthread_mutex_trylock.c: Likewise.
2240 * pthread_mutex_unlock.c: Likewise.
2241 Patch mostly by Ben Jackson <ben@ben.com>.
2243 2008-10-31 Ulrich Drepper <drepper@redhat.com>
2246 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2247 Increase stack size for helper thread.
2249 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2251 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2252 assembly with a clobber list for access registers a0 and a1.
2254 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
2256 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2257 to force runp->refcntr to be read from memory.
2259 2008-09-08 Richard Guenther <rguenther@suse.de>
2261 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2262 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2263 lll_timedlock, lll_robust_timedlock, lll_unlock,
2264 lll_robust_unlock): Promote private to int.
2266 2008-08-15 Ulrich Drepper <drepper@redhat.com>
2268 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2269 ARCH_RETRY_MMAP definitions.
2270 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2271 Define MAP_STACK when not defined.
2272 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
2273 handling of ARCH_RETRY_MMAP.
2275 2008-07-30 Ulrich Drepper <drepper@redhat.com>
2277 * tst-align2.c (f): Print message that f is reached.
2279 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
2282 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2283 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2285 2008-07-25 Ulrich Drepper <drepper@redhat.com>
2287 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2288 SOCK_CLOEXEC if possible.
2290 2008-05-29 Ulrich Drepper <drepper@redhat.com>
2292 * Makefile (tests): Add tst-rwlock2a.
2293 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2294 * tst-rwlock2a.c: New file.
2296 2008-06-12 Ulrich Drepper <drepper@redhat.com>
2298 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2300 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
2302 * sysdeps/pthread/pthread.h: Fix typo in comment.
2304 2008-05-28 Ulrich Drepper <drepper@redhat.com>
2306 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2307 of CPU set to the kernel.
2309 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2311 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2313 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2314 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2315 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2316 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2317 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2318 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2320 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
2322 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2324 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2326 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2328 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2331 2008-05-26 Ulrich Drepper <drepper@redhat.com>
2333 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2335 2008-05-20 Jakub Jelinek <jakub@redhat.com>
2337 David S. Miller <davem@davemloft.net>
2339 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2341 2008-05-10 Ulrich Drepper <drepper@redhat.com>
2343 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2344 __pshared correctly.
2345 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2347 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2349 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2351 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2353 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2355 2008-04-14 David S. Miller <davem@davemloft.net>
2357 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2358 (__old_sem_wait): Fix argument to lll_futex_wait().
2360 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2362 * pthread_create.c: Require pthread_mutex_trylock and
2363 pthread_key_delete for libgcc.
2365 2008-04-08 Jakub Jelinek <jakub@redhat.com>
2368 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2369 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2370 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2372 2008-03-27 Ulrich Drepper <drepper@redhat.com>
2374 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2375 <linux/limits.h> has defined it.
2376 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2377 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2378 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2379 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2381 2008-03-18 Jakub Jelinek <jakub@redhat.com>
2383 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2385 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2386 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2388 2008-03-14 Ulrich Drepper <drepper@redhat.com>
2390 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2391 HAVE_DL_DISCOVER_OSVERSION.
2392 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2393 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2395 2008-03-07 Ulrich Drepper <drepper@redhat.com>
2398 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2399 _POSIX_CHOWN_RESTRICTED value to zero.
2401 2008-01-31 Roland McGrath <roland@redhat.com>
2403 * Makefile (omit-deps): Variable removed.
2405 2008-01-30 Ulrich Drepper <drepper@redhat.com>
2407 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2408 unnecessary addr32 prefix.
2410 2008-01-29 Roland McGrath <roland@redhat.com>
2412 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2414 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2416 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2418 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2420 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2422 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2423 (__lll_lock_wait_private): Fix typo.
2424 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2425 (pthread_barrier_wait): Likewise. Adjust XADD use.
2426 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2428 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2429 (pthread_rwlock_timedrdlock): Return correct return value.
2430 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2431 (pthread_rwlock_timedwrlock): Likewise.
2433 2008-01-15 Ulrich Drepper <drepper@redhat.com>
2435 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2436 thread returns the program exits with an error code.
2438 2008-01-10 Ulrich Drepper <drepper@redhat.com>
2440 * pthread-errnos.sym: Add EOVERFLOW.
2441 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2442 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2443 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2444 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2446 2007-12-14 Ulrich Drepper <drepper@redhat.com>
2448 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2449 parameter. Passed it as permission to mmap.
2450 * allocatestack.c (allocate_stack): Pass prot as second parameter
2453 2007-12-12 Ulrich Drepper <drepper@redhat.com>
2455 * tst-basic7.c: Allocate memory for the stack.
2458 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2459 (__pthread_cond_timedwait): Don't use VDSO.
2460 Patch by Michal Januszewski.
2462 2007-12-07 Ulrich Drepper <drepper@redhat.com>
2465 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2466 Allow label before pthread_cleanup_pop.
2467 (pthread_cleanup_pop_restore_np): Likewise.
2469 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2471 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2472 Store 2 before returning ETIMEDOUT.
2474 2007-11-23 Ulrich Drepper <drepper@redhat.com>
2476 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2477 Store 2 before returning ETIMEDOUT.
2478 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2479 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2480 (__lll_lock_wait_private): Optimize.
2481 (__lll_lock_wait): Likewise.
2483 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2485 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2486 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2487 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2489 2007-11-08 Ulrich Drepper <drepper@redhat.com>
2492 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2493 If we time out, try one last time to lock the futex to avoid
2494 losing a wakeup signal.
2495 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2496 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2499 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2502 2007-11-07 Ulrich Drepper <drepper@redhat.com>
2505 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2506 mmap failed to EAGAIN.
2507 * Makefile (tests): Add tst-basic7.
2508 * tst-basic7.c: New file.
2510 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2512 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2513 Use __linkin_atfork.
2515 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2517 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2518 missing line continuations.
2519 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2520 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2522 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2525 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2526 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2527 (struct timer): Add next element.
2528 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2529 enqueue timer structure into __active_timer_sigev_thread list.
2530 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2531 remove timer struct from __active_timer_sigev_thread.
2532 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2533 Before using timer structure make sure it is still on the
2534 __active_timer_sigev_thread list. Keep lock until done.
2535 Define __active_timer_sigev_thread and
2536 __active_timer_sigev_thread_lock.
2538 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2540 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2541 Redefine thread_atfork for use of ATFORK_MEM.
2542 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2543 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2545 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2546 Use atomic operation when removing first element of list.
2548 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2550 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2551 routine instead of an alias to __new_sem_post.
2553 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2555 * init.c (__pthread_initialize_minimal): Initialize word to appease
2558 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2560 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2561 libc.so just clear NAME.
2562 (__libc_rwlock_fini): Nop inside of libc.so.
2563 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2566 2007-09-02 Ulrich Drepper <drepper@redhat.com>
2568 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2569 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2571 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2573 2007-08-21 Ulrich Drepper <drepper@redhat.com>
2576 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2577 reclaimed stack if necessary.
2578 * Makefile (tests): Add tst-tsd6.
2579 * tst-tsd6.c: New file.
2581 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2583 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2584 Add private argument.
2586 2007-08-20 Ulrich Drepper <drepper@redhat.com>
2588 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2589 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2591 2007-08-16 Jakub Jelinek <jakub@redhat.com>
2593 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2594 (__lll_robust_timedlock): Pass private as last argument to
2595 __lll_robust_timedlock_wait.
2596 (__lll_unlock): Fix a pasto.
2598 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2600 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2601 sparc_old_sem): New structs.
2602 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2603 (__sem_wait_cleanup): New function.
2604 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2605 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2606 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2608 (__old_sem_wait): New function.
2609 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2610 nptl/sysdeps/unix/sysv/linux/sparc version.
2611 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2613 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2614 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2615 (__new_sem_trywait): Use sparc_old_sem structure.
2616 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2617 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2618 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2619 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2620 lll_futex_timed_wait.
2621 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2622 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2623 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2625 (__old_sem_post): New function.
2626 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2627 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2628 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2629 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2630 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2631 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2633 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2635 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2636 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2637 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2638 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2639 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2640 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2641 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2643 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2644 kernel-features.h and tcb-offsets.h.
2645 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2646 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2648 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2650 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2651 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2653 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2654 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2655 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2656 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2657 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2658 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2659 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2661 2007-08-14 Jakub Jelinek <jakub@redhat.com>
2663 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2664 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2665 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2666 lll_futex_timed_wait.
2668 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2669 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2670 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2671 __lll_robust_unlock, __lll_wait_tid): Likewise.
2673 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2675 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2677 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2678 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2679 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2680 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2681 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2682 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2683 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2684 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2686 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2687 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2688 process private. Switch DW_CFA_advance_loc1 and some
2689 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2690 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2691 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2692 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2693 process private. Switch DW_CFA_advance_loc{1,2} and some
2694 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2695 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2696 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2697 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2699 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2700 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2701 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2703 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2704 (__pthread_cond_broadcast): Compare %r8 instead of
2705 dep_mutex-cond_*(%rdi) with $-1.
2706 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2707 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2710 2007-08-13 Ulrich Drepper <drepper@redhat.com>
2712 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2714 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2716 * allocatestack.c: Include kernel-features.h.
2717 * pthread_create.c: Likewise.
2718 * pthread_mutex_init.c: Likewise.
2720 * pthread_cond_timedwait.c: Likewise.
2721 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2722 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2723 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2724 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2725 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2726 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2727 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2729 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2731 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2732 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2733 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2734 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2736 2007-08-12 Jakub Jelinek <jakub@redhat.com>
2738 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2739 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2740 byte elements. One of them is the new __shared element.
2741 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2742 adjust names of other padding elements.
2743 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2744 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2745 byte elements. One of them is the new __shared element.
2746 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2747 adjust names of other padding elements.
2748 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2749 Renamed __pad1 element to __shared, adjust names of other padding
2751 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2752 (pthread_rwlock_t): Likewise.
2753 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2756 2007-08-09 Anton Blanchard <anton@samba.org>
2758 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2760 2007-08-12 Ulrich Drepper <drepper@redhat.com>
2762 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2763 <kernel-features.h>.
2764 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2766 2007-08-11 Ulrich Drepper <drepper@redhat.com>
2768 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2769 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2770 dealing with robust mutexes.
2771 * pthread_mutex_timedlock.c: Likewise.
2772 * pthread_mutex_trylock.c: Likewise.
2773 * pthread_mutex_unlock.c: Likewise.
2774 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2776 2007-08-06 Jakub Jelinek <jakub@redhat.com>
2778 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2779 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2780 (PTHREAD_MUTEX_PSHARED): Define.
2781 * pthread_mutex_init.c (__pthread_mutex_init): Set
2782 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2784 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2785 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2786 as second argument to lll_lock.
2787 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2788 instead of its __data.__lock field.
2789 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2790 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2792 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2793 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2794 instead of mutex->__data.__kind directly, pass
2795 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2796 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2797 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2798 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2799 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2800 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2801 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2802 of mutex->__data.__kind directly.
2803 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2804 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2805 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2806 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2807 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2808 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2810 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2811 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2812 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2814 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2815 Take mutex as argument instead of its __data.__lock field, pass
2816 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2817 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2818 __data.__lock field.
2819 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2820 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2821 to lll_robust_cond_lock.
2822 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2823 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2824 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2825 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2826 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2827 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2829 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2830 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2832 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2833 pshared variable, pass it to lll_lock, lll_unlock,
2834 lll_futex_timedwait and lll_futex_wake.
2835 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2836 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2838 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2839 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2841 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2842 lll_futex_wake_unlock): Likewise.
2843 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2845 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2846 lll_futex_wake_unlock): Likewise.
2847 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2849 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2850 lll_futex_wake_unlock): Likewise.
2851 (lll_futex_wake): Fix a typo.
2852 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2853 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2854 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2855 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2856 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2857 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2858 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2859 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2860 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2861 (__pthread_cond_timedwait): Likewise.
2862 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2863 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2865 2007-08-05 Jakub Jelinek <jakub@redhat.com>
2867 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2868 Don't use CGOTSETUP and CGOTRESTORE macros.
2869 (CGOTSETUP, CGOTRESTORE): Remove.
2870 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2873 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2875 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2876 definitions for private futexes.
2877 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2878 kernel-features.h and lowlevellock.h. Use private futexes if
2880 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2881 (__lll_mutex_lock_wait): Rename to
2882 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2883 (__lll_mutex_timedlock_wait): Rename to ...
2884 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2885 Don't compile in for libc.so.
2886 (__lll_mutex_unlock_wake): Rename to ...
2887 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2888 (__lll_timedwait_tid): Use __NR_gettimeofday.
2889 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2890 the header from assembler. Renamed all lll_mutex_* resp.
2891 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2892 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2893 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2895 (__lll_lock_wait_private): Add prototype.
2896 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2897 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2898 __lll_unlock_wake): Likewise.
2899 (lll_lock): Add private argument. Call __lll_lock_wait_private
2900 if private is constant LLL_PRIVATE.
2901 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2902 lll_timedlock, lll_robust_timedlock): Add private argument.
2903 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2904 if private is constant LLL_PRIVATE.
2905 (lll_robust_unlock, lll_robust_dead): Add private argument.
2906 (lll_lock_t): Remove.
2907 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2908 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2909 lll_cond_wake, lll_cond_broadcast): Remove.
2910 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2911 kernel-features.h and lowlevellock.h.
2912 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2913 (LOAD_FUTEX_WAIT): Define.
2914 (__lll_robust_mutex_lock_wait): Rename to ...
2915 (__lll_robust_lock_wait): ... this. Add private argument.
2916 Use LOAD_FUTEX_WAIT macro.
2917 (__lll_robust_mutex_timedlock_wait): Rename to ...
2918 (__lll_robust_timedlock_wait): ... this. Add private argument.
2919 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2920 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2922 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2923 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2924 __lll_mutex_{lock,unlock}_*.
2925 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2926 lowlevellock.h and pthread-errnos.h.
2927 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2928 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2929 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2930 __lll_mutex_{lock,unlock}_*.
2931 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2932 lowlevellock.h and pthread-errnos.h.
2933 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2934 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2935 __lll_mutex_{lock,unlock}_*.
2936 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2938 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2939 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2940 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2941 (__condvar_tw_cleanup): Likewise.
2942 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2944 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2945 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2946 __lll_mutex_{lock,unlock}_*.
2947 ( __condvar_w_cleanup): Likewise.
2948 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2949 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2950 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2952 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2953 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2954 __lll_mutex_{lock,unlock}_*.
2955 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2957 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2958 FUTEX_PRIVATE_FLAG): Remove.
2959 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2960 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2961 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2963 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2964 FUTEX_PRIVATE_FLAG): Remove.
2965 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2966 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2967 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2969 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2970 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2971 __lll_mutex_{lock,unlock}_*.
2972 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2974 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2975 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2976 __lll_mutex_{lock,unlock}_*.
2977 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2978 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2979 (__new_sem_post): Use standard initial exec code sequences.
2980 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2982 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2983 FUTEX_PRIVATE_FLAG): Remove.
2984 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2985 exec code sequences.
2986 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2987 (__new_sem_trywait): Use standard initial exec code sequences.
2988 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2989 (__new_sem_wait): Use standard initial exec code sequences.
2991 2007-07-31 Anton Blanchard <anton@samba.org>
2993 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2994 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2995 atomic_full_barrier.
2997 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2999 * allocatestack.c (stack_cache_lock): Change type to int.
3000 (get_cached_stack, allocate_stack, __deallocate_stack,
3001 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
3002 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
3003 as second argument to lll_lock and lll_unlock macros on
3005 * pthread_create.c (__find_in_stack_list): Likewise.
3006 (start_thread): Similarly with pd->lock. Use lll_robust_dead
3007 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
3009 * descr.h (struct pthread): Change lock and setxid_futex field
3011 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
3012 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
3013 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
3014 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
3016 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
3017 * pthread_cond_init.c (__pthread_cond_init): Likewise.
3018 * pthreadP.h (__attr_list_lock): Change type to int.
3019 * pthread_attr_init.c (__attr_list_lock): Likewise.
3020 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
3021 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
3023 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
3024 also for lll_futex_{wake,wait}.
3025 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
3027 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
3028 LLL_SHARED as second argument to lll_{,un}lock.
3029 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
3030 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
3031 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
3032 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
3034 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
3035 as second argument to lll_{,un}lock macros on pd->lock.
3036 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
3037 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
3038 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3039 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
3041 * sysdeps/pthread/createthread.c (do_clone, create_thread):
3043 * pthread_once.c (once_lock): Change type to int.
3044 (__pthread_once): Pass LLL_PRIVATE as second argument to
3045 lll_{,un}lock macros on once_lock.
3046 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
3047 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
3048 rwlock->__data.__shared as second argument to them and similarly
3050 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
3052 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
3054 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
3055 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
3056 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
3057 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3058 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
3059 to lll_{,un}lock macros on __sem_mappings_lock.
3060 * sem_open.c (check_add_mapping): Likewise.
3061 (__sem_mappings_lock): Change type to int.
3062 * semaphoreP.h (__sem_mappings_lock): Likewise.
3063 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3064 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
3065 instead of lll_*mutex_*, pass LLL_SHARED as last
3067 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
3068 pass LLL_SHARED as last argument.
3069 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
3070 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
3071 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
3072 pass LLL_SHARED as last argument.
3073 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3074 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
3075 LLL_SHARED as last argument.
3076 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
3077 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
3079 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
3080 __libc_lock_lock_recursive, __libc_lock_unlock,
3081 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
3082 argument to lll_{,un}lock.
3083 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
3084 _IO_lock_unlock): Likewise.
3085 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
3087 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3088 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
3090 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
3091 free_mem): Likewise.
3092 (__fork_lock): Change type to int.
3093 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
3094 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
3095 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
3097 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3098 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
3099 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
3101 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
3102 pass it through to lll_futex_*wait, only compile in when
3104 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3105 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
3106 argument and pass it through to lll_futex_*wait.
3107 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
3108 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
3109 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
3110 inline functions to __lll_* resp. __lll_robust_*.
3111 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
3112 (lll_mutex_dead): Add private argument.
3113 (__lll_lock_wait_private): New prototype.
3114 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
3115 __lll_robust_lock_timedwait): Add private argument to prototypes.
3116 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
3117 call __lll_lock_wait_private, otherwise pass private to
3119 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
3120 __lll_robust_timedlock): Add private argument, pass it to
3121 __lll_*wait functions.
3122 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
3123 call __lll_unlock_wake_private, otherwise pass private to
3125 (__lll_robust_unlock): Add private argument, pass it to
3126 __lll_robust_unlock_wake.
3127 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
3128 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
3129 argument, pass it through to __lll_* inline function.
3130 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
3131 (lll_lock_t): Remove.
3132 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3133 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3134 lll_cond_wake, lll_cond_broadcast): Remove.
3135 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3136 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3137 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3138 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3139 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
3140 the header from assembler. Renamed all lll_mutex_* resp.
3141 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3142 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
3143 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3144 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
3145 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
3146 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
3147 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
3149 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
3150 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
3151 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
3152 (lll_trylock): Likewise, use __lll_trylock_asm, pass
3153 MULTIPLE_THREADS_OFFSET as another asm operand.
3154 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
3155 MULTIPLE_THREADS_OFFSET as last asm operand, call
3156 __lll_lock_wait_private if private is constant LLL_PRIVATE,
3157 otherwise pass private as another argument to __lll_lock_wait.
3158 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3159 lll_timedlock, lll_robust_timedlock): Add private argument, pass
3160 private as another argument to __lll_*lock_wait call.
3161 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
3162 MULTIPLE_THREADS_OFFSET as another asm operand, call
3163 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
3164 otherwise pass private as another argument to __lll_unlock_wake.
3165 (lll_robust_unlock): Add private argument, pass private as another
3166 argument to __lll_unlock_wake.
3167 (lll_robust_dead): Add private argument, use __lll_private_flag
3169 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
3170 LLL_MUTEX_LOCK_INITIALIZER.
3171 (lll_lock_t): Remove.
3172 (LLL_LOCK_INITIALIZER_WAITERS): Define.
3173 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3174 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3175 lll_cond_wake, lll_cond_broadcast): Remove.
3176 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3177 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
3178 2007-05-2{3,9} changes.
3179 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
3180 kernel-features.h and lowlevellock.h.
3181 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3182 (LOAD_FUTEX_WAIT): Rewritten.
3183 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3185 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3186 (__lll_mutex_lock_wait): Rename to ...
3187 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
3188 %ecx, %ecx is now private argument. Don't compile in for libc.so.
3189 (__lll_mutex_timedlock_wait): Rename to ...
3190 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
3191 contains private argument. Don't compile in for libc.so.
3192 (__lll_mutex_unlock_wake): Rename to ...
3193 (__lll_unlock_wake): ... this. %ecx contains private argument.
3194 Don't compile in for libc.so.
3195 (__lll_timedwait_tid): Use __NR_gettimeofday.
3196 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3197 kernel-features.h and lowlevellock.h.
3198 (LOAD_FUTEX_WAIT): Define.
3199 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3201 (__lll_robust_mutex_lock_wait): Rename to ...
3202 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
3203 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
3205 (__lll_robust_mutex_timedlock_wait): Rename to ...
3206 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
3207 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3208 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3210 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3211 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3212 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3213 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3214 to __lll_lock_wait in %edx.
3215 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3216 Include lowlevellock.h and pthread-errnos.h.
3217 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3218 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3219 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3220 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3221 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3223 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3224 Include lowlevellock.h and pthread-errnos.h.
3225 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3226 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3227 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3228 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3229 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3231 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3232 Include lowlevellock.h.
3233 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3235 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3236 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3237 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3238 __lll_unlock_wake. Use __NR_gettimeofday.
3239 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3240 Include lowlevellock.h.
3241 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3242 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3243 to __lll_*, pass cond_lock address in %edx rather than %ecx to
3244 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3245 and __lll_unlock_wake.
3246 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3247 Include lowlevellock.h.
3248 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3249 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3250 MUTEX(%ebx) address in %edx rather than %ecx to
3251 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3252 and __lll_unlock_wake. Move return value from %ecx to %edx
3254 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3255 Include lowlevellock.h.
3256 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3258 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3259 MUTEX(%ebp) address in %edx rather than %ecx to
3260 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3261 and __lll_unlock_wake. Move return value from %ecx to %edx
3262 register. Use __NR_gettimeofday.
3263 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3264 Include lowlevellock.h.
3265 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3267 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3268 MUTEX(%ebp) address in %edx rather than %ecx to
3269 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3270 and __lll_unlock_wake. Move return value from %ecx to %edx
3271 register. Use __NR_gettimeofday.
3272 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3273 Include lowlevellock.h.
3274 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3275 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3276 MUTEX(%edi) address in %edx rather than %ecx to
3277 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3278 and __lll_unlock_wake.
3279 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3280 Include lowlevellock.h.
3281 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3282 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3283 MUTEX(%ebx) address in %edx rather than %ecx to
3284 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3285 and __lll_unlock_wake. Move return value from %ecx to %edx
3287 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3289 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3291 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3292 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3293 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3295 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3296 (sem_timedwait): Use __NR_gettimeofday.
3297 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3299 (LOCK): Don't define.
3300 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3302 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3303 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3305 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3306 2007-05-2{3,9} changes.
3307 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3308 kernel-features.h and lowlevellock.h.
3309 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3310 (LOAD_FUTEX_WAIT): Rewritten.
3311 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3312 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3313 (__lll_mutex_lock_wait): Rename to ...
3314 (__lll_lock_wait): ... this. %esi is now private argument.
3315 Don't compile in for libc.so.
3316 (__lll_mutex_timedlock_wait): Rename to ...
3317 (__lll_timedlock_wait): ... this. %esi contains private argument.
3318 Don't compile in for libc.so.
3319 (__lll_mutex_unlock_wake): Rename to ...
3320 (__lll_unlock_wake): ... this. %esi contains private argument.
3321 Don't compile in for libc.so.
3322 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3323 kernel-features.h and lowlevellock.h.
3324 (LOAD_FUTEX_WAIT): Define.
3325 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3326 (__lll_robust_mutex_lock_wait): Rename to ...
3327 (__lll_robust_lock_wait): ... this. %esi argument contains private.
3328 Use LOAD_FUTEX_WAIT macro.
3329 (__lll_robust_mutex_timedlock_wait): Rename to ...
3330 (__lll_robust_timedlock_wait): ... this. %esi argument contains
3331 private, use LOAD_FUTEX_WAIT macro.
3332 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3334 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3335 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3336 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3337 __lll_lock_wait and __lll_unlock_wake.
3338 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3339 Include lowlevellock.h and pthread-errnos.h.
3340 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3341 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3342 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3343 pass LLL_SHARED in %esi to both __lll_lock_wait and
3345 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3346 Include lowlevellock.h and pthread-errnos.h.
3347 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3348 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3349 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3350 pass LLL_SHARED in %esi to both __lll_lock_wait and
3352 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3353 Include lowlevellock.h.
3354 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3355 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3356 pass LLL_SHARED in %esi to both __lll_lock_wait and
3358 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3359 Include lowlevellock.h.
3360 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3361 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3362 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3363 and __lll_unlock_wake.
3364 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3365 Include lowlevellock.h.
3366 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3368 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3369 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3370 and __lll_unlock_wake.
3371 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3372 Include lowlevellock.h.
3373 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3375 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3376 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3377 and __lll_unlock_wake.
3378 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3379 Include lowlevellock.h.
3380 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3382 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3383 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3384 and __lll_unlock_wake.
3385 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3386 Include lowlevellock.h.
3387 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3389 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3390 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3391 and __lll_unlock_wake.
3392 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3393 Include lowlevellock.h.
3394 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3396 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3397 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3398 and __lll_unlock_wake.
3399 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3401 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3403 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3404 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3405 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3407 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3408 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3410 (LOCK): Don't define.
3411 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3413 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3414 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3415 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3416 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3417 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3418 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3419 (__lll_lock_wait_private): New function.
3420 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3421 it to lll_futex_*wait. Don't compile in for libc.so.
3422 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3424 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3425 (struct sparc_pthread_barrier): Remove.
3426 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3427 struct sparc_pthread_barrier. Pass
3428 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3429 and lll_futex_wait macros.
3430 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3432 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3433 Include sparc pthread_barrier_wait.c instead of generic one.
3435 2007-07-30 Jakub Jelinek <jakub@redhat.com>
3437 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3439 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3440 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3442 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3443 (pthread_rwlock_timedwrlock): Likewise.
3444 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3445 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3447 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3449 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3451 2007-07-26 Jakub Jelinek <jakub@redhat.com>
3453 * tst-locale2.c (useless): Add return statement.
3455 2007-07-24 Jakub Jelinek <jakub@redhat.com>
3457 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3458 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3459 * pthread_create.c (start_thread): Likewise.
3460 * init.c (sighandler_setxid): Likewise.
3461 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3462 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3463 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3464 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3465 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3466 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3467 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3468 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3469 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3471 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3473 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3475 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3476 __rtld_notify): Likewise.
3477 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3478 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3479 __pthread_once): Likewise.
3480 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3481 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3482 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3483 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3484 (lll_futex_wait): Add private argument, define as wrapper around
3485 lll_futex_timed_wait.
3486 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3487 use __lll_private_flag macro.
3488 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3489 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3490 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3491 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3492 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3493 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3494 (lll_futex_wait): Add private argument, define as wrapper around
3495 lll_futex_timed_wait.
3496 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3497 use __lll_private_flag macro.
3498 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3499 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3500 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3502 (lll_futex_timed_wait, lll_futex_wake): Use it.
3503 (lll_private_futex_wait, lll_private_futex_timed_wait,
3504 lll_private_futex_wake): Removed.
3505 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3506 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3507 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3508 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3509 (lll_futex_wait): Add private argument, define as wrapper around
3510 lll_futex_timed_wait.
3511 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3512 use __lll_private_flag macro.
3513 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3514 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3516 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3517 (lll_private_futex_wait, lll_private_futex_timed_wait,
3518 lll_private_futex_wake): Removed.
3519 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3520 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3521 (lll_private_futex_wait, lll_private_futex_timed_wait,
3522 lll_private_futex_wake): Removed.
3523 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3524 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3525 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3526 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3527 (lll_futex_wait): Add private argument, define as wrapper around
3528 lll_futex_timed_wait.
3529 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3530 use __lll_private_flag macro.
3531 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3532 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3534 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3536 (lll_futex_timed_wait, lll_futex_wake): Use it.
3537 (lll_private_futex_wait, lll_private_futex_timed_wait,
3538 lll_private_futex_wake): Removed.
3540 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3542 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3543 of the structure for sparc32.
3545 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3547 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3549 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3551 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3552 code used when private futexes are assumed.
3553 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3556 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3558 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3559 (__lll_private_flag): Define.
3560 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3561 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3563 (lll_private_futex_wait, lll_private_futex_timedwait,
3564 lll_private_futex_wake): Define as wrapper around non-_private
3566 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3567 (__lll_private_flag): Define.
3568 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3569 (lll_private_futex_wait, lll_private_futex_timedwait,
3570 lll_private_futex_wake): Define as wrapper around non-_private
3573 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3575 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3576 parameter to lll_futex_wait call.
3577 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3579 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3580 Replace lll_futex_wait with lll_private_futex_wait.
3581 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3582 Add LLL_SHARED parameter to lll_futex_wake().
3584 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3585 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3586 lll_private_futex_wake.
3587 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3588 bit from private parm before syscall.
3589 (lll_futex_timed_wait): Likewise.
3590 (lll_futex_wake): Likewise.
3591 (lll_futex_wake_unlock): Likewise.
3592 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3593 (lll_robust_mutex_unlock): Likewise.
3594 (lll_mutex_unlock_force): Likewise.
3595 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3597 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3599 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3600 compilation when unconditionally using private futexes.
3601 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3602 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3604 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3605 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3607 2007-07-17 Jakub Jelinek <jakub@redhat.com>
3609 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3612 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3614 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3617 2007-05-16 Roland McGrath <roland@redhat.com>
3619 * init.c (__nptl_initial_report_events): New variable.
3620 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3623 2007-06-22 Jakub Jelinek <jakub@redhat.com>
3625 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3626 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3628 2007-06-19 Ulrich Drepper <drepper@redhat.com>
3630 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3633 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3635 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3636 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3637 * pthread_mutex_timedlock.c: Likewise.
3638 * pthread_mutex_trylock.c: Likewise.
3639 * pthread_mutex_unlock.c: Likewise.
3641 2007-06-17 Andreas Schwab <schwab@suse.de>
3643 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3646 2007-06-17 Ulrich Drepper <drepper@redhat.com>
3648 * allocatestack.c (allocate_stack): Make code compile if
3649 __ASSUME_PRIVATE_FUTEX is set.
3651 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3653 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3654 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3655 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3656 (__pthread_rwlock_wrlock): Likewise.
3657 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3658 (pthread_rwlock_timedrdlock): Likewise.
3659 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3660 (pthread_rwlock_timedwrlock): Likewise.
3661 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3662 (__pthread_rwlock_unlock): Likewise.
3664 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3666 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3667 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3668 Split __flags into __flags, __shared, __pad1 and __pad2.
3669 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3670 futexes if they are available.
3671 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3672 in libc-lowlevellock.S allow using private futexes.
3673 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3674 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3675 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3676 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3677 lll_private_futex_timed_wait and lll_private_futex_wake.
3678 (lll_robust_mutex_unlock): Fix typo.
3679 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3680 field in futex command setup.
3681 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3682 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3683 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3684 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3685 if they are available. Remove clear_once_control.
3686 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3687 futexes if they are available.
3688 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3689 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3690 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3691 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3692 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3693 Wake only when there are waiters.
3694 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3695 support. Indicate that there are waiters. Remove unnecessary
3696 extra cancellation test.
3697 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3698 left-over duplication of __sem_wait_cleanup.
3700 2007-06-07 Ulrich Drepper <drepper@redhat.com>
3702 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3703 parameter to lll_futex_wait, lll_futex_timed_wait, and
3704 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3705 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3706 lll_private_futex_wake.
3707 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3708 * allocatestack.c: Adjust use of lll_futex_* macros.
3710 * lowlevellock.h: Likewise.
3711 * pthread_barrier_wait.c: Likewise.
3712 * pthread_cond_broadcast.c: Likewise.
3713 * pthread_cond_destroy.c: Likewise.
3714 * pthread_cond_signal.c: Likewise.
3715 * pthread_cond_timedwait.c: Likewise.
3716 * pthread_cond_wait.c: Likewise.
3717 * pthread_create.c: Likewise.
3718 * pthread_mutex_lock.c: Likewise.
3719 * pthread_mutex_setprioceiling.c: Likewise.
3720 * pthread_mutex_timedlock.c: Likewise.
3721 * pthread_mutex_unlock.c: Likewise.
3722 * pthread_rwlock_timedrdlock.c: Likewise.
3723 * pthread_rwlock_timedwrlock.c: Likewise.
3724 * pthread_rwlock_unlock.c: Likewise.
3725 * sysdeps/alpha/tls.h: Likewise.
3726 * sysdeps/i386/tls.h: Likewise.
3727 * sysdeps/ia64/tls.h: Likewise.
3728 * sysdeps/powerpc/tls.h: Likewise.
3729 * sysdeps/pthread/aio_misc.h: Likewise.
3730 * sysdeps/pthread/gai_misc.h: Likewise.
3731 * sysdeps/s390/tls.h: Likewise.
3732 * sysdeps/sh/tls.h: Likewise.
3733 * sysdeps/sparc/tls.h: Likewise.
3734 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3735 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3736 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3737 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3738 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3739 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3740 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3741 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3742 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3743 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3745 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3746 * sysdeps/x86_64/tls.h: Likewise.
3748 2007-05-29 Ulrich Drepper <drepper@redhat.com>
3750 * pthread_getattr_np.c: No need to install a cancellation handler,
3751 this is no cancellation point.
3752 * pthread_getschedparam.c: Likewise.
3753 * pthread_setschedparam.c: Likewise.
3754 * pthread_setschedprio.c: Likewise.
3755 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3757 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3758 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3759 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3760 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3761 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3762 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3763 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3764 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3765 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3766 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3767 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3768 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3770 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3771 whether there are more than one thread makes no sense here since
3772 we only call the slow path if the locks are taken.
3773 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3775 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3776 COND_NWAITERS_SHIFT.
3777 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3779 * pthread_cond_init.c: Likewise.
3780 * pthread_cond_timedwait.c: Likewise.
3781 * pthread_cond_wait.c: Likewise.
3782 * pthread_condattr_getclock.c: Likewise.
3783 * pthread_condattr_setclock.c: Likewise.
3784 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3785 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3786 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3787 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3788 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3790 2007-05-28 Jakub Jelinek <jakub@redhat.com>
3792 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3795 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3797 (THREAD_GSCOPE_GET_FLAG): Remove.
3798 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3799 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3801 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3802 (THREAD_GSCOPE_GET_FLAG): Remove.
3803 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3804 instead of THREAD_GSCOPE_GET_FLAG.
3805 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3807 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3808 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3809 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3810 THREAD_GSCOPE_WAIT): Define.
3811 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3812 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3813 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3814 THREAD_GSCOPE_WAIT): Define.
3815 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3816 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3817 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3818 THREAD_GSCOPE_WAIT): Define.
3819 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3820 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3821 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3822 THREAD_GSCOPE_WAIT): Define.
3824 2007-05-24 Richard Henderson <rth@redhat.com>
3826 * descr.h (struct pthread): Add header.gscope_flag.
3827 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3828 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3829 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3830 THREAD_GSCOPE_WAIT): Define.
3832 2007-05-27 Ulrich Drepper <drepper@redhat.com>
3834 * init.c: Make it compile with older kernel headers.
3836 * tst-initializers1.c: Show through exit code which test failed.
3838 * pthread_rwlock_init.c: Also initialize __shared field.
3839 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3840 element in rwlock structure into four byte elements. One of them is
3841 the new __shared element.
3842 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3844 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3845 __shared, adjust names of other padding elements.
3846 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3847 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3848 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3849 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3851 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3852 futex to use private operations if possible.
3853 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3855 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3857 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3858 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3859 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3860 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3862 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3864 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3865 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3867 2007-05-26 Ulrich Drepper <drepper@redhat.com>
3869 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3870 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3871 * pthread_rwlock_timedrdlock.c: Likewise.
3872 * pthread_rwlock_tryrdlock.c: Likewise.
3874 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3877 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3878 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3879 duplication of __sem_wait_cleanup.
3881 * allocatestack.c: Revert last change.
3883 * sysdeps/i386/tls.h: Likewise.
3884 * sysdeps/x86_64/tls.h: Likewise.
3885 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3887 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3889 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3891 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3892 * pthread_barrier_init.c: Set private flag if pshared and private
3893 futexes are supported.
3894 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3895 private field in futex command setup.
3896 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3898 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3900 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3902 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3903 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3904 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3905 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3906 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3908 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3909 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3910 fields in the structure.
3911 (__old_sem_init): New function.
3912 * sem_open.c: Initialize all fields of the structure.
3913 * sem_getvalue.c: Adjust for renamed element.
3914 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3915 (gen-as-const-headers): Add structsem.sym.
3916 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3917 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3918 struct new_sem. Add struct old_sem.
3919 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3920 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3921 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3922 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3923 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3924 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3925 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3926 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3927 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3928 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3929 * tst-sem10.c: New file.
3930 * tst-sem11.c: New file.
3931 * tst-sem12.c: New file.
3932 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3935 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3936 Jakub Jelinek <jakub@redhat.com>
3938 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3939 Move __pthread_enable_asynccancel right before futex syscall.
3940 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3943 2007-05-24 Jakub Jelinek <jakub@redhat.com>
3945 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3946 THREAD_COPY_PRIVATE_FUTEX): Define.
3947 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3948 THREAD_COPY_PRIVATE_FUTEX): Define.
3949 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3950 * init.c (__pthread_initialize_minimal_internal): Use
3951 THREAD_SET_PRIVATE_FUTEX.
3953 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3954 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3955 THREAD_GSCOPE_FLAG_WAIT): Define.
3956 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3957 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3958 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3960 (THREAD_GSCOPE_GET_FLAG): Define.
3961 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3962 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3963 instead of ->header.gscope_flag directly.
3965 2007-05-23 Ulrich Drepper <drepper@redhat.com>
3967 * init.c (__pthread_initialize_minimal_internal): Check whether
3968 private futexes are available.
3969 * allocatestack.c (allocate_stack): Copy private_futex field from
3970 current thread into the new stack.
3971 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3972 futexes if they are available.
3973 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3974 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3975 in libc-lowlevellock.S allow using private futexes.
3976 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3977 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3979 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3980 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3981 if they are available.
3982 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3983 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3984 * sysdeps/i386/tcb-offsets.sym: Likewise.
3985 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3986 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3988 2007-05-21 Ulrich Drepper <drepper@redhat.com>
3990 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3991 Remove ptr_wait_lookup_done again.
3992 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3993 (__pthread_initialize_minimal_internal): Initialize
3994 _dl_wait_lookup_done pointer in _rtld_global directly.
3995 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3996 Remove code to code _dl_wait_lookup_done.
3997 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
4000 2007-05-21 Jakub Jelinek <jakub@redhat.com>
4002 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
4003 pthread_mutex_init failed with ENOTSUP.
4005 2007-05-19 Ulrich Drepper <drepper@redhat.com>
4007 * allocatestack.c (__wait_lookup_done): New function.
4008 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4009 Add ptr_wait_lookup_done.
4010 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
4011 * pthreadP.h: Declare __wait_lookup_done.
4012 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
4013 Define macros to implement reference handling of global scope.
4014 * sysdeps/x86_64/tls.h: Likewise.
4015 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4016 Initialize GL(dl_wait_lookup_done).
4018 2007-05-17 Ulrich Drepper <drepper@redhat.com>
4021 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
4023 * pthread_mutex_timedlock.c: Likewise.
4024 * pthread_mutex_trylock.c: Likewise.
4025 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4027 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
4028 * tst-robust9.c: New file.
4029 * tst-robustpi9.c: New file.
4031 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
4032 unnecessary extra cancellation test.
4034 2007-05-14 Ulrich Drepper <drepper@redhat.com>
4036 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
4037 extra cancellation test.
4038 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4040 2007-05-10 Ulrich Drepper <drepper@redhat.com>
4042 * descr.h (struct pthread): Rearrange members to fill hole in
4045 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4046 (__pthread_setaffinity_new): If syscall was successful and
4047 RESET_VGETCPU_CACHE is defined, use it before returning.
4048 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
4050 2007-05-10 Jakub Jelinek <jakub@redhat.com>
4053 * tst-align2.c: Include stackinfo.h.
4054 * tst-getpid1.c: Likewise.
4056 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
4059 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
4060 * tst-getpid1.c (do_test): Likewise.
4063 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
4064 (allocate_stack): Likewise.
4066 2007-05-07 Ulrich Drepper <drepper@redhat.com>
4068 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4069 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
4070 (__lll_robust_timedlock_wait): Likewise.
4071 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
4073 2007-05-06 Mike Frysinger <vapier@gentoo.org>
4076 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
4077 * tst-cancel4.c (tf_fdatasync): New test.
4079 2007-04-27 Ulrich Drepper <drepper@redhat.com>
4082 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
4083 check mutexes like normal mutexes.
4086 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
4087 Initialize the whole sigevent structure to appease valgrind.
4089 2007-04-25 Ulrich Drepper <drepper@redhat.com>
4091 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
4092 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
4094 2007-04-06 Ulrich Drepper <drepper@redhat.com>
4096 * tst-locale1.c: Avoid warnings.
4097 * tst-locale2.c: Likewise.
4099 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
4101 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4102 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
4104 2007-03-16 Jakub Jelinek <jakub@redhat.com>
4106 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
4107 __extern_always_inline where appropriate.
4108 * sysdeps/pthread/pthread.h: Likewise.
4110 2007-03-13 Richard Henderson <rth@redhat.com>
4112 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
4113 separate cfi regions for the two subsections.
4115 2007-02-25 Ulrich Drepper <drepper@redhat.com>
4117 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
4118 new thread, don't just decrement it.
4119 Patch by Suzuki K P <suzuki@in.ibm.com>.
4121 2007-02-21 Ulrich Drepper <drepper@redhat.com>
4123 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
4124 PTHFCT_CALL definition.
4126 2007-02-18 Ulrich Drepper <drepper@redhat.com>
4128 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
4129 available, don't use it.
4131 2007-02-09 Jakub Jelinek <jakub@redhat.com>
4133 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4134 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
4135 call into the kernel to delay.
4137 2007-01-18 Ulrich Drepper <drepper@redhat.com>
4139 * tst-initializers1.c: We want to test the initializers as seen
4140 outside of libc, so undefined _LIBC.
4142 * pthread_join.c (cleanup): Avoid warning.
4144 2007-01-17 Ulrich Drepper <drepper@redhat.com>
4146 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4147 (__lll_timedwait_tid): Add unwind info.
4149 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4150 function table, mangle the pointers.
4151 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
4152 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
4153 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
4154 demangle pointers before use.
4155 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
4157 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4158 * sysdeps/pthread/setxid.h: Likewise.
4160 2007-01-12 Ulrich Drepper <drepper@redhat.com>
4162 * tst-rwlock7.c: Show some more information in case of correct
4165 2007-01-11 Ulrich Drepper <drepper@redhat.com>
4167 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4168 (lll_futex_timed_wait): Undo part of last change, don't negate
4171 2007-01-10 Ulrich Drepper <drepper@redhat.com>
4173 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
4174 FUTEX_CMP_REQUEUE and lll_futex_requeue.
4176 2006-12-28 David S. Miller <davem@davemloft.net>
4178 * shlib-versions: Fix sparc64 linux target specification.
4180 2007-01-10 Jakub Jelinek <jakub@redhat.com>
4182 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4183 Adjust include path for pthread_barrier_wait.c move.
4185 2006-12-21 Jakub Jelinek <jakub@redhat.com>
4187 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
4188 tid isn't reread from pd->tid in between ESRCH test and the syscall.
4190 2006-12-06 Jakub Jelinek <jakub@redhat.com>
4192 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4193 6 argument cancellable syscalls.
4194 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4195 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4196 6 argument cancellable syscalls.
4197 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4199 2006-12-09 Ulrich Drepper <drepper@redhat.com>
4201 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4202 (__rtld_mrlock_initialize): Add missing closing parenthesis.
4204 2006-10-30 Jakub Jelinek <jakub@redhat.com>
4206 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4207 __sync_lock_release instead of __sync_lock_release_si.
4209 2006-10-29 Jakub Jelinek <jakub@redhat.com>
4211 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4213 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4214 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4215 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4216 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4217 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4218 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4219 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4220 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4221 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4222 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4223 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4225 2006-10-27 Ulrich Drepper <drepper@redhat.com>
4227 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4228 * pthread_barrier_wait.c: ...here.
4229 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4230 * pthread_cond_broadcast.c: ...here.
4231 * sysdeps/pthread/pthread_cond_signal.c: Move to...
4232 * pthread_cond_signal.c: ...here.
4233 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4234 * pthread_cond_timedwait.c: ...here.
4235 * sysdeps/pthread/pthread_cond_wait.c: Move to...
4236 * pthread_cond_wait.c: ...here.
4237 * sysdeps/pthread/pthread_once.c: Move to...
4238 * pthread_once.c: ...here.
4239 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4240 * pthread_rwlock_rdlock.c: ...here.
4241 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4242 * pthread_rwlock_timedrdlock.c: ...here.
4243 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4244 * pthread_rwlock_timedwrlock.c: ...here.
4245 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4246 * pthread_rwlock_unlock.c: ...here.
4247 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4248 * pthread_rwlock_wrlock.c: ...here.
4249 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4250 * pthread_spin_destroy.c: ...here.
4251 * sysdeps/pthread/pthread_spin_init.c: Move to...
4252 * pthread_spin_init.c: ...here.
4253 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4254 * pthread_spin_unlock.c: ...here.
4255 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4256 * pthread_getcpuclockid.c: ...here.
4258 * init.c: USE_TLS support is now always enabled.
4259 * tst-tls5.h: Likewise.
4260 * sysdeps/alpha/tls.h: Likewise.
4261 * sysdeps/i386/tls.h: Likewise.
4262 * sysdeps/ia64/tls.h: Likewise.
4263 * sysdeps/powerpc/tls.h: Likewise.
4264 * sysdeps/s390/tls.h: Likewise.
4265 * sysdeps/sh/tls.h: Likewise.
4266 * sysdeps/sparc/tls.h: Likewise.
4267 * sysdeps/x86_64/tls.h: Likewise.
4269 2006-10-27 Jakub Jelinek <jakub@redhat.com>
4271 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4272 __rtld_mrlock_change): Update oldval if atomic compare and exchange
4275 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4276 Define to THREAD_SELF->header.multiple_threads.
4277 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4279 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4281 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4282 (SINGLE_THREAD_P): Likewise.
4283 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4284 (SINGLE_THREAD_P): Likewise.
4285 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4286 (SINGLE_THREAD_P): Likewise.
4287 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4288 (SINGLE_THREAD_P): Likewise.
4289 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4291 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4292 (SINGLE_THREAD_P): Likewise.
4293 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4294 (SINGLE_THREAD_P): Likewise.
4295 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4298 2006-10-26 Jakub Jelinek <jakub@redhat.com>
4300 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4301 by default rather than 2_3_3.
4303 2006-10-17 Jakub Jelinek <jakub@redhat.com>
4305 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4306 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4307 atomic_* instead of catomic_* macros.
4309 2006-10-12 Ulrich Drepper <drepper@redhat.com>
4312 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4313 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4314 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4315 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4316 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4317 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4318 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4319 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4320 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4321 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4322 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4323 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4324 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4326 2006-10-11 Ulrich Drepper <drepper@redhat.com>
4328 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4329 cancelable syscalls with six parameters.
4331 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4332 operations instead of atomic_*.
4334 2006-10-09 Ulrich Drepper <drepper@redhat.com>
4336 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4338 2006-10-07 Ulrich Drepper <drepper@redhat.com>
4340 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4341 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4342 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4344 * pthread_attr_setstack.c: Allow overwriting the version number of the
4346 * pthread_attr_setstacksize.c: Likewise.
4347 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4349 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4350 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4352 2006-09-24 Ulrich Drepper <drepper@redhat.com>
4355 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4356 Patch by Petr Baudis.
4358 2006-09-18 Jakub Jelinek <jakub@redhat.com>
4360 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4362 * tst-cancel2.c (tf): Loop as long as something was written.
4364 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4366 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4367 mutexes wake all mutexes.
4368 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4369 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4370 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4372 2006-09-12 Ulrich Drepper <drepper@redhat.com>
4374 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4375 to guarantee the thread is always canceled.
4377 2006-09-08 Jakub Jelinek <jakub@redhat.com>
4379 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4381 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4382 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4383 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4384 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4385 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4387 2006-09-08 Ulrich Drepper <drepper@redhat.com>
4390 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4391 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4392 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4393 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4394 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4395 * Makefile (tests): Add tst-cond22.
4396 * tst-cond22.c: New file.
4398 2006-09-05 Ulrich Drepper <drepper@redhat.com>
4401 * descr.h (struct pthread): Add parent_cancelhandling.
4402 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4403 cancelhandling value to child.
4404 * pthread_create.c (start_thread): If parent thread was canceled
4405 reset the SIGCANCEL mask.
4406 * Makefile (tests): Add tst-cancel25.
4407 * tst-cancel25.c: New file.
4409 2006-09-05 Jakub Jelinek <jakub@redhat.com>
4410 Ulrich Drepper <drepper@redhat.com>
4412 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4413 counterp if it is already zero.
4414 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4416 2006-03-04 Jakub Jelinek <jakub@redhat.com>
4417 Roland McGrath <roland@redhat.com>
4419 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4420 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4421 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4422 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4423 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4424 lll_robust_mutex_timedlock, lll_mutex_unlock,
4425 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4426 Add _L_*_ symbols around the subsection.
4427 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4428 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4430 2006-03-03 Jakub Jelinek <jakub@redhat.com>
4431 Roland McGrath <roland@redhat.com>
4433 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4434 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4435 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4436 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4437 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4438 lll_robust_mutex_timedlock, lll_mutex_unlock,
4439 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4440 Add _L_*_ symbols around the subsection.
4441 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4442 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4444 2006-08-31 Ulrich Drepper <drepper@redhat.com>
4446 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4447 change because it can disturb too much existing code. If real hard
4448 reader preference is needed we'll introduce another type.
4449 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4450 (pthread_rwlock_timedwrlock): Likewise.
4451 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4454 2006-08-30 Ulrich Drepper <drepper@redhat.com>
4456 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4458 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4459 (pthread_rwlock_timedwrlock): Likewise.
4460 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4463 2006-08-25 Jakub Jelinek <jakub@redhat.com>
4465 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4466 Only define ifdef SHARED.
4468 2006-08-23 Ulrich Drepper <drepper@redhat.com>
4470 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4471 (free_stacks): ...here.
4472 (__free_stack_cache): New function.
4473 * pthreadP.h: Declare __free_stack_cache.
4474 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4476 * init.c (pthread_functions): Initialize ptr_freeres.
4477 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4478 New freeres function.
4480 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4483 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4485 2006-08-20 Ulrich Drepper <drepper@redhat.com>
4487 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4488 _XOPEN_REALTIME_THREADS.
4490 2006-08-15 Jakub Jelinek <jakub@redhat.com>
4492 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4493 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4494 HAVE_CLOCK_GETTIME_VSYSCALL.
4495 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4497 2006-08-14 Jakub Jelinek <jakub@redhat.com>
4499 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4500 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4501 * descr.h (struct priority_protection_data): New type.
4502 (struct pthread): Add tpp field.
4503 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4504 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4505 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4506 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4508 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4509 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4510 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4511 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4513 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4515 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4516 * pthread_mutexattr_getprioceiling.c
4517 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4518 in the SCHED_FIFO priority range.
4519 * pthread_mutexattr_setprioceiling.c
4520 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4521 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4522 if mutex is not TPP. Ceiling is now in __data.__lock.
4523 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4524 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4525 is now in __data.__lock. Add locking.
4526 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4527 * Makefile (libpthread-routines): Add tpp.
4528 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4529 * tst-tpp.h: New file.
4530 * tst-mutexpp1.c: New file.
4531 * tst-mutexpp6.c: New file.
4532 * tst-mutexpp10.c: New file.
4533 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4534 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4536 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4539 * pthread_join.c (pthread_join): Account for self being canceled
4540 when checking for deadlocks.
4541 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4542 (tf1): Don't print anything after pthread_join returns, this would be
4543 another cancellation point.
4545 * tst-join6.c: New file.
4546 * Makefile (tests): Add tst-join6.
4548 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4551 * pthread_setspecific.c (__pthread_setspecific): Check
4552 out-of-range index before checking for unused key.
4554 * sysdeps/pthread/gai_misc.h: New file.
4556 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4558 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4559 file. Don't use sysctl.
4560 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4561 overwrite the file if this is likely not true.
4563 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4565 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4566 * Makefile (tests): Add tst-getpid3.
4567 * tst-getpid3.c: New file.
4569 2006-07-30 Roland McGrath <roland@redhat.com>
4571 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4573 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4574 (pause_not_cancel): New macro.
4575 (nanosleep_not_cancel): New macro.
4576 (sigsuspend_not_cancel): New macro.
4577 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4578 nanosleep_not_cancel macro from <not-cancel.h>.
4579 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4580 macro from <not-cancel.h>.
4582 2006-07-28 Ulrich Drepper <drepper@redhat.com>
4583 Jakub Jelinek <jakub@redhat.com>
4585 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4586 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4587 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4588 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4589 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4590 * pthread_mutex_lock.c: Likewise.
4591 * pthread_mutex_timedlock.c: Likewise.
4592 * pthread_mutex_trylock.c: Likewise.
4593 * pthread_mutex_unlock.c: Likewise.
4594 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4596 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4597 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4598 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4599 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4600 pthread-pi-defines.sym.
4601 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4602 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4603 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4604 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4605 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4606 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4607 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4608 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4609 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4610 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4611 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4612 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4613 * tst-mutex2.c: Likewise.
4614 * tst-mutex3.c: Likewise.
4615 * tst-mutex4.c: Likewise.
4616 * tst-mutex5.c: Likewise.
4617 * tst-mutex6.c: Likewise.
4618 * tst-mutex7.c: Likewise.
4619 * tst-mutex7a.c: Likewise.
4620 * tst-mutex8.c: Likewise.
4621 * tst-mutex9.c: Likewise.
4622 * tst-robust1.c: Likewise.
4623 * tst-robust7.c: Likewise.
4624 * tst-robust8.c: Likewise.
4625 * tst-mutexpi1.c: New file.
4626 * tst-mutexpi2.c: New file.
4627 * tst-mutexpi3.c: New file.
4628 * tst-mutexpi4.c: New file.
4629 * tst-mutexpi5.c: New file.
4630 * tst-mutexpi6.c: New file.
4631 * tst-mutexpi7.c: New file.
4632 * tst-mutexpi7a.c: New file.
4633 * tst-mutexpi8.c: New file.
4634 * tst-mutexpi9.c: New file.
4635 * tst-robust1.c: New file.
4636 * tst-robust2.c: New file.
4637 * tst-robust3.c: New file.
4638 * tst-robust4.c: New file.
4639 * tst-robust5.c: New file.
4640 * tst-robust6.c: New file.
4641 * tst-robust7.c: New file.
4642 * tst-robust8.c: New file.
4643 * Makefile (tests): Add the new tests.
4645 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4646 * pthread_mutex_destroy.c: Remove unneeded label.
4648 2006-07-01 Ulrich Drepper <drepper@redhat.com>
4650 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4651 computations to compile time.
4653 2006-06-04 Ulrich Drepper <drepper@redhat.com>
4655 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4657 2006-05-15 Ulrich Drepper <drepper@redhat.com>
4659 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4661 2006-05-11 Ulrich Drepper <drepper@redhat.com>
4663 * pthread_key_create.c (__pthread_key_create): Do away with
4664 __pthread_keys_lock.
4666 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4667 (__kernel_cpumask_size): Mark as hidden.
4668 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4670 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4671 * semaphoreP.h (__sem_mappings_lock): Likewise.
4673 2006-05-10 Ulrich Drepper <drepper@redhat.com>
4675 * pthread_atfork.c: Mark __dso_handle as hidden.
4677 2006-05-09 Ulrich Drepper <drepper@redhat.com>
4680 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4681 the reload problem. Change the one path in pthread_cancel_init
4682 which causes the problem. Force gcc to reload. Simplify callers.
4683 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4684 (_Unwind_GetBSP): Undo last patch.
4686 2006-05-07 Ulrich Drepper <drepper@redhat.com>
4688 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4689 function pointer is reloaded after pthread_cancel_init calls.
4692 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4693 pointers are reloaded after pthread_cancel_init calls.
4695 2006-05-01 Ulrich Drepper <drepper@redhat.com>
4697 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4700 2006-04-27 Ulrich Drepper <drepper@redhat.com>
4702 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4703 Allocate new object which is passed to timer_sigev_thread so that
4704 the timer can be deleted before the new thread is scheduled.
4706 2006-04-26 Roland McGrath <roland@redhat.com>
4708 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4710 2006-04-08 Ulrich Drepper <drepper@redhat.com>
4712 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4713 suffix for conditional jumps.
4714 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4715 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4716 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4717 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4718 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4719 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4721 * init.c (sigcancel_handler): Compare with correct PID even if the
4722 thread is in the middle of a fork call.
4723 (sighandler_setxid): Likewise.
4724 Reported by Suzuki K P <suzuki@in.ibm.com> .
4726 2006-04-07 Jakub Jelinek <jakub@redhat.com>
4728 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4730 2006-04-06 Ulrich Drepper <drepper@redhat.com>
4732 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4733 fails [Coverity CID 105].
4735 2006-04-05 Ulrich Drepper <drepper@redhat.com>
4737 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4739 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4742 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4743 Define __lll_rel_instr using lwsync.
4745 2006-03-27 Ulrich Drepper <drepper@redhat.com>
4747 * allocatestack.c (allocate_stack): Always initialize robust_head.
4748 * descr.h: Define struct robust_list_head.
4749 (struct pthread): Use robust_list_head in robust mutex list definition.
4750 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4751 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4752 (__pthread_initialize_minimal_internal): Register robust_list with
4754 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4755 Declare __set_robust_list_avail.
4756 * pthread_create.c (start_thread): Register robust_list of new thread.
4757 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4759 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4760 number of users, it's unreliable.
4761 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4762 set_robust_list syscall is available.
4763 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4764 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4765 Set robust_head.list_op_pending before trying to lock a robust mutex.
4766 * pthread_mutex_timedlock.c: Likewise.
4767 * pthread_mutex_trylock.c: Likewise.
4768 * pthread_mutex_unlock.c: Likewise for unlocking.
4769 * Makefile (tests): Add tst-robust8.
4770 * tst-robust8.c: New file.
4772 2006-03-08 Andreas Schwab <schwab@suse.de>
4774 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4775 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4777 2006-03-05 Roland McGrath <roland@redhat.com>
4779 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4780 and $config_os doesn't match *linux*.
4782 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
4784 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4785 Use __syscall_error.
4786 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4787 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4788 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4789 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4790 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4791 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4793 2006-03-02 Ulrich Drepper <drepper@redhat.com>
4795 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4797 2006-03-01 Ulrich Drepper <drepper@redhat.com>
4799 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4800 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4802 (__lll_robust_timedlock_wait): Likewise.
4803 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4804 (__lll_robust_lock_wait): Likewise.
4805 (__lll_robust_timedlock_wait): Likewise.
4806 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4807 (__lll_robust_lock_wait): Likewise.
4808 (__lll_robust_timedlock_wait): Likewise.
4810 2006-03-01 Jakub Jelinek <jakub@redhat.com>
4812 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4813 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4814 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4815 lll_robust_mutex_unlock): Define.
4816 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4818 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4820 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4821 instead of <clone.S>.
4823 2006-02-27 Jakub Jelinek <jakub@redhat.com>
4825 * Makefile (libpthread-routines): Add
4826 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4827 and pthread_mutex_[sg]etprioceiling.
4828 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4829 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4830 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4831 pthread_mutex_setprioceiling.
4832 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4833 PTHREAD_PRIO_PROTECT): New enum values.
4834 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4835 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4836 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4838 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4839 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4840 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4842 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4843 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4844 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4845 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4846 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4847 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4848 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4850 * pthread_mutex_getprioceiling.c: New file.
4851 * pthread_mutex_setprioceiling.c: New file.
4852 * pthread_mutexattr_getprioceiling.c: New file.
4853 * pthread_mutexattr_setprioceiling.c: New file.
4854 * pthread_mutexattr_getprotocol.c: New file.
4855 * pthread_mutexattr_setprotocol.c: New file.
4857 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4859 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4861 2006-02-27 Roland McGrath <roland@redhat.com>
4863 * sysdeps/pthread/Subdirs: List nptl here too.
4864 * configure (libc_add_on_canonical): New variable.
4866 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4868 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4869 self to get main source tree's file.
4870 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4871 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4872 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4873 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4874 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4875 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4876 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4877 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4878 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4879 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4880 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4881 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4882 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4884 * Makefile: Use $(sysdirs) in vpath directive.
4886 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4887 (CPPFLAGS-timer_routines.c): Likewise.
4889 * Makeconfig (includes): Variable removed.
4891 2006-02-26 Roland McGrath <roland@redhat.com>
4893 * sysdeps/generic/pt-raise.c: Moved to ...
4894 * pt-raise.c: ... here.
4895 * sysdeps/generic/lowlevellock.h: Moved to ...
4896 * lowlevellock.h: ... here.
4898 2006-02-23 Roland McGrath <roland@redhat.com>
4900 * descr.h (struct pthread): Add final member `end_padding'.
4901 (PTHREAD_STRUCT_END_PADDING): Use it.
4903 2006-02-20 Roland McGrath <roland@redhat.com>
4905 * sysdeps/mips: Directory removed, saved in ports repository.
4906 * sysdeps/unix/sysv/linux/mips: Likewise.
4908 2006-02-18 Ulrich Drepper <drepper@redhat.com>
4910 * tst-robust1.c: Add second mutex to check that the mutex list is
4913 2006-02-17 Jakub Jelinek <jakub@redhat.com>
4915 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4916 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4917 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4918 lll_robust_mutex_unlock): New macros.
4919 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4920 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4921 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4922 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4923 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4925 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4927 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4929 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4931 2006-02-17 Ulrich Drepper <drepper@redhat.com>
4933 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4934 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4935 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4936 (lll_robust_mutex_unlock): Likewise.
4938 2006-02-13 Jakub Jelinek <jakub@redhat.com>
4940 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4941 Set robust_list.__next rather than robust_list.
4942 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4943 (__pthread_list_t): New typedef.
4944 (pthread_mutex_t): Replace __next and __prev fields with __list.
4945 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4946 (__pthread_list_t): New typedef.
4947 (pthread_mutex_t): Replace __next and __prev fields with __list.
4948 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4949 (__pthread_list_t, __pthread_slist_t): New typedefs.
4950 (pthread_mutex_t): Replace __next and __prev fields with __list.
4951 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4952 (__pthread_list_t, __pthread_slist_t): New typedefs.
4953 (pthread_mutex_t): Replace __next and __prev fields with __list.
4954 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4955 (__pthread_list_t, __pthread_slist_t): New typedefs.
4956 (pthread_mutex_t): Replace __next and __prev fields with __list.
4957 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4958 (__pthread_slist_t): New typedef.
4959 (pthread_mutex_t): Replace __next field with __list.
4961 2006-02-15 Ulrich Drepper <drepper@redhat.com>
4963 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4964 PTHREAD_MUTEX_OWNERDEAD.
4965 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4966 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4967 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4968 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4969 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4970 to PTHREAD_MUTEX_INCONSISTENT.
4971 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4972 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4973 * pthread_mutex_trylock.c: Likewise.
4974 * pthread_mutex_timedlock.c: Likewise.
4975 * pthread_mutex_unlock.c: Likewise.
4976 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4977 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4978 lowlevelrobustlock.sym.
4979 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4980 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4982 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4983 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4984 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4985 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4986 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4988 2006-02-12 Ulrich Drepper <drepper@redhat.com>
4990 * allocatestack.c (allocate_stack): Initialize robust_list.
4991 * init.c (__pthread_initialize_minimal_internal): Likewise.
4992 * descr.h (struct xid_command): Pretty printing.
4993 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4994 robust_list. Adjust macros.
4995 * pthread_create.c (start_thread): Adjust robust_list handling.
4996 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4997 but the owner for all robust mutex types.
4998 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4999 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
5000 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5001 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
5003 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
5004 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
5006 2006-02-08 Jakub Jelinek <jakub@redhat.com>
5008 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
5009 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
5011 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5013 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
5015 (lll_futex_timed_wait): Define.
5017 2006-01-19 Ulrich Drepper <drepper@redhat.com>
5019 * tst-cancel4.c: Test ppoll.
5021 2006-01-18 Andreas Jaeger <aj@suse.de>
5024 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
5025 (pthread_mutex_t): Follow changes for other archs. Based on patch
5026 by Jim Gifford <patches@jg555.com>.
5028 2006-01-13 Richard Henderson <rth@redhat.com>
5030 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
5032 2006-01-10 Roland McGrath <roland@redhat.com>
5034 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
5035 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5036 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5037 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5038 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5039 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5040 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5041 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5042 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5043 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5045 2006-01-09 Roland McGrath <roland@redhat.com>
5047 * tst-initializers1-c89.c: New file.
5048 * tst-initializers1-c99.c: New file.
5049 * tst-initializers1-gnu89.c: New file.
5050 * tst-initializers1-gnu99.c: New file.
5051 * Makefile (tests): Add them.
5052 (CFLAGS-tst-initializers1-c89.c): New variable.
5053 (CFLAGS-tst-initializers1-c99.c): New variable.
5054 (CFLAGS-tst-initializers1-gnu89.c): New variable.
5055 (CFLAGS-tst-initializers1-gnu99.c): New variable.
5057 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5058 Use __extension__ on anonymous union definition.
5059 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5060 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5061 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5062 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5063 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5065 2006-01-08 Jakub Jelinek <jakub@redhat.com>
5067 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5068 Don't give the union a name because it changes the mangled name.
5069 Instead name the struct for __data.
5070 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
5072 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
5075 2006-01-09 Jakub Jelinek <jakub@redhat.com>
5077 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
5078 stack bias to mc_ftp field.
5080 2006-01-07 Ulrich Drepper <drepper@redhat.com>
5082 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
5083 being too clever and reloading the futex value where it shouldn't.
5085 2006-01-06 Ulrich Drepper <drepper@redhat.com>
5087 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
5090 2006-01-06 Jakub Jelinek <jakub@redhat.com>
5092 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5095 2006-01-06 Ulrich Drepper <drepper@redhat.com>
5097 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
5098 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
5099 rename in tcbhead_t.
5101 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5102 Don't give the union a name because it changes the mangled name.
5103 Instead name the struct for __data.
5104 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5105 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5106 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5107 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5108 * pthread_create.c (start_thread): Adjust robust mutex free loop.
5109 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
5111 2006-01-05 Ulrich Drepper <drepper@redhat.com>
5113 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5115 (lll_futex_timed_wait): Define.
5116 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5117 * sysdeps/pthread/aio_misc.h: New file.
5119 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
5121 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
5123 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
5125 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5126 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
5127 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5129 2006-01-04 Ulrich Drepper <drepper@redhat.com>
5131 * tst-cancel24.cc: Use C headers instead of C++ headers.
5133 2006-01-03 Jakub Jelinek <jakub@redhat.com>
5135 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
5136 sparc-linux configured glibc.
5137 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
5138 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
5139 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
5140 atomic_compare_and_exchange_val_24_acq instead of
5141 atomic_compare_and_exchange_val_acq.
5142 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
5143 instead of atomic_exchange_rel.
5144 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
5145 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
5147 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
5149 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
5150 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
5151 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
5152 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
5153 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
5154 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
5156 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
5158 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
5159 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
5160 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
5162 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
5164 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
5166 2006-01-03 Ulrich Drepper <drepper@redhat.com>
5168 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
5171 2006-01-02 Jakub Jelinek <jakub@redhat.com>
5173 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
5174 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5175 THREAD_COPY_POINTER_GUARD): Define.
5176 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
5177 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
5179 2006-01-01 Ulrich Drepper <drepper@redhat.com>
5181 * version.c: Update copyright year.
5183 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5185 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
5186 .eh_frame section, use cfi_* directives.
5187 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5189 2005-12-30 Ulrich Drepper <drepper@redhat.com>
5191 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5194 2005-12-29 Ulrich Drepper <drepper@redhat.com>
5196 * sysdeps/pthread/sigaction.c: Removed.
5197 * sigaction.c: New file.
5198 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5200 2005-12-28 Ulrich Drepper <drepper@redhat.com>
5202 * Makefile (tests): Add tst-signal7.
5203 * tst-signal7.c: New file.
5205 2005-12-27 Roland McGrath <roland@redhat.com>
5207 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5208 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5209 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5210 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5211 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5212 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5213 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5214 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5215 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5216 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5217 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5219 2005-12-27 Jakub Jelinek <jakub@redhat.com>
5221 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5222 and __prev field to pthread_mutex_t.
5223 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5224 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5225 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5226 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5227 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5230 2005-12-26 Ulrich Drepper <drepper@redhat.com>
5232 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5233 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5234 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5235 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5236 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5237 and PTHREAD_MUTEXATTR_FLAG_BITS.
5238 * descr.h (struct pthread): Add robust_list field and define
5239 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5240 * pthread_mutexattr_getrobust.c: New file.
5241 * pthread_mutexattr_setrobust.c: New file.
5242 * pthread_mutex_consistent.c: New file.
5243 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5244 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5245 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5246 Adjust pthread_mutex_t initializers.
5247 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5248 field to pthread_mutex_t.
5249 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5250 and __prev field to pthread_mutex_t.
5251 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5252 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5253 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5254 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5255 * pthread_mutexattr_gettype.c: Likewise.
5256 * pthread_mutexattr_setpshared.c: Likewise.
5257 * pthread_mutexattr_settype.c: Likewise.
5258 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5259 Initialize mutex kind according to robust flag.
5260 * pthread_mutex_lock.c: Implement local robust mutex.
5261 * pthread_mutex_timedlock.c: Likewise.
5262 * pthread_mutex_trylock.c: Likewise.
5263 * pthread_mutex_unlock.c: Likewise.
5264 * pthread_create.c (start_thread): Mark robust mutexes which remained
5266 * tst-robust1.c: New file.
5267 * tst-robust2.c: New file.
5268 * tst-robust3.c: New file.
5269 * tst-robust4.c: New file.
5270 * tst-robust5.c: New file.
5271 * tst-robust6.c: New file.
5272 * tst-robust7.c: New file.
5273 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5274 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5275 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5276 tst-robust5, tst-robust6, and tst-robust7.
5278 * tst-typesizes.c: New file.
5279 * Makefile (tests): Add tst-typesizes.
5281 * tst-once3.c: More debug output.
5283 2005-12-24 Ulrich Drepper <drepper@redhat.com>
5285 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5286 missing after last change.
5288 * version.c: Update copyright year.
5290 2005-12-23 Ulrich Drepper <drepper@redhat.com>
5292 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5293 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5294 * pthread_mutex_trylock.c: Likewise.
5295 * pthread_mutex_timedlock.c: Likewise.
5296 * pthread_mutex_unlock.c: Likewise.
5298 2005-12-22 Roland McGrath <roland@redhat.com>
5300 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5301 so that #include_next's search location is not reset to the -I..
5302 directory where <nptl/...> can be found.
5304 2005-12-22 Ulrich Drepper <drepper@redhat.com>
5307 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5308 Fix unwind info. Remove useless branch prediction prefix.
5309 * tst-cancel24.cc: New file.
5310 * Makefile: Add rules to build and run tst-cancel24.
5312 2005-12-21 Roland McGrath <roland@redhat.com>
5314 * libc-cancellation.c: Use <> rather than "" #includes.
5315 * pt-cleanup.c: Likewise.
5316 * pthread_create.c: Likewise.
5317 * pthread_join.c: Likewise.
5318 * pthread_timedjoin.c: Likewise.
5319 * pthread_tryjoin.c: Likewise.
5320 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5321 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5322 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5323 * unwind.c: Likewise.
5325 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5327 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5328 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5329 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5330 THREAD_COPY_POINTER_GUARD): Define.
5332 2005-12-19 Jakub Jelinek <jakub@redhat.com>
5334 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5336 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5337 THREAD_COPY_POINTER_GUARD): Define.
5338 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5339 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5340 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5341 THREAD_COPY_POINTER_GUARD): Define.
5342 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5343 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5344 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5345 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5346 Use PTR_DEMANGLE for B0 if defined.
5348 2005-12-17 Ulrich Drepper <drepper@redhat.com>
5350 * pthread_create.c (__pthread_create_2_1): Use
5351 THREAD_COPY_POINTER_GUARD if available.
5352 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5353 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5354 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5355 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5356 * sysdeps/x86_64/tls.h: Likewise.
5358 2005-12-15 Roland McGrath <roland@redhat.com>
5360 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5362 2005-12-13 Ulrich Drepper <drepper@redhat.com>
5364 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5366 * errno-loc.c: New file.
5368 2005-12-12 Roland McGrath <roland@redhat.com>
5370 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5371 adjustments before choosing stack size. Update minimum stack size
5372 calculation to match allocate_stack change.
5374 2005-12-12 Ulrich Drepper <drepper@redhat.com>
5376 * allocatestack.c (allocate_stack): Don't demand that there is an
5377 additional full page available on the stack beside guard, TLS, the
5380 2005-11-24 Ulrich Drepper <drepper@redhat.com>
5382 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5383 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5385 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5386 compiling 32-bit code we must define __cleanup_fct_attribute.
5388 005-11-24 Jakub Jelinek <jakub@redhat.com>
5391 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5392 __attribute__ instead of __attribute.
5393 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5394 (__cleanup_fct_attribute): Likewise.
5396 2005-11-17 Jakub Jelinek <jakub@redhat.com>
5398 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5399 a write barrier before writing libgcc_s_getcfa.
5401 2005-11-06 Ulrich Drepper <drepper@redhat.com>
5403 * sysdeps/unix/sysv/linux/configure: Removed.
5405 2005-11-05 Ulrich Drepper <drepper@redhat.com>
5407 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5408 optional init_array/fini_array support.
5410 2005-10-24 Roland McGrath <roland@redhat.com>
5412 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5413 versioned_symbol use.
5415 2005-10-16 Roland McGrath <roland@redhat.com>
5417 * init.c (__pthread_initialize_minimal_internal): Even when using a
5418 compile-time default stack size, apply the minimum that allocate_stack
5419 will require, and round up to page size.
5421 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5423 * Makefile ($(test-modules)): Remove static pattern rule.
5425 2005-10-14 Jakub Jelinek <jakub@redhat.com>
5426 Ulrich Drepper <drepper@redhat.com>
5428 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5429 alignment in callback function.
5430 * Makefile: Add rules to build and run tst-align3.
5431 * tst-align3.c: New file.
5433 2005-10-03 Jakub Jelinek <jakub@redhat.com>
5435 * allocatestack.c (setxid_signal_thread): Add
5436 INTERNAL_SYSCALL_DECL (err).
5438 2005-10-02 Jakub Jelinek <jakub@redhat.com>
5440 * allocatestack.c (setxid_signal_thread): Need to use
5441 atomic_compare_and_exchange_bool_acq.
5443 2005-10-01 Ulrich Drepper <drepper@redhat.com>
5444 Jakub Jelinek <jakub@redhat.com>
5446 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5448 (struct pthread): Move specific_used field to avoid padding.
5449 Add setxid_futex field.
5450 * init.c (sighandler_setxid): Reset setxid flag and release the
5452 * allocatestack.c (setxid_signal_thread): New function. Broken
5453 out of the bodies of the two loops in __nptl_setxid. For undetached
5454 threads check whether they are exiting and if yes, don't send a signal.
5455 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5456 * pthread_create.c (start_thread): For undetached threads, check
5457 whether setxid bit is set. If yes, wait until signal has been
5460 * allocatestack.c (STACK_VARIABLES): Initialize them.
5461 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5463 2004-09-02 Jakub Jelinek <jakub@redhat.com>
5465 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5466 waiters, awake all waiters on the associated mutex.
5468 2005-09-22 Roland McGrath <roland@redhat.com>
5470 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5471 ../sysdeps/x86_64/hp-timing.h).
5473 2005-08-29 Jakub Jelinek <jakub@redhat.com>
5475 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5476 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5477 (lll_futex_wake_unlock): Define.
5478 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5479 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5480 (lll_futex_wake_unlock): Define.
5481 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5482 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5483 (lll_futex_wake_unlock): Define.
5484 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5485 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5486 (lll_futex_wake_unlock): Define.
5487 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5488 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5489 (lll_futex_wake_unlock): Define.
5490 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5491 lll_futex_wake_unlock.
5492 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5493 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5494 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5495 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5496 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5497 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5499 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5501 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5502 Fix typo in register name.
5504 2005-08-23 Ulrich Drepper <drepper@redhat.com>
5506 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5507 Use __sigfillset. Document that sigfillset does the right thing wrt
5510 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5513 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5514 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5515 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5516 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5517 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5518 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5520 * Makefile (tests): Add tst-initializers1.
5521 (CFLAGS-tst-initializers1.c): Set.
5522 * tst-initializers1.c: New test.
5524 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5526 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5527 Make sure __flags are located at offset 48 from the start of the
5530 2005-07-02 Roland McGrath <roland@redhat.com>
5532 * Makeconfig: Comment fix.
5534 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5536 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5537 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5538 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5539 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5540 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5541 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5542 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5543 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5544 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5545 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5547 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5549 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5550 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5551 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5553 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5554 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5555 field. Put in sysinfo field unconditionally.
5556 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5557 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5558 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5559 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5561 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5562 * pthread_create.c (__pthread_create_2_1): Use
5563 THREAD_COPY_STACK_GUARD macro.
5564 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5566 * tst-stackguard1.c: New file.
5567 * tst-stackguard1-static.c: New file.
5569 2005-06-14 Alan Modra <amodra@bigpond.net.au>
5571 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5572 Invoke CGOTSETUP and CGOTRESTORE.
5573 (CGOTSETUP, CGOTRESTORE): Define.
5575 2005-05-29 Richard Henderson <rth@redhat.com>
5577 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5578 (tf_write, tf_writev): Use it.
5579 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5582 2005-05-23 Jakub Jelinek <jakub@redhat.com>
5584 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5585 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5586 __librt_*_asynccancel@local.
5588 2005-05-17 Alan Modra <amodra@bigpond.net.au>
5590 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5591 all occurrences of JUMPTARGET. Instead append @local to labels.
5593 2005-05-20 Jakub Jelinek <jakub@redhat.com>
5595 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5596 size/alignment of struct pthread rather than tcbhead_t.
5597 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5599 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5601 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5604 2005-05-19 Richard Henderson <rth@redhat.com>
5606 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5607 __sync_val_compare_and_swap, not explicit _si variant.
5608 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5610 2005-05-03 Ulrich Drepper <drepper@redhat.com>
5613 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5615 2005-05-03 Jakub Jelinek <jakub@redhat.com>
5617 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5618 .eh_frame section, use cfi_* directives.
5620 2005-04-27 Jakub Jelinek <jakub@redhat.com>
5622 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5625 2005-04-27 Ulrich Drepper <drepper@redhat.com>
5628 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5631 2005-04-27 Roland McGrath <roland@redhat.com>
5633 * Makefile (tests): Remove tst-clock2.
5635 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5636 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5637 translating to the kernel clockid_t for our own process/thread clock.
5639 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5641 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5643 * old_pthread_cond_init.c: Include <errno.h>.
5644 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5645 process shared or uses clock other than CLOCK_REALTIME.
5646 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5648 2005-04-13 David S. Miller <davem@davemloft.net>
5650 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5651 * sysdeps/sparc/sparc64/clone.S: New file.
5653 2005-04-05 Jakub Jelinek <jakub@redhat.com>
5656 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5657 __inline instead of inline.
5658 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5660 2005-03-31 Jakub Jelinek <jakub@redhat.com>
5662 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5663 functionally equivalent, but shorter instructions.
5664 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5665 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5666 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5668 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5669 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5670 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5671 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5672 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5673 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5674 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5676 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5677 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5678 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5679 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5680 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5682 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5684 * sysdeps/mips/Makefile: New file.
5685 * sysdeps/mips/nptl-sysdep.S: New file.
5686 * sysdeps/mips/tcb-offsets.sym: New file.
5687 * sysdeps/mips/pthread_spin_lock.S: New file.
5688 * sysdeps/mips/pthread_spin_trylock.S: New file.
5689 * sysdeps/mips/pthreaddef.h: New file.
5690 * sysdeps/mips/tls.h: New file.
5691 * sysdeps/mips/jmpbuf-unwind.h: New file.
5692 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5693 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5694 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5695 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5696 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5697 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5698 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5699 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5700 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5701 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5703 2005-03-23 Ulrich Drepper <drepper@redhat.com>
5706 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5709 2005-03-10 Jakub Jelinek <jakub@redhat.com>
5711 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5713 2005-02-25 Roland McGrath <roland@redhat.com>
5715 * alloca_cutoff.c: Correct license text.
5716 * tst-unload.c: Likewise.
5717 * sysdeps/pthread/allocalim.h: Likewise.
5718 * sysdeps/pthread/pt-initfini.c: Likewise.
5719 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5720 * sysdeps/pthread/bits/sigthread.h: Likewise.
5721 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5722 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5724 2005-02-16 Roland McGrath <roland@redhat.com>
5726 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5727 Use unsigned int * for ptr_nthreads.
5729 2005-02-14 Alan Modra <amodra@bigpond.net.au>
5732 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5735 2005-02-07 Richard Henderson <rth@redhat.com>
5738 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5741 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
5743 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5744 order of arguments in invocation of atomic_add_zero.
5746 2005-01-26 Jakub Jelinek <jakub@redhat.com>
5749 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5750 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5751 at least gotntpoff relocation and addition.
5752 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5754 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5756 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5759 2005-01-06 Ulrich Drepper <drepper@redhat.com>
5761 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5762 entry for static tls deallocation fix.
5763 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5764 also contains information whether the memory pointed to is static
5766 * sysdeps/i386/tls.h: Likewise.
5767 * sysdeps/ia64/tls.h: Likewise.
5768 * sysdeps/powerpc/tls.h: Likewise.
5769 * sysdeps/s390/tls.h: Likewise.
5770 * sysdeps/sh/tls.h: Likewise.
5771 * sysdeps/sparc/tls.h: Likewise.
5772 * sysdeps/x86_64/tls.h: Likewise.
5774 2004-12-27 Ulrich Drepper <drepper@redhat.com>
5776 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5778 2004-12-21 Jakub Jelinek <jakub@redhat.com>
5780 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5782 * Makefile (tests): Add tst-align2.
5783 * tst-align2.c: New test.
5784 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5785 -mpreferred-stack-boundary=4.
5787 2004-12-18 Roland McGrath <roland@redhat.com>
5789 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5790 New file removed withdrawn for the moment.
5792 2004-12-17 Richard Henderson <rth@redhat.com>
5794 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5795 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5797 2004-12-16 Ulrich Drepper <drepper@redhat.com>
5799 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5800 Increased PTHREAD_STACK_MIN.
5802 * tst-context1.c (stacks): Use bigger stack size.
5804 2004-12-16 Jakub Jelinek <jakub@redhat.com>
5806 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5807 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5809 2004-12-15 Jakub Jelinek <jakub@redhat.com>
5811 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5812 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5813 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5815 2004-12-15 Ulrich Drepper <drepper@redhat.com>
5817 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5819 2004-12-14 Ulrich Drepper <drepper@redhat.com>
5821 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5822 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5824 * tst-getpid1.c: If child crashes, report this first. Print which
5827 2004-12-09 Ulrich Drepper <drepper@redhat.com>
5829 * init.c (__pthread_initialize_minimal_internal): Also unblock
5832 2004-12-01 Jakub Jelinek <jakub@redhat.com>
5834 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5835 _POSIX_THREAD_CPUTIME): Define to 0.
5836 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5837 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5838 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5839 __timer_signal_thread_tclk): Remove.
5840 (init_module): Remove their initialization.
5841 (thread_cleanup): Remove their cleanup assertions.
5842 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5843 __timer_signal_thread_tclk): Remove.
5844 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5845 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5846 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5848 2004-12-07 Jakub Jelinek <jakub@redhat.com>
5850 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5851 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5853 * Makefile (tests): Add tst-getpid2.
5854 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5855 (do_test): Use it. Use __clone2 instead of clone on ia64.
5856 * tst-getpid2.c: New test.
5858 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5860 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5862 2004-12-04 Ulrich Drepper <drepper@redhat.com>
5864 * Makefile (tests): Add tst-getpid1.
5865 * tst-getpid1.c: New file.
5866 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5867 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5869 2004-12-02 Roland McGrath <roland@redhat.com>
5871 * Makefile (libpthread-nonshared): Variable removed.
5872 ($(objpfx)libpthread_nonshared.a): Target removed.
5873 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5874 These are now handled by generic magic from
5875 libpthread-static-only-routines being set.
5877 2004-11-27 Ulrich Drepper <drepper@redhat.com>
5879 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5880 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5881 _POSIX_THREAD_PRIO_PROTECT): Define.
5882 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5883 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5884 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5886 2004-11-26 Jakub Jelinek <jakub@redhat.com>
5888 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5889 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5890 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5891 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5892 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5893 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5894 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5896 2004-11-24 Ulrich Drepper <drepper@redhat.com>
5898 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5900 * Makefile (libpthread-routines): Add pthread_setschedprio.
5901 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5902 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5903 * pthread_setschedprio.c: New file.
5905 2004-11-20 Jakub Jelinek <jakub@redhat.com>
5907 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5908 * pthread_cancel.c (pthread_create): Likewise.
5910 * Makefile (libpthread-routines): Add vars.
5911 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5912 * init.c (__default_stacksize, __is_smp): Remove.
5914 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5915 and define a wrapper macro.
5916 (PTHREAD_STATIC_FN_REQUIRE): Define.
5917 * allocatestack.c (__find_thread_by_id): Undefine.
5918 * pthread_create (__pthread_keys): Remove.
5919 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5920 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5921 PTHREAD_STATIC_FN_REQUIRE.
5923 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5925 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5926 parameter to REGISTER macro.
5928 2004-11-17 Roland McGrath <roland@redhat.com>
5930 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5931 Make sure SIGCANCEL is blocked as well.
5933 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5935 * sysdeps/pthread/setxid.h: New file.
5936 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5937 (struct xid_command): Add forward decl.
5938 (struct pthread_functions): Change return type of __nptl_setxid hook
5940 * pthreadP.h (__nptl_setxid): Change return type to int.
5941 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5942 calling thread, return its return value and set errno on failure.
5943 * descr.h (struct xid_command): Change id type to long array.
5945 * Makefile: Add rules to build and test tst-setuid1 and
5947 * tst-setuid1.c: New test.
5948 * tst-setuid1-static.c: New test.
5950 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5952 * Makefile (tests): Add tst-exit3.
5953 * tst-exit3.c: New test.
5955 2004-11-09 Ulrich Drepper <drepper@redhat.com>
5957 * Makefile (tests): Add tst-exit2.
5958 * tst-exit2.c: New file.
5960 2004-11-09 Roland McGrath <roland@redhat.com>
5963 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5964 here, before calling clone.
5965 * pthread_create.c (start_thread): Don't do it here.
5967 2004-11-02 Jakub Jelinek <jakub@redhat.com>
5969 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5971 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5973 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5974 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5977 2004-10-28 Jakub Jelinek <jakub@redhat.com>
5979 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5980 if sched_priority is not between minprio and maxprio.
5982 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5984 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5985 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5987 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5988 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5990 2004-10-24 Ulrich Drepper <drepper@redhat.com>
5992 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5993 not-cancelable I/O functions.
5995 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5997 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5998 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5999 make sure 2 is stored in the futex and we looked at the old value.
6000 Fix a few other problems to return the correct value.
6002 2004-10-14 Richard Henderson <rth@redhat.com>
6004 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
6007 2004-10-06 Jakub Jelinek <jakub@redhat.com>
6009 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
6010 of pthread-functions.h and pthreaddef.h.
6011 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
6013 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6014 Change __data.__nwaiters from int to unsigned int.
6016 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
6017 sysconf (_SC_THREAD_CPUTIME) returns negative value.
6019 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
6022 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
6023 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
6025 2004-10-06 Ulrich Drepper <drepper@redhat.com>
6027 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
6028 test fails, remove message queue.
6029 (tf_msgsnd): Likewise.
6031 2004-10-05 Jakub Jelinek <jakub@redhat.com>
6033 * tst-clock1.c: Change #ifdef to #if defined.
6034 * tst-clock2.c: Likewise.
6035 * tst-cond11.c: Likewise.
6037 * sysdeps/pthread/timer_create.c (timer_create): Use
6038 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
6039 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
6042 2004-10-05 Jakub Jelinek <jakub@redhat.com>
6044 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
6045 _POSIX_THREAD_CPUTIME): Define to 0.
6047 2004-10-04 Ulrich Drepper <drepper@redhat.com>
6049 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
6050 and _POSIX_THREAD_CPUTIME to zero.
6051 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6052 * tst-barrier2.c: Fix testing for POSIX feature.
6053 * tst-clock1.c: Likewise.
6054 * tst-clock2.c: Likewise.
6055 * tst-cond11.c: Likewise.
6056 * tst-cond4.c: Likewise.
6057 * tst-cond6.c: Likewise.
6058 * tst-flock2.c: Likewise.
6059 * tst-mutex4.c: Likewise.
6060 * tst-mutex9.c: Likewise.
6061 * tst-rwlock12.c: Likewise.
6062 * tst-rwlock4.c: Likewise.
6063 * tst-signal1.c: Likewise.
6064 * tst-spin2.c: Likewise.
6065 * sysdeps/pthread/posix-timer.h: Likewise.
6066 * sysdeps/pthread/timer_create.c: Likewise.
6067 * sysdeps/pthread/timer_routines.c: Likewise.
6069 2004-10-01 Ulrich Drepper <drepper@redhat.com>
6071 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6072 (__lll_mutex_timedlock_wait): Address futex correctly.
6074 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6075 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6076 make sure 2 is stored in the futex and we looked at the old value.
6077 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6078 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
6079 which might very well made the code not working at all before.
6082 2004-09-28 Ulrich Drepper <drepper@redhat.com>
6084 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6085 allow SIGSETXID to be sent.
6086 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
6087 for SIGSETXID to be defined.
6088 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
6089 SIGSETXID cannot be blocked.
6091 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6092 Add __extension__ to long long types.
6093 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6094 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6095 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6096 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6097 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6098 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6099 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6101 2004-09-25 Ulrich Drepper <drepper@redhat.com>
6103 * descr.h (struct pthread): Add stopped_start field.
6104 * sysdeps/pthread/createthread.c (create_thread): Set
6105 start_stopped flag in descriptor for new thread appropriately.
6106 * pthread_create.c (start_thread): Only take lock to be stopped on
6107 startup if stopped_start flag says so.
6109 2004-09-24 Ulrich Drepper <drepper@redhat.com>
6111 * pthread_create.c (__pthread_create_2_1): Remember whether thread
6112 is created detached and if yes, do not try to free the stack in case
6113 the thread creation failed.
6114 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
6115 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
6116 case there has been no error. [BZ #405]
6118 * pthread_create.c (start_thread): Don't wait for scheduler data
6119 etc to be set at the beginning of the function. The cancellation
6120 infrastructure must have been set up. And enable async
6121 cancellation before potentially going to sleep. [BZ #401]
6123 2004-09-20 Ulrich Drepper <drepper@redhat.com>
6125 * Versions: Remove exports for pthread_set*id_np functions.
6126 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
6128 * Makefile: Don't build pthread_set*id code for now.
6130 2004-09-19 Ulrich Drepper <drepper@redhat.com>
6132 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
6134 * allocatestack.c (__nptl_setxid): New function.
6135 * descr.h (struct xid_command): Define type.
6136 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
6137 (sighandler_setxid): New function.
6138 (__pthread_initialize_minimal): Register sighandler_setxid for
6140 * pt-allocrtsig.c: Update comment.
6141 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
6142 Declare __nptl_setxid.
6143 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
6144 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
6145 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6146 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6147 and pthread_setresuid_np.
6148 * pthread_setgid_np.c: New file.
6149 * pthread_setuid_np.c: New file.
6150 * pthread_setegid_np.c: New file.
6151 * pthread_seteuid_np.c: New file.
6152 * pthread_setregid_np.c: New file.
6153 * pthread_setreuid_np.c: New file.
6154 * pthread_setresgid_np.c: New file.
6155 * pthread_setresuid_np.c: New file.
6156 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
6157 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6158 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6159 and pthread_setresuid_np.
6160 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
6161 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
6162 pthread_setregid, and pthread_setresgid.
6164 2004-09-18 Ulrich Drepper <drepper@redhat.com>
6166 * allocatestack.c (allocate_stack): Return EAGAIN instead of
6167 ENOMEM when out of memory.
6169 2004-09-10 Roland McGrath <roland@redhat.com>
6172 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
6173 code, since we don't try to use the broken CLONE_STOPPED any more.
6174 * pthread_create.c (start_thread): Likewise.
6176 2004-09-15 Richard Henderson <rth@redhat.com>
6178 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
6180 2004-09-01 David Mosberger <davidm@hpl.hp.com>
6182 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
6183 (__libc_unwind_longjmp): Delete macro and declare as function.
6184 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
6185 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
6187 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
6188 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6189 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6191 2004-09-12 Ulrich Drepper <drepper@redhat.com>
6193 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6195 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6196 types also for __USE_XOPEN2K.
6197 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6198 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6199 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6200 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6201 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6202 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6203 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6206 2004-09-08 Ulrich Drepper <drepper@redhat.com>
6208 * sysdeps/pthread/pthread.h
6209 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6210 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6211 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6212 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6215 2004-09-07 Ulrich Drepper <drepper@redhat.com>
6217 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6218 PSEUDO to be used with . prefix.
6220 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6221 Use atomic_increment instead of atomic_exchange_and_add.
6222 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6224 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6226 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6229 * allocatestack.c (allocate_stack): Use atomic_increment_val
6230 instead of atomic_exchange_and_add.
6231 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6232 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6234 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6237 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6238 the initialization function might throw.
6240 2005-09-05 Richard Henderson <rth@redhat.com>
6242 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6243 Move definition inside libpthread, libc, librt check. Provide
6244 definition for rtld.
6246 2004-09-02 Ulrich Drepper <drepper@redhat.com>
6248 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6249 * sysdeps/i386/jmpbuf-unwind.h: Likewise
6250 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6251 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6252 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6253 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6254 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6255 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6258 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6259 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6260 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6262 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6263 Decrement __nwaiters. If pthread_cond_destroy has been called and
6264 this is the last waiter, signal pthread_cond_destroy caller and
6265 avoid using the pthread_cond_t structure after unlock.
6266 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6267 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6268 Read clock type from the least significant bits of __nwaiters instead
6270 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6271 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6273 2004-08-31 Jakub Jelinek <jakub@redhat.com>
6276 * Makefile (tests): Add tst-cond20 and tst-cond21.
6277 * tst-cond20.c: New test.
6278 * tst-cond21.c: New test.
6279 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6280 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6282 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6284 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6285 (pthread_cond_t): Likewise.
6286 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6288 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6290 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6292 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6293 (cond_nwaiters): New.
6295 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6296 if there are waiters not signalled yet.
6297 Wait until all already signalled waiters wake up.
6298 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6299 __nwaiters. If pthread_cond_destroy has been called and this is the
6300 last waiter, signal pthread_cond_destroy caller and avoid using
6301 the pthread_cond_t structure after unlock.
6302 (__pthread_cond_wait): Increment __nwaiters in the beginning,
6303 decrement it when leaving. If pthread_cond_destroy has been called
6304 and this is the last waiter, signal pthread_cond_destroy caller.
6305 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6306 Likewise. Read clock type from the least significant bits of
6307 __nwaiters instead of __clock.
6308 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6309 whether clock ID can be encoded in COND_CLOCK_BITS bits.
6310 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6311 clock type just from the last COND_CLOCK_BITS bits of value.
6312 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6313 instead of __clock, just from second bit of condattr's value.
6315 2004-08-30 Jakub Jelinek <jakub@redhat.com>
6317 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6318 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
6320 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6322 2004-08-15 Roland McGrath <roland@frob.com>
6324 * pthread_atfork.c: Update copyright terms including special exception
6325 for these trivial files, which are statically linked into executables
6326 that use dynamic linking for the significant library code.
6328 2004-08-09 Jakub Jelinek <jakub@redhat.com>
6330 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6331 pthread_rwlock_rdlock.
6332 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6333 Decrease __nr_readers_queued after reacquiring lock.
6334 * sysdeps/pthread/pthread_rwlock_timedrdlock
6335 (pthread_rwlock_timedrdlock): Likewise.
6336 Reported by Bob Cook <bobcook47@hotmail.com>.
6338 2004-08-11 Jakub Jelinek <jakub@redhat.com>
6340 * tst-rwlock14.c (tf): Read main thread handle from *ARG
6341 before pthread_barrier_wait.
6343 2004-08-07 Ulrich Drepper <drepper@redhat.com>
6345 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6346 Remove unnecessary exception handling data.
6348 2004-07-23 Jakub Jelinek <jakub@redhat.com>
6351 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6352 instead of clockid_t.
6354 2004-07-21 Roland McGrath <roland@redhat.com>
6356 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6358 2004-07-19 Roland McGrath <roland@redhat.com>
6360 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6362 2004-07-02 Roland McGrath <roland@redhat.com>
6364 * configure: Don't exit.
6366 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6368 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6369 (__pthread_cond_timedwait): Check for invalid nanosecond in
6372 2004-07-07 Ulrich Drepper <drepper@redhat.com>
6374 * Makefile: Add rules to build and run tst-fini1.
6375 * tst-fini1.c: New file.
6376 * tst-fini1mod.c: New file.
6378 2004-07-05 Ulrich Drepper <drepper@redhat.com>
6380 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6381 if no cancellation support is needed.
6382 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6383 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6384 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6385 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6386 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6387 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6388 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6389 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6390 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6392 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6393 only if not already defined.
6395 2004-07-05 Jakub Jelinek <jakub@redhat.com>
6397 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6398 constraint "m" instead of "0" for futex.
6400 * shlib-versions: Add powerpc64-.*-linux.*.
6402 2004-07-04 Jakub Jelinek <jakub@redhat.com>
6404 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6405 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6407 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6408 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6411 2004-06-29 Roland McGrath <roland@redhat.com>
6413 * Banner: NPTL no longer has its own version number.
6414 * Makefile (nptl-version): Variable removed.
6415 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6416 using $(version), the glibc version number.
6418 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6420 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6421 Fix branch offset for a PLT entry.
6422 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6424 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6426 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6428 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6431 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6433 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6436 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6438 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6439 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6441 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6442 (pthread_rwlock_timedrdlock): Likewise.
6444 2004-06-22 Jakub Jelinek <jakub@redhat.com>
6446 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6447 Set __r7 to val, not mutex.
6449 2004-06-27 Ulrich Drepper <drepper@redhat.com>
6451 * Makefile: Add rules to build tst-rwlock14.
6452 * tst-rwlock14.c: New file.
6454 2004-06-24 Boris Hu <boris.hu@intel.com>
6456 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6458 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6460 2004-06-19 Andreas Jaeger <aj@suse.de>
6462 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6463 assembler in last patch.
6465 2004-06-17 Ulrich Drepper <drepper@redhat.com>
6467 * sysdeps/pthread/pthread_cond_timedwait.c
6468 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6469 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6470 (__pthread_cond_timedwait): Check for invalid nanosecond in
6472 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6473 * tst-cond19.c: New file.
6474 * Makefile: Add rules to build and run tst-cond19.
6476 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6478 * tst-context1.c (GUARD_PATTERN): Defined.
6479 (tst_context_t): Define struct containing ucontext_t & guard words.
6480 (ctx): Declare as an array of tst_context_t.
6481 (fct): Verify uc_link & guard words are still valid.
6482 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6484 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6486 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6487 Add __data.__futex field, reshuffle __data.__clock.
6488 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6489 (__pthread_cond_signal): Increment __futex at the same time as
6490 __wakeup_seq or __total_seq. Pass address of __futex instead of
6491 address of low 32-bits of __wakeup_seq to futex syscall.
6492 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6493 (__pthread_cond_wait): Likewise. Pass __futex value from before
6494 releasing internal lock to FUTEX_WAIT.
6495 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6496 (__pthread_cond_timedwait): Likewise.
6497 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6498 (FUTEX_CMP_REQUEUE): Define.
6499 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6500 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6501 Pass __futex value from before the unlock and __futex address instead
6502 of address of low 32-bits of __wakeup_seq to futex syscall.
6503 Fallback to FUTEX_WAKE all on any errors.
6505 2004-06-08 Jakub Jelinek <jakub@redhat.com>
6507 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6509 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6510 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6511 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6512 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6513 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6515 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6517 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6518 Add memory clobber to inline assembly.
6519 (__lll_mutex_trylock): Likewise.
6520 (__lll_mutex_cond_trylock): Likewise.
6522 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6524 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6525 Pass val argument as 6th system call argument in %r7.
6527 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6529 * Makefile (tests): Add tst-cond16.
6530 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6531 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6532 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6533 Add __data.__futex field, reshuffle __data.__clock.
6534 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6535 (__pthread_cond_signal): Increment __futex at the same time as
6536 __wakeup_seq or __total_seq. Pass address of __futex instead of
6537 address of low 32-bits of __wakeup_seq to futex syscall.
6538 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6539 (__pthread_cond_wait): Likewise. Pass __futex value from before
6540 releasing internal lock to FUTEX_WAIT.
6541 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6542 (__pthread_cond_timedwait): Likewise.
6543 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6544 (FUTEX_CMP_REQUEUE): Define.
6545 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6546 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6547 Pass __futex value from before the unlock and __futex address instead
6548 of address of low 32-bits of __wakeup_seq to futex syscall.
6549 Fallback to FUTEX_WAKE all on any errors.
6550 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6552 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6553 internally. Return non-zero if error, zero if success.
6554 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6555 Add __data.__futex field, reshuffle __data.__clock.
6556 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6558 (lll_futex_requeue): Add val argument, return 1 unconditionally
6560 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6561 Add __data.__futex field, reshuffle __data.__clock.
6562 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6564 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6565 internally. Return non-zero if error, zero if success.
6566 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6567 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6568 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6570 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6571 internally. Return non-zero if error, zero if success.
6572 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6573 Add __data.__futex field, reshuffle __data.__clock.
6574 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6576 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6577 internally. Return non-zero if error, zero if success.
6578 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6579 Add __data.__futex field, reshuffle __data.__clock.
6580 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6581 Add __data.__futex field, reshuffle __data.__clock.
6582 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6583 Increment __futex at the same time as __wakeup_seq or __total_seq.
6584 Pass address of __futex instead of address of low 32-bits of
6585 __wakeup_seq to futex syscall.
6586 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6587 Pass __futex value from before releasing internal lock
6589 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6590 Likewise. Avoid unnecessary shadowing of variables.
6591 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6592 Set __futex to 2 * __total_seq. Pass __futex value from before the
6593 unlock and __futex address instead of address of low 32-bits of
6594 __wakeup_seq to futex_requeue macro, adjust for new return value
6596 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6597 (__pthread_cond_signal): Increment __futex at the same time as
6598 __wakeup_seq or __total_seq. Pass address of __futex instead of
6599 address of low 32-bits of __wakeup_seq to futex syscall.
6600 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6601 (__pthread_cond_wait): Likewise. Pass __futex value from before
6602 releasing internal lock to FUTEX_WAIT.
6603 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6604 (__pthread_cond_timedwait): Likewise.
6605 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6606 (FUTEX_CMP_REQUEUE): Define.
6607 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6608 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6609 Pass __futex value from before the unlock and __futex address instead
6610 of address of low 32-bits of __wakeup_seq to futex syscall.
6611 Fallback to FUTEX_WAKE all on any errors.
6613 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6615 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6616 Add nop to align the end of critical section.
6617 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6619 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6621 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6622 Add __broadcast_seq field.
6623 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6624 all waiters as woken with woken_seq and bump broadcast counter.
6625 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6626 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6627 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6628 Comment typo fixes. Avoid returning -ETIMEDOUT.
6630 2004-06-01 Ulrich Drepper <drepper@redhat.com>
6632 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6633 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6634 Reported by Kaz Kojima.
6636 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6638 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6640 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6642 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6643 __broadcast_seq with bc_seq after acquiring internal lock instead of
6646 2004-05-18 Jakub Jelinek <jakub@redhat.com>
6648 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6650 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6651 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6652 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6653 (pthread_cond_t): Add __data.__broadcast_seq field.
6654 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6655 (FRAME_SIZE): Define.
6656 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6658 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6660 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6662 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6663 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6666 2004-05-18 Ulrich Drepper <drepper@redhat.com>
6668 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6669 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6670 Add __broadcast_seq field.
6671 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6672 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6673 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6674 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6675 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6676 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6677 all waiters as woken with woken_seq and bump broadcast counter.
6678 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6679 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6680 __broadcast_seq field.
6681 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6682 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6683 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6684 * pthread_cond_init.c: Initialize __broadcast_seq field.
6685 * Makefile (tests): Add tst-cond17 and tst-cond18.
6686 Add .NOTPARALLEL goal.
6687 * tst-cond16.c: New file. From Jakub.
6688 * tst-cond17.c: New file. From Jakub.
6689 * tst-cond18.c: New file. From Jakub.
6691 2004-05-16 Ulrich Drepper <drepper@redhat.com>
6693 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6696 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6697 Parametrize frame size. Correct some unwind info.
6698 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6700 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6702 * tst-stack3.c: Note testing functionality beyond POSIX.
6704 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6706 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6707 Change conditional from ifdef to if.
6709 2004-04-23 Jakub Jelinek <jakub@redhat.com>
6711 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6712 SYSDEP_CANCEL_ERROR): Define.
6715 2004-05-01 Jakub Jelinek <jakub@redhat.com>
6717 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6719 2004-04-20 Jakub Jelinek <jakub@redhat.com>
6721 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6723 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6725 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6726 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6727 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6728 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6730 2004-04-19 Ulrich Drepper <drepper@redhat.com>
6732 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6733 thread has all signals blocked.
6735 2004-04-18 Andreas Jaeger <aj@suse.de>
6737 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6738 (SEM_VALUE_MAX): Add missing brace.
6740 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6742 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6744 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6745 * sysdeps/pthread/tst-mqueue8x.c: New test.
6746 * tst-cancel4.c: Update comment about message queues.
6748 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6749 return it_value { 0, 0 }.
6750 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6752 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6753 assertion for SIGEV_NONE.
6754 (thread_attr_compare): Compare all attributes, not just a partial
6757 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6759 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6761 2004-04-17 Ulrich Drepper <drepper@redhat.com>
6763 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6764 Just use a plain number.
6765 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6766 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6767 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6768 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6769 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6770 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6771 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6773 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6775 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6777 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6779 2004-04-15 Jakub Jelinek <jakub@redhat.com>
6781 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6782 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6783 of calling sigwaitinfo.
6785 2004-04-16 Ulrich Drepper <drepper@redhat.com>
6787 * allocatestack.c (allocate_stack): Set reported_guardsize
6789 * pthread_getattr_np.c (pthread_getattr_np): Use
6790 reported_guardsize instead of guardsize.
6791 * descr.h (struct pthread): Add reported_guardsize field.
6793 2004-04-13 Jakub Jelinek <jakub@redhat.com>
6795 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6797 2004-04-12 Ulrich Drepper <drepper@redhat.com>
6799 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6801 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6803 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6804 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6805 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6806 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6807 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6809 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6810 (_POSIX_MESSAGE_PASSING): Define.
6811 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6812 (_POSIX_MESSAGE_PASSING): Define.
6813 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6814 (_POSIX_MESSAGE_PASSING): Define.
6816 2004-04-04 Ulrich Drepper <drepper@redhat.com>
6818 * tst-context1.c (fct): Check whether correct stack is used.
6820 2004-04-03 Ulrich Drepper <drepper@redhat.com>
6822 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6823 matching constraints for asm mem parameters.
6825 * tst-clock2.c (tf): Don't define unless needed.
6827 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6829 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6832 2004-03-30 Ulrich Drepper <drepper@redhat.com>
6834 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6835 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6836 * pthreadP.h: Declare __nptl_deallocate_tsd.
6837 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6840 * Makefile (tests): Add tst-tsd5.
6841 * tst-tsd5.c: New file.
6843 2004-03-29 Ulrich Drepper <drepper@redhat.com>
6845 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6846 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6847 is SHLIB_COMPAT check.
6848 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6849 (__pthread_attr_getaffinity_old): Likewise.
6850 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6851 (__pthread_getaffinity_old): Likewise.
6852 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6853 (__pthread_setaffinity_old): Likewise.
6855 2004-03-26 Ulrich Drepper <drepper@redhat.com>
6857 * allocatestack.c (_make_stacks_executable): Call
6858 _dl_make_stack_executable first.
6860 2004-03-24 Roland McGrath <roland@redhat.com>
6862 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6863 constraint instead of "0".
6865 2004-03-24 Ulrich Drepper <drepper@redhat.com>
6867 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6868 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6870 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6871 code to avoid warning.
6873 2004-03-24 Andreas Jaeger <aj@suse.de>
6875 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6876 (__pthread_attr_setaffinity_old): Remove const.
6878 2004-03-23 Ulrich Drepper <drepper@redhat.com>
6880 * sysdeps/unix/sysv/linux/smp.h: New file.
6881 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6882 * init.c: Define __is_smp.
6883 (__pthread_initialize_minimal_internal): Call is_smp_system to
6884 initialize __is_smp.
6885 * pthreadP.h: Declare __is_smp.
6886 Define MAX_ADAPTIVE_COUNT is necessary.
6887 * pthread_mutex_init.c: Add comment regarding __spins field.
6888 * pthread_mutex_lock.c: Implement adaptive mutex type.
6889 * pthread_mutex_timedlock.c: Likewise.
6890 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6891 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6893 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6894 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6895 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6896 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6897 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6898 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6899 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6900 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6901 lll_mutex_cond_trylock.
6902 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6903 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6904 * sysdeps/unix/sysv/linux/s390/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 Define BUSY_WAIT_NOP.
6908 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6909 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6911 * tst-mutex5.c: Add support for testing adaptive mutexes.
6912 * tst-mutex7.c: Likewise.
6913 * tst-mutex5a.c: New file.
6914 * tst-mutex7a.c: New file.
6915 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6917 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6918 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6919 vgettimeofday call might destroy the content.
6921 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6924 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6925 No need to restrict type of ret. Make it int. Add comment.
6927 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6928 Remove unnecessary setne instruction.
6930 2004-03-22 Jakub Jelinek <jakub@redhat.com>
6932 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6933 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6934 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6935 If realloc fails, break out of the loop.
6937 2004-03-20 Andreas Jaeger <aj@suse.de>
6939 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6940 (__pthread_setaffinity_old): Fix interface.
6941 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6942 (__pthread_getaffinity_old): Likewise.
6944 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6945 (__pthread_setaffinity_new): Remove duplicate declaration.
6947 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6949 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6950 the return value to a safe register.
6951 (CDISABLE): Set the function argument correctly.
6953 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6955 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6956 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6957 Rewrite so that only one locked memory operation per round is needed.
6958 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6959 (pthread_barrier_wait): After wakeup, release lock only when the
6960 last thread stopped using the barrier object.
6961 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6962 (__pthread_cond_wait): Don't store mutex address if the current
6963 value is ~0l. Add correct cleanup support and unwind info.
6964 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6965 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6966 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6967 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6968 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6969 Add correct cleanup support and unwind info.
6970 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6971 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6972 information for syscall wrappers.
6974 2004-03-18 Ulrich Drepper <drepper@redhat.com>
6976 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6977 cpusetsize field, remove next.
6978 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6979 parameter for size of the CPU set.
6980 (pthread_setaffinity_np): Likewise.
6981 (pthread_attr_getaffinity_np): Likewise.
6982 (pthread_attr_setaffinity_np): Likewise.
6983 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6984 interface change, keep compatibility code.
6985 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6986 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6987 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6988 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6989 __pthread_getaffinity_np.
6990 * Versions: Add version for changed interfaces.
6991 * tst-attr3.c: Adjust test for interface change.
6992 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6993 increasing buffer sizes.
6994 * pthread_attr_destroy.c: Remove unused list handling.
6995 * pthread_attr_init.c: Likewise.
6997 2004-03-17 Roland McGrath <roland@redhat.com>
6999 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
7000 first argument to clock_getres so we ever enable kernel timers.
7002 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
7004 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
7006 2004-03-12 Richard Henderson <rth@redhat.com>
7008 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
7009 oldvalue from CENABLE to CDISABLE.
7011 2004-03-12 Ulrich Drepper <drepper@redhat.com>
7013 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
7014 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
7015 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
7016 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
7018 2004-03-11 Richard Henderson <rth@redhat.com>
7020 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
7021 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
7022 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
7024 2004-03-11 Jakub Jelinek <jakub@redhat.com>
7026 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
7027 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
7028 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
7030 2004-03-11 Jakub Jelinek <jakub@redhat.com>
7032 * forward.c (__pthread_cond_broadcast_2_0,
7033 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
7034 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
7035 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
7037 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7039 * sysdeps/sh/tcb-offsets.sym: Add PID.
7040 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
7041 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
7043 2004-03-10 Ulrich Drepper <drepper@redhat.com>
7045 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
7046 include <sysdep-cancel.h>, vfork is no cancellation point.
7047 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
7048 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
7049 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
7051 2004-03-10 Jakub Jelinek <jakub@redhat.com>
7053 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
7055 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
7056 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
7058 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
7060 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
7061 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
7062 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
7063 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
7064 of DO_CALL_VIA_BREAK. Work around a gas problem.
7066 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
7067 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
7068 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
7069 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
7070 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
7071 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
7073 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
7074 a local register for saving old PID. Negate PID in parent upon exit.
7076 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
7078 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7079 before syscall, set to the old value in the parent afterwards.
7080 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
7081 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
7083 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7084 before syscall, set to the old value in the parent afterwards.
7085 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
7086 * sysdeps/s390/tcb-offsets.sym: Add PID.
7088 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
7089 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
7090 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
7091 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
7092 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
7093 * sysdeps/sparc/tcb-offsets.sym: Add PID.
7095 2004-03-10 Andreas Schwab <schwab@suse.de>
7097 * sysdeps/ia64/tcb-offsets.sym: Add PID.
7098 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
7099 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
7101 2004-03-09 Jakub Jelinek <jakub@redhat.com>
7103 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
7104 * tst-cancel21.c (do_one_test): Likewise.
7105 Reported by Gordon Jin <gordon.jin@intel.com>.
7107 2004-02-09 Jakub Jelinek <jakub@redhat.com>
7109 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
7110 if non-zero and set to INT_MIN if zero.
7111 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
7112 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
7113 (SAVE_PID, RESTORE_PID): Define.
7115 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
7116 Use relative path to avoid including NPTL i386/vfork.S.
7117 (SAVE_PID, RESTORE_PID): Define.
7118 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
7119 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
7120 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
7122 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
7123 * tst-vfork1.c: New test.
7124 * tst-vfork2.c: New test.
7125 * tst-vfork1x.c: New test.
7126 * tst-vfork2x.c: New test.
7128 2004-03-08 Ulrich Drepper <drepper@redhat.com>
7130 * sysdeps/i386/tcb-offsets.sym: Add PID.
7131 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7132 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
7133 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
7135 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
7137 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
7139 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
7141 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7144 2004-03-07 Ulrich Drepper <drepper@redhat.com>
7146 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7149 * tst-once4.c: Remove unnecessary macro definition.
7151 * tst-mutex7.c (do_test): Limit thread stack size.
7152 * tst-once2.c (do_test): Likewise.
7153 * tst-tls3.c (do_test): Likewise.
7154 * tst-tls1.c (do_test): Likewise.
7155 * tst-signal3.c (do_test): Likewise.
7156 * tst-kill6.c (do_test): Likewise.
7157 * tst-key4.c (do_test): Likewise.
7158 * tst-join4.c (do_test): Likewise.
7159 * tst-fork1.c (do_test): Likewise.
7160 * tst-context1.c (do_test): Likewise.
7161 * tst-cond2.c (do_test): Likewise.
7162 * tst-cond10.c (do_test): Likewise.
7163 * tst-clock2.c (do_test): Likewise.
7164 * tst-cancel10.c (do_test): Likewise.
7165 * tst-basic2.c (do_test): Likewise.
7166 * tst-barrier4.c (do_test): Likewise.
7168 2004-03-05 Ulrich Drepper <drepper@redhat.com>
7170 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
7172 2004-03-01 Ulrich Drepper <drepper@redhat.com>
7174 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7175 (__pthread_cond_timedwait): Optimize wakeup test.
7176 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7177 (__pthread_cond_wait): Likewise.
7178 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7179 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7182 2004-02-29 Ulrich Drepper <drepper@redhat.com>
7184 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7185 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
7186 the atomic instruction needed.
7187 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7188 (__lll_mutex_lock_wait): Likewise.
7190 2004-02-28 Ulrich Drepper <drepper@redhat.com>
7192 * Makefile (tests): Add tst-cond14 and tst-cond15.
7193 * tst-cond14.c: New file.
7194 * tst-cond15.c: New file.
7196 2004-02-27 Ulrich Drepper <drepper@redhat.com>
7198 * sysdeps/pthread/createthread.c (create_thread): Remove use of
7199 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
7200 needs to be implemented differently to be useful.
7202 2004-02-26 Ulrich Drepper <drepper@redhat.com>
7204 * pthread_attr_setschedparam.c: Don't test priority against limits
7205 here. Set ATTR_FLAG_SCHED_SET flag.
7206 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7207 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7208 from parent thread to child. If attribute is used and scheduling
7209 parameters are not inherited, copy parameters from attribute or
7210 compute them. Check priority value.
7211 * pthread_getschedparam.c: If the parameters aren't known yet get
7212 them from the kernel.
7213 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7214 ATTR_FLAG_POLICY_SET flag for thread.
7215 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7216 and ATTR_FLAG_POLICY_SET.
7218 * sysdeps/pthread/createthread.c: Use tgkill if possible.
7220 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7221 fail if stack address hasn't been set. Just return 0.
7223 2004-02-25 Ulrich Drepper <drepper@redhat.com>
7225 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
7226 libpthread for the files in this list.
7227 (CFLAGS-tst-unload): Removed.
7228 * tst-unload.c (do_test): Don't use complete path for
7231 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7234 2004-02-22 Ulrich Drepper <drepper@redhat.com>
7236 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7237 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7238 operation per round is needed.
7239 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7240 (__lll_mutex_lock_wait): Likewise.
7242 2004-02-20 Ulrich Drepper <drepper@redhat.com>
7244 * tst-cancel9.c (cleanup): Don't print to stderr.
7246 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7248 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7250 2004-02-20 Jakub Jelinek <jakub@redhat.com>
7252 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7253 (__syscall_error_handler2): Call CDISABLE.
7254 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7255 (__syscall_error_handler2): Call CDISABLE.
7257 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7258 Release lock before the loop, don't reacquire it.
7260 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7262 2004-02-19 Andreas Schwab <schwab@suse.de>
7264 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7267 2004-02-18 Ulrich Drepper <drepper@redhat.com>
7269 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7270 (pthread_barrier_wait): After wakeup, release lock only when the
7271 last thread stopped using the barrier object.
7272 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7273 (pthread_barrier_wait): Likewise.
7274 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7276 * Makefile (tests): Add tst-barrier4.
7277 * tst-barrier4.c: New file.
7279 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7280 (__pthread_cond_timedwait): Perform timeout test while holding
7281 internal lock to prevent wakeup race.
7282 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7283 * sysdeps/pthread/pthread_cond_timedwait.c
7284 (__pthread_cond_timedwait): Likewise.
7285 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7286 (__pthread_cond_timedwait): Likewise.
7288 2004-02-18 Jakub Jelinek <jakub@redhat.com>
7290 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7291 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7292 * Makefile (tests): Add tst-rwlock13.
7293 * tst-rwlock13.c: New test.
7295 2004-02-16 Ulrich Drepper <drepper@redhat.com>
7297 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7298 (__condvar_tw_cleanup): Little optimization.
7299 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7301 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
7303 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7304 libpthread as "lib" parameter to SHLIB_COMPAT.
7305 (__novmx_siglongjmp): Fix typo in function name.
7306 (__novmx_longjmp): Fix typo in function name.
7308 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7310 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7313 * sysdeps/generic/pt-longjmp.c: Moved to...
7314 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
7316 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
7318 * Makefile (libpthread-routines): Add pt-cleanup.
7319 * pt-longjmp.c: Removed.
7320 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7321 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7322 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7323 Version longjmp, siglongjmp for GLIBC_2.3.4.
7324 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7326 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7328 * sysdeps/pthread/pthread_cond_timedwait.c
7329 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
7330 Reuse code. Add __builtin_expects.
7332 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7333 (__pthread_cond_timedwait): Get internal lock in case timeout has
7334 passed before the futex syscall.
7335 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7337 2004-01-20 Ulrich Drepper <drepper@redhat.com>
7339 * allocatestack.c: Pretty printing.
7341 * sysdeps/pthread/createthread.c (create_thread): Don't add
7342 CLONE_DETACHED bit if it is not necessary.
7344 2004-01-16 Ulrich Drepper <drepper@redhat.com>
7346 * pthread_getattr_np.c: Include ldsodefs.h.
7348 2004-01-16 Richard Henderson <rth@redhat.com>
7350 * allocatestack.c: Don't declare __libc_stack_end.
7351 * init.c (__pthread_initialize_minimal_internal): Likewise.
7352 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7354 2004-01-15 Richard Henderson <rth@redhat.com>
7356 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7357 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7358 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7359 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7360 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7361 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7362 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7363 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7365 2004-01-14 Ulrich Drepper <drepper@redhat.com>
7367 * init.c (pthread_functions): Make array const.
7369 2004-01-13 Ulrich Drepper <drepper@redhat.com>
7371 * allocatestack.c (__make_stacks_executable): Change interface.
7372 Check parameters. Pass parameter on to libc counterpart.
7373 * pthreadP.h: Change declaration.
7375 2004-01-13 Richard Henderson <rth@redhat.com>
7377 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7379 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7382 * sysdeps/alpha/Makefile: New file.
7383 * sysdeps/alpha/tcb-offsets.sym: New file.
7384 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7385 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7387 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7390 2004-01-08 Jakub Jelinek <jakub@redhat.com>
7392 * Makefile (tests): Add tst-backtrace1.
7393 * tst-backtrace1.c: New test.
7395 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7397 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7398 register as second parameter to the REGISTER macro.
7399 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7400 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7401 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7402 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7403 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7404 of thread register as second parameter to REGISTER macro in 64 case.
7406 2004-01-03 Ulrich Drepper <drepper@redhat.com>
7408 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7409 (CFLAGS-getpid.o): Defined.
7410 (CFLAGS-getpid.os): Defined.
7412 2003-12-31 Ulrich Drepper <drepper@redhat.com>
7414 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7415 returned for main thread does not overlap with any other VMA.
7416 Patch by Jakub Jelinek.
7418 2003-12-29 Jakub Jelinek <jakub@redhat.com>
7420 * tst-raise1.c: Include stdio.h.
7422 2003-12-23 Jakub Jelinek <jakub@redhat.com>
7424 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7425 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7426 If pid is 0, set it to selftid.
7427 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7428 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7429 != 0, return self->tid without doing a syscall.
7430 * descr.h (struct pthread): Move pid field after tid.
7432 * Makefile (tests): Add tst-raise1.
7433 * tst-raise1.c: New file.
7435 2003-12-23 Roland McGrath <roland@redhat.com>
7437 * tst-oddstacklimit.c: New file.
7438 * Makefile (tests): Add it.
7439 (tst-oddstacklimit-ENV): New variable.
7441 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7442 value up to page size for __default_stacksize.
7444 2003-12-21 Ulrich Drepper <drepper@redhat.com>
7446 * Makefile (tests): Add tst-eintr5.
7447 * tst-eintr5.c: New file.
7449 * eintr.c (eintr_source): Prevent sending signal to self.
7451 * tst-eintr2.c (tf1): Improve error message.
7453 2003-12-20 Ulrich Drepper <drepper@redhat.com>
7455 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7456 * sysdeps/unix/sysv/linux/getpid.c: New file.
7457 * pthread_cancel.c: Add comment explaining use of PID field.
7458 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7459 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7460 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7461 temporarily to signal the field must not be relied on and updated
7463 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7464 temporarily negative.
7465 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7467 2003-12-19 Ulrich Drepper <drepper@redhat.com>
7469 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7470 (eintr_source): If ARG != NULL, use pthread_kill.
7471 * tst-eintr1.c: Adjust for this change.
7472 * tst-eintr2.c: Likewise.
7473 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7474 * tst-eintr3.c: New file.
7475 * tst-eintr4.c: New file.
7477 2003-12-19 Jakub Jelinek <jakub@redhat.com>
7479 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7480 if CANCELSTATE_BITMASK is set.
7481 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7484 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7485 (tests-reverse): Add tst-cancel23.
7486 * tst-cancel22.c: New test.
7487 * tst-cancel23.c: New test.
7489 2003-12-18 Ulrich Drepper <drepper@redhat.com>
7491 * tst-eintr1.c: Better error messages.
7493 * Makefile (tests): Add tst-eintr2.
7494 * tst-eintr2.c: New file.
7496 2003-12-18 Jakub Jelinek <jakub@redhat.com>
7498 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7499 (CFLAGS-tst-cancelx21.c): Set.
7500 * tst-cancel21.c: New test.
7501 * tst-cancelx21.c: New test.
7503 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7505 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7506 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7507 * pt-longjmp.c: Include jmpbuf-unwind.h.
7508 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7509 _JMPBUF_UNWINDS. Adjust compared pointers.
7510 * init.c (__pthread_initialize_minimal_internal): Initialize
7511 pd->stackblock_size.
7512 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7513 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7514 * sysdeps/i386/jmpbuf-unwind.h: New file.
7515 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7516 * sysdeps/s390/jmpbuf-unwind.h: New file.
7517 * sysdeps/sh/jmpbuf-unwind.h: New file.
7518 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7519 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7520 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7521 (_JMPBUF_CFA_UNWINDS): Remove.
7522 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7524 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7526 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7527 (CFLAGS-tst-cancelx20.c): Set.
7528 * tst-cancel20.c: New test.
7529 * tst-cancelx20.c: New test.
7531 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7533 * init.c (__pthread_initialize_minimal_internal): Don't treat
7534 architectures with separate register stack special here when
7535 computing default stack size.
7537 2003-12-17 Roland McGrath <roland@redhat.com>
7539 * Makefile (tst-cancelx7-ARGS): New variable.
7540 Reportd by Greg Schafer <gschafer@zip.com.au>.
7542 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7544 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7545 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7546 (tst-stack3-ENV): Set.
7547 ($(objpfx)tst-stack3-mem): New.
7548 * tst-stack3.c: New test.
7550 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7552 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7553 Add unwind directives. Drop unused .regstk directive.
7554 (_fini_EPILOG_BEGINS): Add unwind directives.
7556 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7558 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7559 Assume parameter is a pointer.
7560 (lll_futex_wake): Likewise.
7561 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7563 (lll_futex_wake): Likewise.
7564 Reported by Boris Hu.
7565 * sysdeps/unix/sysv/linux/unregister-atfork.c
7566 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7568 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7570 2003-12-10 Ulrich Drepper <drepper@redhat.com>
7572 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7573 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7574 __rtld_lock_initialize for ld.so lock.
7575 Patch in part by Adam Li <adam.li@intel.com>.
7577 2003-12-02 David Mosberger <davidm@hpl.hp.com>
7579 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7580 in $(gnulib). Also, remove stale comment.
7582 2003-11-12 David Mosberger <davidm@hpl.hp.com>
7584 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7585 advantage of new syscall stub and optimize accordingly.
7587 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7588 from SYS_futex, to match expectations of
7589 sysdep.h:DO_INLINE_SYSCALL.
7590 (lll_futex_clobbers): Remove.
7591 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7592 (lll_futex_wake): Likewise.
7593 (lll_futex_requeue): Likewise.
7594 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7595 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7597 (__lll_mutex_lock): Likewise.
7598 (__lll_mutex_cond_lock): Likewise.
7599 (__lll_mutex_timed_lock): Likewise.
7600 (__lll_mutex_unlock): Likewise.
7601 (__lll_mutex_unlock_force): Likewise.
7603 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7604 comes before the include of <sysdep.h>.
7605 (THREAD_SELF_SYSINFO): New macro.
7606 (THREAD_SYSINFO): Likewise.
7607 (INIT_SYSINFO): New macro.
7608 (TLS_INIT_TP): Call INIT_SYSINFO.
7610 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7612 * sysdeps/pthread/createthread.c (create_thread): Use
7613 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7614 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7615 THREAD_SELF_SYSINFO instead of open code.
7616 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7617 (THREAD_SYSINFO): Likewise.
7619 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7621 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7623 2003-12-06 Ulrich Drepper <drepper@redhat.com>
7625 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7626 instead of .init. Patch by David Mosberger.
7628 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
7630 * sysdeps/pthread/configure.in: Remove broken declaration in C
7631 cleanup handling check.
7633 2003-11-30 Andreas Jaeger <aj@suse.de>
7635 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7636 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7639 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7641 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7642 * pthread_attr_destroy.c: Include shlib-compat.h.
7643 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7644 is set in iattr->flags.
7645 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7647 2003-11-21 Jakub Jelinek <jakub@redhat.com>
7649 * Makefile (distribute): Add tst-cleanup4aux.c.
7651 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7654 2003-11-21 Ulrich Drepper <drepper@redhat.com>
7656 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7657 pthread_cond_signal.
7659 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7660 store mutex address if the current value is ~0l.
7661 * sysdeps/pthread/pthread_cond_timedwait.c
7662 (__pthread_cond_timedwait): Likewise.
7663 * sysdeps/pthread/pthread_cond_broadcast.c
7664 (__pthread_cond_broadcast): Don't use requeue for pshared
7667 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7668 (__pthread_cond_wait): Don't store mutex address if the current
7670 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7671 (__pthread_cond_timedwait): Likewise.
7672 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7673 (__pthread_cond_broadcast): Don't use requeue for pshared
7676 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7677 element with ~0l for pshared condvars, with NULL otherwise.
7679 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7680 (__pthread_cond_wait): Don't store mutex address if the current
7682 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7683 (__pthread_cond_timedwait): Likewise.
7684 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7685 (__pthread_cond_broadcast): Don't use requeue for pshared
7688 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7689 * tst-cond12.c: New file.
7690 * tst-cond13.c: New file.
7692 2003-11-17 Ulrich Drepper <drepper@redhat.com>
7694 * sysdeps/pthread/configure.in: Make missing forced unwind support
7697 2003-11-11 Ulrich Drepper <drepper@redhat.com>
7699 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7701 2003-11-06 Ulrich Drepper <drepper@redhat.com>
7703 * Makefile: Add magic to clean up correctly.
7705 2003-11-05 Jakub Jelinek <jakub@redhat.com>
7707 * unwind.c (FRAME_LEFT): Define.
7708 (unwind_stop): Handle old style cleanups here.
7709 (__pthread_unwind): Handle old style cleanups only if
7710 !HAVE_FORCED_UNWIND.
7711 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7712 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7713 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7714 ($(objpfx)tst-cleanupx4): Likewise.
7715 * tst-cleanup4.c: New test.
7716 * tst-cleanup4aux.c: New.
7717 * tst-cleanupx4.c: New test.
7719 2003-11-04 Ulrich Drepper <drepper@redhat.com>
7721 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7722 lll_mutex_*lock macros to skip atomic operations on some archs.
7724 2003-11-03 Ulrich Drepper <drepper@redhat.com>
7726 * sysdeps/pthread/tst-timer.c (main): Initialize
7727 sigev2.sigev_value as well.
7729 2003-10-15 Roland McGrath <roland@redhat.com>
7731 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7733 * sysdeps/pthread/configure: Regenerated.
7735 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7737 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7738 locking macros. No distinction between normal and mutex locking
7740 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7741 Merge bits from lowlevelmutex.S we still need.
7742 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7743 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7744 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7745 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7746 new mutex implementation.
7747 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7748 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7749 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7750 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7751 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7752 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7753 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7754 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7755 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7756 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7757 symbol for entry point to avoid cancellation.
7759 2003-10-07 Jakub Jelinek <jakub@redhat.com>
7761 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7763 (SAVE_OLDTYPE_0): Fix a typo.
7765 2003-10-03 Ulrich Drepper <drepper@redhat.com>
7767 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7768 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7770 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7772 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7775 2003-10-02 Jakub Jelinek <jakub@redhat.com>
7777 * Makefile (tests): Add tst-cancel19.
7778 * tst-cancel19.c: New test.
7780 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7782 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7783 restoring of the old cancellation type.
7785 2003-09-30 Jakub Jelinek <jakub@redhat.com>
7787 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7789 2003-09-27 Wolfram Gloger <wg@malloc.de>
7791 * sysdeps/pthread/malloc-machine.h: New file
7793 2003-09-24 Roland McGrath <roland@redhat.com>
7795 * allocatestack.c (__make_stacks_executable): Don't ignore return
7796 value from _dl_make_stack_executable.
7798 2003-09-24 Ulrich Drepper <drepper@redhat.com>
7800 * allocatestack.c (__make_stacks_executable): Also change
7801 permission of the currently unused stacks.
7803 * allocatestack.c (change_stack_perm): Split out from
7804 __make_stacks_executable.
7805 (allocate_stack): If the required permission changed between the time
7806 we started preparing the stack and queueing it, change the permission.
7807 (__make_stacks_executable): Call change_stack_perm.
7809 * Makefile: Build tst-execstack-mod locally.
7810 * tst-execstack-mod.c: New file.
7812 2003-09-23 Jakub Jelinek <jakub@redhat.com>
7814 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7816 2003-09-23 Roland McGrath <roland@redhat.com>
7818 * tst-execstack.c: New file.
7819 * Makefile (tests): Add it.
7820 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7821 (LDFLAGS-tst-execstack): New variable.
7823 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7824 whether to use PROT_EXEC for stack mmap.
7825 (__make_stacks_executable): New function.
7826 * pthreadP.h: Declare it.
7827 * init.c (__pthread_initialize_minimal_internal): Set
7828 GL(dl_make_stack_executable_hook) to that.
7830 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7832 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7833 recommendation from AMD re avoidance of lock prefix.
7835 2003-09-22 Jakub Jelinek <jakub@redhat.com>
7837 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7838 lll_futex_timed_wait instead of lll_futex_wait.
7839 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7840 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7841 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7842 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7843 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7844 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7845 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7846 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7847 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7848 Completely revamp the locking macros. No distinction between
7849 normal and mutex locking anymore.
7850 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7851 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7852 __lll_lock_timedwait): Fix prototypes.
7853 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7854 __lll_lock_timedwait): Likewise.
7855 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7856 macros, add __builtin_expect.
7857 (lll_mutex_timedlock): Likewise. Fix return value.
7858 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7859 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7860 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7861 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7862 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7863 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7864 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7865 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7867 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7869 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7870 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7871 operation if possible.
7873 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7874 like jumping over the lock prefix.
7876 2003-09-21 Ulrich Drepper <drepper@redhat.com>
7878 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7879 locking macros. No distinction between normal and mutex locking
7881 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7882 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7883 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7884 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7885 locking. Merge bits from lowlevelmutex.S we still need.
7886 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7887 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7888 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7889 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7890 * Makefile (routines): Remove libc-lowlevelmutex.
7891 (libpthread-rountines): Remove lowlevelmutex.
7892 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7893 for new mutex implementation.
7894 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7895 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7896 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7897 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7898 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7900 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7902 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7903 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7904 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7905 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7906 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7907 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7908 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7909 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7911 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7913 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7914 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7915 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7917 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7918 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7920 2003-09-20 Ulrich Drepper <drepper@redhat.com>
7922 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7923 in parameters of asm with output parameters.
7925 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7926 type of DECR parameter to int.
7927 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7929 2003-09-18 Jakub Jelinek <jakub@redhat.com>
7931 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7932 guardsize for each thread.
7934 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7936 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7937 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7938 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7940 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7941 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7943 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7944 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7945 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7946 (pthread_getaffinity_np): Add hidden_def.
7948 * Makefile (tests): Add tst-attr3.
7949 * tst-attr3.c: New test.
7951 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7953 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7955 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7956 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7958 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7960 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7961 * tst-align.c: Include tst-stack-align.h.
7962 (tf, do_test): Use TEST_STACK_ALIGN macro.
7964 2003-09-17 Ulrich Drepper <drepper@redhat.com>
7966 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7969 2003-09-16 Ulrich Drepper <drepper@redhat.com>
7971 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7972 stack-related values for the initial thread.
7974 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7976 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7978 2003-09-11 Ulrich Drepper <drepper@redhat.com>
7980 * pthread_mutex_lock.c: Minor code rearrangements.
7982 2003-09-05 Roland McGrath <roland@redhat.com>
7984 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7985 Instead, include ../nptl_db/db_info.c to do its magic.
7986 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7987 (__pthread_pthread_key_2ndlevel_size): Likewise.
7988 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7989 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7990 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7991 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7992 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7993 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7994 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7995 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7996 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7997 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7998 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7999 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
8000 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
8001 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
8002 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
8003 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
8004 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
8006 2003-09-08 Ulrich Drepper <drepper@redhat.com>
8008 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
8009 of pthread_t to be compatible with LT.
8010 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
8011 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8012 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8013 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8014 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
8015 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8016 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
8018 2003-09-04 Ulrich Drepper <drepper@redhat.com>
8020 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
8022 2003-09-04 Jakub Jelinek <jakub@redhat.com>
8024 * unwind-forcedunwind.c: Move to...
8025 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
8026 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
8027 * sysdeps/pthread/jmpbuf-unwind.h: New file.
8028 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
8029 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
8030 * unwind.c: Include jmpbuf-unwind.h.
8031 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
8033 2003-09-02 Jakub Jelinek <jakub@redhat.com>
8035 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
8036 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
8037 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
8038 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
8039 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8040 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
8041 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
8042 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
8043 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
8044 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
8045 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
8047 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
8048 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
8049 * Makefile (tests): Add tst-stack2.
8050 * tst-stack2.c: New test.
8051 * tst-stack1.c: Include limits.h and sys/param.h.
8052 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
8054 * pthread_condattr_setpshared.c: Include errno.h.
8055 (pthread_condattr_setpshared): Return EINVAL if pshared
8056 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
8058 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
8059 defined symbol for entry point to avoid cancellation.
8060 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8062 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
8064 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8066 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
8068 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
8070 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
8071 __close_nocancel, __read_nocancel, __write_nocancel,
8072 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
8073 libpthread.so or librt.so, define to corresponding function
8074 without _nocancel suffix.
8075 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
8076 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
8077 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
8079 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
8081 2003-09-02 Ulrich Drepper <drepper@redhat.com>
8083 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
8084 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8086 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
8087 in subsections has a symbol associated with it.
8089 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
8090 defined symbol for entry point to avoid cancellation.
8091 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
8093 2003-09-01 Jakub Jelinek <jakub@redhat.com>
8095 * Makefile (tests): Add tst-tls5.
8096 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
8097 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
8098 ($(objpfx)tst-tls5): New.
8099 ($(objpfx)tst-tls6.out): Likewise.
8100 (tests): Depend on $(objpfx)tst-tls6.out.
8101 * tst-tls3.c: Include stdint.h and pthreaddef.h.
8102 (do_test): Check pthread_self () return value alignment.
8103 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
8104 (tf): Check pthread_self () return value alignment.
8105 * tst-tls5.c: New test.
8107 * tst-tls5mod.c: New.
8108 * tst-tls5moda.c: New.
8109 * tst-tls5modb.c: New.
8110 * tst-tls5modc.c: New.
8111 * tst-tls5modd.c: New.
8112 * tst-tls5mode.c: New.
8113 * tst-tls5modf.c: New.
8114 * tst-tls6.sh: New test.
8116 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
8117 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
8118 * init.c (pthread_functions): Initialize them.
8119 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
8120 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
8121 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
8122 pthread_cond_timedwait@@GLIBC_2.3.2.
8124 2003-09-01 Jakub Jelinek <jakub@redhat.com>
8126 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
8127 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
8128 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
8129 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
8130 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
8131 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8133 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
8135 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
8136 _POSIX_THREAD_PRIORITY_SCHEDULING.
8137 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
8139 2003-08-31 Ulrich Drepper <drepper@redhat.com>
8141 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
8142 nested function, use static inline function from libio.h.
8143 Code by Richard Henderson.
8145 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
8148 2003-08-30 Jakub Jelinek <jakub@redhat.com>
8150 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
8151 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
8152 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
8153 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
8154 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
8155 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
8156 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
8157 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
8158 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
8159 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
8160 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
8161 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
8162 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
8163 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
8164 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
8165 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
8166 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
8167 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
8168 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
8169 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
8170 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
8171 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
8172 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
8173 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
8174 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
8175 * sysdeps/sparc/tls.h: New file.
8176 * sysdeps/sparc/tcb-offsets.sym: New file.
8177 * sysdeps/sparc/Makefile: New file.
8178 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
8179 * init.c [__sparc__] (__NR_set_tid_address): Define.
8181 2003-08-29 Jakub Jelinek <jakub@redhat.com>
8183 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
8184 _IO_release_lock): Define.
8186 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
8188 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
8189 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
8191 2003-08-27 Ulrich Drepper <drepper@redhat.com>
8193 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8194 (__pthread_cleanup_class): Add missing return types of member
8197 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
8199 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8200 (lll_mutex_unlock_force): Add memory barrier between store and futex
8203 2003-08-25 Ulrich Drepper <drepper@redhat.com>
8205 * tst-cancel4.c (do_test): Also unlink tempfname and remove
8206 tempmsg in first loop.
8208 2003-08-18 Ulrich Drepper <drepper@redhat.com>
8210 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8211 _POSIX_THREAD_PRIORITY_SCHEDULING.
8212 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8214 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8216 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8217 (__rtld_lock_default_lock_recursive,
8218 __rtld_lock_default_unlock_recursive): Define.
8219 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8220 __rtld_lock_unlock_recursive): Define using
8221 GL(_dl_rtld_*lock_recursive).
8222 * init.c (__pthread_initialize_minimal_internal): Initialize
8223 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8224 Lock GL(_dl_load_lock) the same number of times as
8225 GL(_dl_load_lock) using non-mt implementation was nested.
8227 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8228 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8230 2003-08-06 Jakub Jelinek <jakub@redhat.com>
8232 * tst-cancel17.c (do_test): Make len2 maximum of page size and
8235 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8237 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8239 2003-08-03 Jakub Jelinek <jakub@redhat.com>
8241 * sysdeps/pthread/createthread.c (do_clone): Move error handling
8242 to first syscall error check. Move syscall error check for tkill
8243 into __ASSUME_CLONE_STOPPED #ifdef.
8245 2003-08-02 Ulrich Drepper <drepper@redhat.com>
8247 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8248 is not defined, do explicit synchronization.
8249 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
8250 is not defined also unlock pd->lock for non-debugging case in case
8252 * pthread_create.c (start_thread): Always get and release pd->lock
8253 if __ASSUME_CLONE_STOPPED is not defined.
8254 (start_thread_debug): Removed. Adjust users.
8255 * allocatestack.c (allocate_stack): Always initialize lock if
8256 __ASSUME_CLONE_STOPPED is not defined.
8257 * Makefile (tests): Add tst-sched1.
8258 * tst-sched1.c: New file.
8260 * sysdeps/pthread/createthread.c (do_clone): Only use
8261 sched_setschduler and pass correct parameters.
8263 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8265 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8266 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8267 PTHREAD_STACK_MIN in comments.
8269 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8271 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8272 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8274 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8275 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8276 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8277 (__pthread_cleanup_upto): Fix prototype.
8278 (_longjmp_unwind): Adjust caller.
8279 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8280 Change second argument to const struct pointer.
8281 * tst-sem8.c (main): Remove unused s2 and s3 variables.
8282 * tst-sem9.c (main): Likewise.
8283 * unwind.c: Include string.h for strlen prototype.
8285 2003-07-31 Ulrich Drepper <drepper@redhat.com>
8287 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8288 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8289 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8291 Patch by Nicholas Miell <nmiell@attbi.com>.
8293 2003-07-30 Jakub Jelinek <jakub@redhat.com>
8295 * init.c (__pthread_initialize_minimal_internal): Initialize
8296 GL(dl_init_static_tls).
8297 * pthreadP.h (__pthread_init_static_tls): New prototype.
8298 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8300 * Makefile (tests): Add tst-tls4.
8301 (modules-names): Add tst-tls4moda and tst-tls4modb.
8302 ($(objpfx)tst-tls4): Link against libdl and libpthread.
8303 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8305 * tst-tls4.c: New file.
8306 * tst-tls4moda.c: New file.
8307 * tst-tls4modb.c: New file.
8309 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
8311 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8312 before __timer_dealloc.
8313 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8314 Don't call list_unlink.
8316 2003-07-29 Roland McGrath <roland@redhat.com>
8318 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8320 2003-07-25 Jakub Jelinek <jakub@redhat.com>
8322 * tst-cancel17.c (do_test): Check if aio_cancel failed.
8323 Don't reuse struct aiocb A if it failed.
8324 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8325 not just one byte, as that does not block.
8327 2003-07-22 Jakub Jelinek <jakub@redhat.com>
8329 * sysdeps/pthread/unwind-resume.c: New file.
8330 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8331 unwind-resume in csu subdir.
8332 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8334 (librt-sysdep_routines, librt-shared-only-routines): Add
8336 * sysdeps/pthread/rt-unwind-resume.c: New file.
8337 * unwind-forcedunwind.c: New file.
8338 * Makefile (libpthread-routines): Add unwind-forcedunwind.
8339 (libpthread-shared-only-routines): Likewise.
8340 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8341 * pthreadP.h (pthread_cancel_init): New prototype.
8342 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8344 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8345 attr argument const struct pthread_attr *.
8347 * res.c (__res_state): Return __resp.
8348 * descr.h: Include resolv.h.
8349 (struct pthread): Add res field.
8350 * pthread_create.c: Include resolv.h.
8351 (start_thread): Initialize __resp.
8352 * Makefile (tests): Add tst-_res1.
8353 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8354 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8355 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8357 * tst-_res1.c: New file.
8358 * tst-_res1mod1.c: New file.
8359 * tst-_res1mod2.c: New file.
8361 2003-07-21 Ulrich Drepper <drepper@redhat.com>
8363 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8365 * Makefile: Define various *-no-z-defs variables for test DSOs
8366 which has undefined symbols.
8368 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8370 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8371 Retry if the stwcx fails to store once_control.
8373 2003-07-20 Ulrich Drepper <drepper@redhat.com>
8375 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8376 pthread_attr_setaffinity.
8377 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8378 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8379 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8380 * pthread_attr_destroy.c: Free cpuset element if allocated.
8381 * pthread_create.c: Pass iattr as additional parameter to
8383 * sysdeps/pthread/createthread.c: If attribute is provided and
8384 a new thread is created with affinity set or scheduling parameters,
8385 start thread with CLONE_STOPPED.
8386 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8387 pthread_attr_setaffinity.
8388 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8391 2003-07-15 Ulrich Drepper <drepper@redhat.com>
8393 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8395 2003-07-14 Ulrich Drepper <drepper@redhat.com>
8397 * sysdeps/pthread/configure.in: Require CFI directives also for
8400 2003-07-15 Jakub Jelinek <jakub@redhat.com>
8402 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8405 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8407 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8409 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8410 registers as variables. Call __pthread_mutex_unlock_usercnt.
8411 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8412 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8413 not self pointer in __writer. Compare with TID to determine
8415 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8416 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8418 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8420 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8421 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8422 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8423 macros also when compiling librt.
8425 2003-07-11 Jakub Jelinek <jakub@redhat.com>
8427 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8428 -fasynchronous-unwind-tables.
8429 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8430 (PSEUDO): Add cfi directives.
8431 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8433 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8436 2003-07-08 Jakub Jelinek <jakub@redhat.com>
8438 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8439 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8440 * unwind.c (__pthread_unwind_next): Add hidden_def.
8441 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8443 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8444 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8445 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8447 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8448 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8450 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8451 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8452 __pthread_unregister_cancel and __pthread_unwind_next.
8454 2003-07-04 Jakub Jelinek <jakub@redhat.com>
8456 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8457 different symbol for the cancellation syscall wrapper and
8458 non-cancellation syscall wrapper.
8459 (PSEUDO_END): Define.
8461 2003-07-05 Richard Henderson <rth@redhat.com>
8463 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8464 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8465 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8466 return actual return value from the syscall, not 0.
8468 2003-07-07 Ulrich Drepper <drepper@redhat.com>
8470 * descr.h (struct pthread): Add pid field.
8471 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8472 (__reclaim_stacks): Likewise.
8473 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8474 also check for PID of the signal source.
8475 (__pthread_initialize_minimal_internal): Also initialize pid field
8476 of initial thread's descriptor.
8477 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8478 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8479 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8480 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8481 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8483 2003-07-05 Ulrich Drepper <drepper@redhat.com>
8485 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8486 Fix use of parameter.
8487 (__libc_cleanup_pop): Likewise.
8489 2003-07-04 Ulrich Drepper <drepper@redhat.com>
8491 * init.c (sigcancel_handler): Change parameters to match handler
8492 for SA_SIGACTION. Check signal number and code to recognize
8493 invalid invocations.
8495 2003-07-03 Roland McGrath <roland@redhat.com>
8497 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8498 Apply sizeof (struct pthread) bias to r13 value.
8500 2003-07-03 Ulrich Drepper <drepper@redhat.com>
8502 * sysdeps/pthread/configure.in: Require CFI directives.
8504 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8506 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8507 libpthread compilation.
8508 * unwind.c (__pthread_unwind): Add hidden_def.
8509 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8511 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8513 * libc-cancellation.c (__libc_cleanup_routine): Define.
8514 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8515 (__pthread_cleanup_pop): Define.
8517 2003-07-01 Richard Henderson <rth@redhat.com>
8519 * sysdeps/alpha/elf/pt-initfini.c: New file.
8520 * sysdeps/alpha/pthread_spin_lock.S: New file.
8521 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8522 * sysdeps/alpha/pthreaddef.h: New file.
8523 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8524 * sysdeps/alpha/tls.h: New file.
8525 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8526 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8527 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8528 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8529 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8530 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8531 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8532 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8533 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8534 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8536 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8538 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8539 cleanup support and unwind info.
8541 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8543 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8544 Use correct cleanup handler registration. Add unwind info.
8545 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8546 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8547 * tst-once3.c: Add cleanup handler and check it is called.
8548 * tst-once4.c: Likewise.
8549 * tst-oncex3.c: New file.
8550 * tst-oncex4.c: New file.
8551 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8553 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8555 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8557 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8559 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8560 (tf_msgsnd): Likewise.
8562 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8563 premature returns a bit more.
8565 2003-06-26 Ulrich Drepper <drepper@redhat.com>
8567 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8568 definition to the front.
8570 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8571 the cleanup functions to make the names unique. Fix dwarf opcode
8573 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8574 functions to make the names unique. Fix CFA offset for two blocks.
8576 2003-06-25 Ulrich Drepper <drepper@redhat.com>
8578 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8579 missing closing braces.
8580 Patch by Christophe Saout <christophe@saout.de>.
8582 2003-06-24 Roland McGrath <roland@redhat.com>
8584 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8586 2003-06-24 Ulrich Drepper <drepper@redhat.com>
8588 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8589 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8591 * pthreadP.h: Declare __find_thread_by_id.
8592 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8593 * pthread_clock_gettime.c: Allow using other thread's clock.
8594 * pthread_clock_settime.c: Likewise.
8595 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8596 * Makefile: Add rules to build and run tst-clock2.
8597 * tst-clock2.c: New file.
8599 2003-06-23 Ulrich Drepper <drepper@redhat.com>
8601 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8602 to use exception-based cleanup handler.
8603 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8605 * tst-cond8.c (ch): Announce that we are done.
8607 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8609 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8610 Also test aio_suspend with timeout value.
8612 2003-06-22 Ulrich Drepper <drepper@redhat.com>
8614 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8615 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8618 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8619 (__pthread_mutex_lock_internal): Likewise.
8620 (__pthread_mutex_unlock_internal): Likewise.
8621 (__pthread_mutex_unlock_usercnt): Declare.
8622 * pthread_mutex_destroy.c: Always fail if used in any way.
8623 * pthread_mutex_init.c: Update comment.
8624 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8625 * pthread_mutex_timedlock.c: Adjust __nusers.
8626 * pthread_mutex_trylock.c: Adjust __nusers.
8627 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8628 and public interfaces are wrapper with pass additional parameter.
8629 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8631 * tst-mutex8.c: New file.
8632 * Makefile (tests): Add tst-mutex8.
8633 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8634 __pthread_mutex_unlock_usercnt.
8635 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8636 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8637 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8638 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8639 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8640 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8641 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8643 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8644 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8645 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8646 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8647 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8649 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8650 * pthread_mutex_timedlock.c: Likewise.
8651 * pthread_mutex_trylock.c: Adjust __nusers.
8652 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8653 * tst-mutex9.c: New file.
8654 * Makefile (tests): Add tst-mutex9.
8655 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8656 * sysdeps/ia64/tls.h: Likewise.
8657 * sysdeps/powerpc/tls.h: Likewise.
8658 * sysdeps/s390/tls.h: Likewise.
8659 * sysdeps/sh/tls.h: Likewise.
8660 * sysdeps/x86_64/tls.h: Likewise.
8661 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8662 Change type of __owner.
8663 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8664 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8665 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8666 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8667 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8669 2003-06-19 Jakub Jelinek <jakub@redhat.com>
8671 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8672 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8674 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8675 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8676 instead of nr to lll_futex_wake. Only set errno and return -1
8679 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8680 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8681 return actual return value from the syscall, not 0.
8683 2003-06-18 Ulrich Drepper <drepper@redhat.com>
8685 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8686 find a random value.
8687 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8690 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8691 compat_timer_settime.
8692 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8693 compat_timer_gettime.
8694 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8695 compat_timer_getoverrun.
8696 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8697 compat_timer_delete.
8699 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8700 error-checking mutex detect busy mutexes.
8702 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8704 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8705 Add ax to clobber list.
8706 (lll_mutex_cond_lock): Likewise.
8707 (lll_mutex_unlock): Likewise.
8708 (lll_lock): Likewise.
8709 (lll_unlock): Likewise.
8711 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8712 * tst-cancel18.c: New file.
8713 * tst-cancelx18.c: New file.
8715 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8718 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8719 * tst-cancel17.c: New file.
8720 * tst-cancelx17.c: New file.
8722 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8723 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8724 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8726 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8728 2003-06-16 Jakub Jelinek <jakub@redhat.com>
8730 * sysdeps/pthread/createthread.c (create_thread): Set
8731 header.multiple_threads unconditionally.
8732 * allocatestack.c (allocate_stack): Likewise.
8733 * descr.h (struct pthread): Add header.multiple_threads
8735 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8736 Define for librt. #error if neither libpthread, libc nor librt.
8737 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8739 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8740 CDISABLE): Likewise.
8741 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8742 CDISABLE): Likewise.
8743 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8744 CDISABLE): Likewise.
8745 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8746 CDISABLE): Likewise. Access header.multiple_threads outside of
8747 libc and libpthread.
8748 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8750 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8751 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8753 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8755 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8756 Also test early cancellation before the thread reaches the cancellation
8759 * Makefile: Compile forward.c with exceptions.
8761 * sysdeps/unix/sysv/linux/sleep.c: New file.
8763 2003-06-16 Ulrich Drepper <drepper@redhat.com>
8765 * Makefile: Add CFLAGS definition to compile function wrappers
8766 duplicated from libc with exceptions.
8767 * tst-cancel4.c: Also check cancellation handlers.
8769 * Makefile: Add rules to build and run tst-cancel16 and
8770 tst-cancelx16. Add missing CFLAGS definitions.
8771 * tst-cancel16.c: New file.
8772 * tst-cancelx16.c: New file.
8774 2003-06-15 Ulrich Drepper <drepper@redhat.com>
8776 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8777 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8778 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8779 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8781 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8782 (LIBC_CANCEL_RESET): Likewise.
8783 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8784 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8786 (CFLAGS-libcrt-cancellation.c): Define.
8787 * sysdeps/pthread/librt-cancellation.c: New file.
8788 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8789 macros also when compiling librt.
8790 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8791 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8792 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8793 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8794 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8795 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8796 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8798 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8799 compat_timer_create.
8801 2003-06-14 Ulrich Drepper <drepper@redhat.com>
8803 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8805 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8807 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8808 Add libc_hidden_def.
8810 2003-06-13 Roland McGrath <roland@redhat.com>
8812 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8813 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8815 2003-06-11 Ulrich Drepper <drepper@redhat.com>
8817 * allocatestack.c (queue_stack): Always inline.
8818 * ptreadhP.h (__do_cancel): Likewise.
8820 2003-06-10 Jakub Jelinek <jakub@redhat.com>
8822 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8825 2003-06-10 Ulrich Drepper <drepper@redhat.com>
8827 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8828 (__pthread_cond_signal): Remove incorrect second addition for
8831 2003-06-09 Ulrich Drepper <drepper@redhat.com>
8833 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8834 (__pthread_cond_signal): Use correct futex pointer in
8835 __lll_mutex_lock_wait call.
8837 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8838 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8840 2003-06-08 Ulrich Drepper <drepper@redhat.com>
8842 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8844 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8847 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8848 hand-written CFI generation code. Since ENTRY/END also initiated
8849 CFI frames this caused two CFI sets to be generated.
8851 2003-06-07 Ulrich Drepper <drepper@redhat.com>
8853 * cleanup_routine.c: New file.
8854 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8855 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8857 * Makefile (libpthread-routines): Add cleanup_routine.
8858 Add more CFLAGS variables to compile with exceptions. Add comments
8859 why which file needs unwind tables.
8860 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8862 * tst-cancelx1.c: New file.
8863 * tst-cancelx2.c: New file.
8864 * tst-cancelx3.c: New file.
8865 * tst-cancelx4.c: New file.
8866 * tst-cancelx5.c: New file.
8867 * tst-cancelx6.c: New file.
8868 * tst-cancelx7.c: New file.
8869 * tst-cancelx8.c: New file.
8870 * tst-cancelx9.c: New file.
8871 * tst-cancelx10.c: New file.
8872 * tst-cancelx11.c: New file.
8873 * tst-cancelx12.c: New file.
8874 * tst-cancelx13.c: New file.
8875 * tst-cancelx14.c: New file.
8876 * tst-cancelx15.c: New file.
8877 * tst-cleanupx0.c: New file.
8878 * tst-cleanupx0.expect: New file.
8879 * tst-cleanupx1.c: New file.
8880 * tst-cleanupx2.c: New file.
8881 * tst-cleanupx3.c: New file.
8883 * tst-cleanup0.c: Make standard compliant.
8884 * tst-cleanup1.c: Likewise.
8886 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8887 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8888 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8889 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8890 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8891 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8892 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8894 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8895 * tst-cancel12.c: New file.
8896 * tst-cancel13.c: New file.
8897 * tst-cancel14.c: New file.
8898 * tst-cancel15.c: New file.
8899 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8902 * tst-cancel1.c: Add some comments.
8904 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8907 2003-06-06 Ulrich Drepper <drepper@redhat.com>
8909 * Makefile (CFLAGS-pthread_cancel.c): Define.
8911 2003-06-05 Ulrich Drepper <drepper@redhat.com>
8913 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8914 Change type of __writer element to int.
8915 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8916 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8917 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8918 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8919 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8920 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8921 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8922 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8923 Compare with TID to determine deadlocks.
8924 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8925 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8926 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8927 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8928 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8929 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8931 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8933 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8934 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8935 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8937 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8939 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8940 * Makefile (tests): Add tst-rwlock12.
8941 * tst-rwlock12.c: New file.
8943 2003-06-05 Jakub Jelinek <jakub@redhat.com>
8945 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8946 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8947 Remove bogus hidden_proto.
8948 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8950 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8951 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8952 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8953 ___lll_mutex_timedlock): Likewise.
8955 2003-06-04 Ulrich Drepper <drepper@redhat.com>
8957 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8958 (__pthread_cond_signal): Add some code to eventually handle
8961 2003-06-01 Ulrich Drepper <drepper@redhat.com>
8963 * Makefile (tests): Add tst-exec4.
8964 (tst-exec4-ARGS): Define.
8965 * tst-exec4.c: New file.
8967 2003-05-31 Ulrich Drepper <drepper@redhat.com>
8969 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8970 Also fail if tv_nsec < 0.
8971 (__lll_timedwait_tid): Likewise.
8972 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8973 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8975 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8977 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8979 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8981 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8983 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8986 * Makefile (tests): Add tst-sem8 and tst-sem9.
8987 * tst-sem8.c: New file.
8988 * tst-sem9.c: New file.
8989 * sem_open.c: Fix creation of in_use record if the file exists but
8992 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8995 * sysdeps/pthread/timer_create.c (timer_create): In case
8996 evp==NULL, assign timer ID to sival_ptr.
8998 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8999 struct pthread_unwind_buf *.
9000 (struct pthread): Likewise for cleanup_jmp_buf element.
9002 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
9003 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
9004 * unwind.c (__pthread_unwind_next): Likewise.
9006 2003-05-30 Ulrich Drepper <drepper@redhat.com>
9008 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9009 (lll_futex_timed_wait): Use int for futex value parameter.
9010 (lll_futex_wake): Likewise.
9011 (lll_futex_requeue): Likewise.
9013 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9014 Replace one memory operation with one register operation.
9016 * tst-join4.c (do_test): Fix error message.
9018 * tst-rwlock6.c (do_test): Use correct format specifier.
9020 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9021 (__lll_mutex_lock_wait): Replace one memory operation with one
9023 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
9024 (__lll_mutex_lock_wait): Likewise.
9026 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9027 (__lll_mutex_cond_lock): Add one to value parameter of
9028 __lll_lock_wait to reflect reality in the futex syscall.
9029 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9030 (lll_mutex_cond_lock): Likewise.
9032 2003-05-30 Jakub Jelinek <jakub@redhat.com>
9034 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
9036 (lll_mutex_cond_lock): Define.
9038 2003-05-29 Ulrich Drepper <drepper@redhat.com>
9040 * Makefile (tests): Add tst-signal6.
9041 * tst-signal6.c: New file.
9043 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
9044 (__lll_mutex_unlock_force): New function
9045 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9047 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9048 (__lll_mutex_unlock_force): New function.
9049 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9051 * tst-rwlock7.c (do_test): Use correct format specifier.
9053 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
9054 Find break parameter in correct asm argument.
9056 2003-05-27 Jakub Jelinek <jakub@redhat.com>
9058 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
9060 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
9062 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9064 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
9065 lll_futex_requeue, lll_mutex_unlock_force): Define.
9067 2003-05-30 Jakub Jelinek <jakub@redhat.com>
9069 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9070 (pthread_cond_t): Add __mutex.
9071 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
9072 lll_futex_requeue, lll_mutex_unlock_force): Define.
9074 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9076 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
9077 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
9079 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
9081 (lll_futex_wait, lll_futex_wake): Define.
9082 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
9083 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
9084 FUTEX_REQUEUE instead of FUTEX_WAIT.
9085 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
9086 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
9087 mutex which was used in condvar structure. Call
9088 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
9089 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
9091 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
9092 include tcb-offsets.h. Read wakeup value in locked region.
9093 Use the value of gbr register as THREAD_ID.
9094 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9095 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9096 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9098 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
9101 2003-05-28 Ulrich Drepper <drepper@redhat.com>
9103 * sysdeps/pthread/pthread_cond_broadcast.c
9104 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
9106 2003-05-26 Ulrich Drepper <drepper@redhat.com>
9108 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
9109 typo in register name.
9110 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
9111 correctly. Actually use requeue. Little optimization.
9112 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
9113 mutex address early. Handle cancellation state as 32-bit value.
9114 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9115 Remove unnecessary label.
9117 2003-05-25 Ulrich Drepper <drepper@redhat.com>
9119 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
9120 instead of FUTEX_WAIT.
9121 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
9122 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9123 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9124 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
9125 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9126 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
9127 used in condvar structure. Call __pthread_mutex_cond_lock instead
9128 of __pthread_mutex_lock_internal.
9129 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9130 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9131 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9132 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
9133 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9134 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9135 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
9136 Add pthread_mutex_cond_lock.
9137 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
9138 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
9139 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
9140 lll_mutex_cond_lock.
9141 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
9142 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9143 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9145 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9146 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9148 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
9149 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9151 * pthreadP.h: Declare __pthread_mutex_cond_lock.
9152 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
9153 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
9154 macro don't define aliases.
9156 * cancellation.c: Remove __pthread_enable_asynccancel_2.
9157 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
9158 * sysdeps/pthread/pthread_cond_timedwait.c: Use
9159 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
9160 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9161 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9162 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9163 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9164 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9166 2003-05-17 Ulrich Drepper <drepper@redhat.com>
9168 * sem_open.c: Fix one endless loop. Implement correct semantics
9169 wrt opening the same semaphore more then once.
9170 * sem_close.c: Adjust for sem_open change.
9171 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
9172 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
9173 * Makefile (tests): Add tst-sem7.
9174 * tst-sem7.c: New file.
9176 2003-05-16 Roland McGrath <roland@redhat.com>
9178 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
9179 uninitialized variable braino.
9181 2003-05-16 Ulrich Drepper <drepper@redhat.com>
9183 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
9184 test for syscall availability.
9186 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
9187 __no_posix_timers to -1 if the syscalls don't exist.
9189 * pthread_join.c (pthread_join): Set tid field of the joined
9190 thread to -1. This isn't necessary but helps to recognize some
9191 error conditions with almost no cost.
9193 * allocatestack.c (FREE_P): Also negative values indicate an
9196 * unwind.c: Include <unistd.h>.
9198 2003-05-14 Ulrich Drepper <drepper@redhat.com>
9200 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9202 2003-05-14 Jakub Jelinek <jakub@redhat.com>
9204 * Makefile (crti-objs, crtn-objs): New variables.
9205 (omit-deps, extra-objs): Add crtn.
9206 ($(objpfx)libpthread.so): Depend on both crti and crtn
9207 and links to them in multidir.
9208 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9210 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
9212 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9213 (lll_mutex_unlock): Use atomic_exchange_rel.
9215 2003-05-11 Ulrich Drepper <drepper@redhat.com>
9217 * cond-perf.c (cons): Add missing locking around setting of alldone.
9219 2003-05-10 Ulrich Drepper <drepper@redhat.com>
9221 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9223 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9225 2003-05-09 Ulrich Drepper <drepper@redhat.com>
9227 * tst-sem6.c: New file.
9228 * Makefile (tests): Add tst-sem6.
9230 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9231 Use atomic_exchange_rel instead of atomic_exchange.
9232 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9235 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9236 code for lll_futex_wait and lll_futex_wake in static apps. Use
9237 vsyscall is possible.
9239 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9240 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9241 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9242 pthread_setaffinity_np.
9243 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9244 and pthread_setaffinity_np.
9245 * Makefile (libpthread-routines): Add pthread_getaffinity and
9246 pthread_setaffinity.
9248 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9249 use it in case mmap to allocate the stack fails.
9250 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9251 ARCH_MAP_FLAGS here.
9252 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9255 2003-05-08 Ulrich Drepper <drepper@redhat.com>
9257 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9258 handler implementation. It is now lockless in fork().
9259 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9260 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9261 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
9262 declare the __fork_*_lists.
9263 (struct fork_handler): Include pointers to all three functions.
9264 Add next, refcntr and need_signal elements.
9265 (__fork_handlers): New declaration.
9266 (__register_atfork_malloc): Remove declaration.
9267 (HAVE_register_atfork_malloc): Remove definition.
9268 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9269 __pthread_child_handler variable.
9270 (__libc_pthread_init): Use __register_atfork instead of explicitly
9272 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9274 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9276 * unwind.c (unwind_cleanup): Print error message and then abort. This
9277 function must never be reached.
9279 * cond-perf.c: New file.
9281 2003-05-05 Ulrich Drepper <drepper@redhat.com>
9283 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9285 2003-05-04 Roland McGrath <roland@redhat.com>
9287 * Makefile ($(objpfx)../libc.so): New target.
9289 2003-05-02 Ulrich Drepper <drepper@redhat.com>
9291 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9292 (pthread_condattr_t): Size is only an int, don't use long for
9294 (pthread_mutexattr_t): Likewise.
9295 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9296 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9297 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9299 2003-05-01 Ulrich Drepper <drepper@redhat.com>
9301 * sysdeps/i386/tls.h: Define THREAD_ID.
9302 * sysdeps/ia64/tls.h: Likewise.
9303 * sysdeps/powerpc/tls.h: Likewise.
9304 * sysdeps/s390/tls.h: Likewise.
9305 * sysdeps/sh/tls.h: Likewise.
9306 * sysdeps/x86_64/tls.h: Likewise.
9307 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9309 * pthread_mutex_timedlock.c: Likewise.
9310 * pthread_mutex_trylock.c: Likewise.
9311 * pthread_mutex_unlock.c: Likewise.
9312 * pthread_rwlock_trywrlock.c: Likewise.
9313 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9314 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9315 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9316 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9318 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9321 2003-04-29 Jakub Jelinek <jakub@redhat.com>
9323 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9324 (__SIZEOF_PTHREAD_COND_T): Define to 48.
9325 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9326 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9327 Make __align long long instead of long.
9328 (pthread_rwlock_t): Formatting.
9329 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9330 (pthread_rwlock_t): Formatting.
9331 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9332 (pthread_cond_t): Make __align long long instead of long.
9333 (pthread_rwlock_t): Move __flags field to the same position as in
9336 2003-04-30 Ulrich Drepper <drepper@redhat.com>
9338 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9339 * tst-rwlock7.c (do_test): Likewise.
9341 2003-04-26 Roland McGrath <roland@redhat.com>
9343 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9345 2003-04-22 Jakub Jelinek <jakub@redhat.com>
9347 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9348 sizeof (struct pthread).
9349 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9351 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9353 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9355 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9357 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9359 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9361 (NO_TLS_OFFSET): Define.
9362 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9363 add TLS_TCB_SIZE unnecessarily.
9365 2003-04-22 Roland McGrath <roland@redhat.com>
9367 * Makeconfig (shared-thread-library): Reverse link order to work
9370 2003-04-22 Ulrich Drepper <drepper@redhat.com>
9372 * semaphore.h: Fix typo in comment.
9374 2003-04-21 Ulrich Drepper <drepper@redhat.com>
9376 * sysdeps/pthread/sigfillset.c: New file.
9378 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9379 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9380 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9381 * sysdeps/pthread/sigaction.c: Likewise.
9382 * sysdeps/pthread/sigprocmask.c: New file.
9383 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9385 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9386 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9389 2003-04-19 Ulrich Drepper <drepper@redhat.com>
9391 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9392 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9394 * sysdeps/unix/sysv/linux/unregister-atfork.c
9395 (__unregister_atfork): Don't free memory not allocated dynamically.
9397 * semaphore.h: Remove __THROW marker from cancellation points.
9398 * nptl/sysdeps/pthread/pthread.h: Likewise.
9400 2003-04-18 Ulrich Drepper <drepper@redhat.com>
9402 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9403 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9406 2003-04-16 Jakub Jelinek <jakub@redhat.com>
9408 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9410 2003-04-15 Roland McGrath <roland@redhat.com>
9412 * forward.c (__pthread_unwind): Tweak to avoid warning.
9414 2003-04-15 Ulrich Drepper <drepper@redhat.com>
9416 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9418 2003-04-14 Ulrich Drepper <drepper@redhat.com>
9420 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9421 overflow CFA advance instructions.
9422 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9424 2003-04-14 Jakub Jelinek <jakub@redhat.com>
9426 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9427 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9428 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9431 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9432 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9433 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9434 DW_CFA_advance_loc for .Laddl-.Lsubl.
9436 2003-04-13 Ulrich Drepper <drepper@redhat.com>
9438 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9439 position-independent unwind data for static libraries.
9440 Add missing unwind info. Add comments.
9442 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9443 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9444 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9445 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9447 2003-04-12 Ulrich Drepper <drepper@redhat.com>
9449 * Makefile: Make sure all cancellation points are compiled with
9450 exception and asynchronous unwind tables.
9452 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9453 which mishandles loading of global object addresses in PIC.
9454 (THREAD_SETMEM_NC): Likewise.
9456 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9458 * pthread.h: Define new data structure for cleanup buffer. Declare
9459 new cleanup handler interfaces.
9460 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9461 (struct pthread): Add cleanup_jmp_buf pointer. Define
9462 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9463 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9464 it. Declare old cleanup handler installation functions.
9465 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9467 * cleanup_defer.c: Likewise.
9468 * cleanup_compat.c: New file. Old cleanup code.
9469 * cleanup_def_compat.c: New file. Old cleanup code.
9470 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9471 if own thread descriptor.
9472 * unwind.c: New file.
9473 * forward.c: Add __pthread_unwind.
9474 * init.c (pthread_functions): Add __pthread_unwind.
9475 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9476 Add ptr___pthread_unwind.
9477 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9478 and unwind function.
9479 * Makefile (libpthread-routines): Add cleanup_compat,
9480 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9481 table generation if necessary.
9482 * version.c: Record whether unwind support is compiled in.
9483 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9484 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9486 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9487 complication to generate unwind information for syscall wrappers.
9488 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9489 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9490 __cleanup_fct_attribute.
9492 * Makefile: Add rules to build and run tst-cleanup0.
9493 * tst-cleanup0.c: New file.
9494 * tst-cleanup0.expect: New file.
9496 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9497 caller. Optimize to avoid often unecessary local variable.
9499 2003-04-11 Roland McGrath <roland@redhat.com>
9501 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9502 sets variable `multidir'; include that.
9503 (generated): Add it.
9504 ($(objpfx)$(multidir)/crti.o): New target.
9505 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9507 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9509 * tst-attr2.c (do_test): Add cast to avoid warning.
9510 * tst-mutex4.c (do_test): Likewise.
9512 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9514 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9517 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9519 * Makefile (tests): Add tst-detach1.
9520 * tst-detach1.c: New file.
9522 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9524 * sysdeps/pthread/pthread.h: Remove duplicate
9525 pthread_cleanup_{push,pop} definitions.
9527 * tst-barrier2.c: Eliminate warnings.
9528 * tst-cancel4.c: Likewise.
9529 * tst-cond4.c: Likewise.
9530 * tst-cond6.c: Likewise.
9531 * tst-detach1.c: Likewise.
9532 * tst-rwlock4.c: Likewise.
9533 * tst-rwlock6.c: Likewise.
9534 * tst-rwlock7.c: Likewise.
9535 * tst-sem3.c: Likewise.
9536 * tst-spin2.c: Likewise.
9537 * tst-umask1.c: Likewise.
9539 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9541 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9543 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9545 * descr.h (struct pthread): Move cancelhandling member to the front.
9547 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9549 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9550 malloc_parent, and malloc_child statically.
9551 (__register_atfork_malloc): New function.
9552 (free_mem): Don't free any of the malloc_* variables on the list.
9553 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9554 Define HAVE_register_atfork_malloc.
9556 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9558 * sysdeps/pthread/createthread.c (create_thread): Add some more
9559 comments explaining when to set multiple_threads and when not.
9561 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9562 THREAD_ATOMIC_BIT_SET if not already defined.
9563 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9564 THREAD_ATOMIC_BIT_SET:
9565 * sysdeps/x86_64/tls.h: Likewise.
9566 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9567 THREAD_ATOMIC_CMPXCHG_VAL.
9568 (_pthread_cleanup_pop_restore): Likewise.
9569 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9570 (__pthread_enable_asynccancel_2): Likewise.
9571 (__pthread_disable_asynccancel): Likewise.
9572 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9573 (__libc_disable_asynccancel): Likewise.
9574 * init.c (sigcancel_handler): Likewise.
9575 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9576 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9578 2003-04-03 Ulrich Drepper <drepper@redhat.com>
9580 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9581 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9582 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9583 * Makefile (tests): Add tst-cancel11.
9584 * tst-cancel11.c: New file.
9586 2003-04-01 Ulrich Drepper <drepper@redhat.com>
9588 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9589 round, not the first. Use specific_used flag instead of local
9590 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9591 (__free_tcb): Don't call deallocate_tsd here.
9592 (start_thread): Call deallocate_tsd here.
9593 * pthread_setspecific.c: Set specific_used flag really only when
9595 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9596 * tst-tsd3.c: New file.
9597 * tst-tsd4.c: New file.
9599 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9601 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9602 Use atomic_exchange_and_add instead of __lll_add.
9603 (__lll_mutex_timedlock): Likewise.
9604 Patch by Ian Wienand.
9606 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9608 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9609 (SINGLE_THREAD_P): Fix typo.
9610 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9612 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9614 * Makefile (tests): Add tst-align.
9615 * tst-align.c: New file.
9616 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9618 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9621 * tst-tsd2.c: Add casts to avoid warnings.
9623 2003-03-30 Ulrich Drepper <drepper@redhat.com>
9625 * descr.h (struct pthread): Move most often used elements to the front.
9627 2003-03-29 Ulrich Drepper <drepper@redhat.com>
9629 * Makefile (libpthread-routines): Add pthread_atfork.
9630 (libpthread-static-only-routines): Add pthread_atfork.
9632 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9634 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9636 (INSTALL_DTV): Add parens.
9637 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9638 Use passed descr instead of THREAD_SELF.
9639 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9640 (__lll_mutex_timedlock_wait): Correct expected value after
9642 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9643 Release lock before waking up the waiters.
9644 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9645 criteria. Reorderstruct passed to cleanup handler. Fix
9646 handling of cancellation and failung pthread_mutex_unlock call.
9647 Use __pthread_enable_asynccancel_2 instead of
9648 __pthread_enable_asynccancel.
9649 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9650 Return result of lock re-get if it fails.
9651 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9652 for __pthread_cleanup_push.
9653 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9654 completely broken rwlock implementation.
9655 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9656 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9657 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9658 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9659 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9660 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9661 versioned_symbol macro.
9662 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9663 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9665 2003-03-27 Ulrich Drepper <drepper@redhat.com>
9667 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9668 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9670 (struct timer): Remove th and bar field.
9671 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9672 debugging code. Create only one helper thread.
9673 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9675 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9676 Renamed. Define statically. Use thread info from siginfo.
9677 (__helper_once): New variable.
9678 (__helper_tid): New variable.
9679 (__reset_helper_control): New function.
9680 (__start_helper_thread): New function.
9682 * pthread_create.c (start_thread): Don't use setjmp inside
9683 __builtin_expect to work around gcc bug.
9685 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9686 timer_delete syscall fails, but not with ENOSYS, set
9689 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9690 (timer_settime): Fix typo.
9691 * sysdeps/unix/sysv/linux/timer_getoverr.c
9692 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9694 2003-03-27 Jakub Jelinek <jakub@redhat.com>
9696 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9697 offset of cleanupbuf.__prev.
9699 2003-03-26 Jakub Jelinek <jakub@redhat.com>
9701 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9704 2003-03-26 Ulrich Drepper <drepper@redhat.com>
9706 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9707 NULL provide default definition to syscall.
9709 2003-03-25 Roland McGrath <roland@redhat.com>
9711 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9712 (timer_id2ptr): Fix typo.
9714 2003-03-25 Ulrich Drepper <drepper@redhat.com>
9716 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9717 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9718 * sysdeps/ia64/pthreaddef.h: Likewise.
9719 * sysdeps/powerpc/pthreaddef.h: Likewise.
9720 * sysdeps/s390/pthreaddef.h: Likewise.
9721 * sysdeps/sh/pthreaddef.h: Likewise.
9722 * sysdeps/x86_64/pthreaddef.h: Likewise.
9723 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9724 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9726 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9727 SIGTIMER is not unblocked.
9728 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9730 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9732 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9733 pass pointer through as ID.
9734 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9735 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9736 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9737 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9738 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9739 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9740 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9741 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9742 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9743 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9744 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9745 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9746 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9747 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9748 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9749 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9750 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9751 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9752 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9753 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9754 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9755 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9756 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9757 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9758 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9759 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9760 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9761 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9762 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9763 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9764 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9765 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9766 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9768 * pthreadP.h: Remove FRAME_LEFT definition.
9769 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9770 already left frame. Programs which have this problem are not POSIX
9772 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9774 2003-03-24 Ulrich Drepper <drepper@redhat.com>
9776 * sysdeps/pthread/tst-timer.c: Check return values of the
9779 2003-03-23 Roland McGrath <roland@redhat.com>
9781 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9782 * tst-tls3mod.c: Likewise.
9783 * tst-tls1.c: Likewise.
9784 * tst-tls2.c: Likewise.
9786 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9789 * tst-join5.c (tf1, tf2): Add a cast.
9791 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9793 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9794 Don't test anything.
9795 * tst-cond4.c: Likewise.
9796 * tst-cond6.c: Likewise.
9797 * tst-flock2.c: Likewise.
9798 * tst-mutex4.c: Likewise.
9799 * tst-rwlock4.c: Likewise.
9800 * tst-signal1.c: Likewise.
9801 * tst-spin2.c: Likewise.
9802 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9804 * tst-mutex4.c: Use test-skeleton.c.
9805 * tst-spin2.c: Likewise.
9806 * tst-sysconf.c: Likewise.
9807 * tst-barrier2.c: Likewise.
9808 * tst-cond4.c: Likewise.
9809 * tst-cond6.c: Likewise.
9810 * tst-rwlock4.c: Likewise.
9811 * tst-unload.c: Likewise.
9812 * tst-flock2.c (do_test): Use return instead of exit.
9814 2003-03-22 Jakub Jelinek <jakub@redhat.com>
9816 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9818 2003-03-21 Ulrich Drepper <drepper@redhat.com>
9820 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9821 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9822 instead of __lll_compare_and_swap.
9823 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9825 Removed definition if __lll_compare_and_swap.
9827 * cancellation.c: Adjust for new form of compare&exchange macros.
9828 * cleanup_defer.c: Likewise.
9830 * libc-cancellation.c: Likewise.
9831 * old_pthread_cond_broadcast.c: Likewise.
9832 * old_pthread_cond_signal.c: Likewise.
9833 * old_pthread_cond_timedwait.c: Likewise.
9834 * old_pthread_cond_wait.c: Likewise.
9835 * pthread_cancel.c: Likewise.
9836 * pthread_create.c: Likewise.
9837 * pthread_detach.c: Likewise.
9838 * pthread_join.c: Likewise.
9839 * pthread_key_delete.c: Likewise.
9840 * pthread_setcancelstate.c: Likewise.
9841 * pthread_setcanceltype.c: Likewise.
9842 * pthread_timedjoin.c: Likewise.
9843 * pthread_tryjoin.c: Likewise.
9844 * sysdeps/pthread/createthread.c: Likewise.
9846 2003-03-20 Ulrich Drepper <drepper@redhat.com>
9848 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9849 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9850 definitions. Replace uses with calls to atomic_* functions.
9851 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9852 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9853 __lll_test_and_set calls with atomic_exchange_and_add and
9854 atomic_exchange calls respectively.
9855 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9856 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9857 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9858 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9859 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9860 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9861 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9863 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9864 returns the old value.
9866 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9868 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9869 int for variable OLDVAL and correct inline assembler contraint.
9870 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9871 type int for variable OLD.
9873 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9875 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9876 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9877 instead of multiple_threads field in the TCB.
9879 2003-03-19 Ulrich Drepper <drepper@redhat.com>
9881 * sysdeps/i386/i686/bits/atomic.h: Removed.
9882 * sysdeps/i386/i586/bits/atomic.h: Removed.
9883 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9884 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9885 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9886 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9887 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9888 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9889 * atomic.h: Removed. Moved to glibc.
9891 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9892 support for clock selection.
9894 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9897 2003-03-18 Roland McGrath <roland@redhat.com>
9899 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9900 Add __lll_rel_instr first. Add memory clobber.
9901 (lll_mutex_unlock): Use __lll_test_and_set.
9902 From Paul Mackerras <paulus@samba.org>.
9904 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9906 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9907 (SINGLE_THREAD_P): Add `header.' prefix.
9908 From Paul Mackerras <paulus@samba.org>.
9910 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9911 pthread_timedjoin_np to ...
9912 (libpthread: GLIBC_2.3.3): ... here.
9913 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9915 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9916 Avoid shadowing VAL variable.
9918 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9921 2003-03-18 Ulrich Drepper <drepper@redhat.com>
9923 * Makefile (tests): Add tst-cond11.
9924 * tst-cond11.c: New file.
9926 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9927 struct passed to cleanup handler to eliminate one more
9929 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9931 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9932 (pthrad_cond_t): Replace __unused field with __clock.
9934 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9935 waken all waiters in cleanup handler.
9936 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9937 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9939 * pthread_condattr_getclock.c: New file.
9940 * pthread_condattr_setclock.c: New file.
9941 * sysdeps/pthread/pthread.h: Declare these new functions.
9942 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9943 * Makefile (libpthread-routines): Add the new functions.
9944 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9945 Renamed field to value. Document use of the bits.
9946 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9948 * pthread_condattr_setpshared.c: Likewise.
9949 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9950 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9951 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9953 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9954 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9955 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9956 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9957 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9958 Implement clock selection.
9959 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9960 * pthread-errnos.sym: Add ENOSYS.
9961 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9962 _POSIX_CLOCK_SELECTION.
9963 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9965 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9966 invalid .size directive.
9968 2003-03-17 Roland McGrath <roland@redhat.com>
9970 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9973 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9975 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9976 Use __lll_add instead of spelling it out. Use protected symbol names.
9977 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9979 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9980 Renamed from lll_compare_and_swap. Use new name where necessary.
9981 (__lll_add): Defined.
9982 (__lll_dec_if_positive): Defined.
9983 (__lll_test_and_set): Defined.
9984 * sysdeps/ia64/pthread_spin_init.c: Removed.
9985 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9986 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9987 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9988 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9989 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9990 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9991 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9992 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9993 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9994 __sync_lock_release_si.
9995 Patch by Jakub Jelinek.
9997 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9998 Fix timeout handling.
9999 (__lll_timedwait_tid): Likewise.
10000 (lll_unlock_wake_cb): Wake up other waiters if necessary.
10001 Patch by Jakub Jelinek.
10003 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
10005 2003-03-17 Roland McGrath <roland@redhat.com>
10007 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
10008 * sysdeps/pthread/pthread_spin_init.c: New file.
10009 * sysdeps/pthread/pthread_spin_unlock.c: New file.
10010 * sysdeps/powerpc/Makefile: New file.
10011 * sysdeps/powerpc/pthread_spin_lock.c: New file.
10012 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
10013 * sysdeps/powerpc/pthreaddef.h: New file.
10014 * sysdeps/powerpc/tcb-offsets.sym: New file.
10015 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
10016 * sysdeps/powerpc/tls.h: New file.
10017 * sysdeps/powerpc/bits/atomic.h: New file.
10018 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
10019 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
10020 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
10022 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
10023 * sysdeps/unix/sysv/linux/sem_post.c: New file.
10024 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
10025 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
10026 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
10027 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
10028 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
10029 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
10030 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
10031 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
10032 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
10033 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
10034 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
10035 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
10036 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
10038 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
10040 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
10041 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10042 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
10043 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
10044 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10046 2003-03-17 Ulrich Drepper <drepper@redhat.com>
10048 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
10049 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10050 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10051 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10052 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
10054 2003-03-16 Roland McGrath <roland@redhat.com>
10056 * tst-fork4.c: Include <string.h>.
10057 * tst-signal2.c: Likewise.
10058 * tst-mutex5.c (do_test): exit -> return.
10059 * tst-mutex2.c: Include <stdlib.h>.
10061 2003-03-16 Ulrich Drepper <drepper@redhat.com>
10063 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10064 (__lll_mutex_timedlock_wait): Correct expected value after
10065 spurious wakeup. Otherwise we would never wait again.
10067 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
10068 zone versus inline asm stupidity. Use correct instructions.
10070 * tst-rwlock6.c: Add some more status output.
10072 2003-03-15 Roland McGrath <roland@redhat.com>
10074 * sysdeps/pthread/configure.in: New file.
10075 * sysdeps/pthread/configure: New file (generated).
10077 2003-03-15 Ulrich Drepper <drepper@redhat.com>
10079 * allocatestack.c (allocate_stack): Store the exact stack size of
10080 user allocated stacks.
10082 2003-03-15 Jakub Jelinek <jakub@redhat.com>
10084 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
10085 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
10086 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10087 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
10088 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
10089 Use `header.' prefix.
10090 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10092 2003-03-15 Ulrich Drepper <drepper@redhat.com>
10094 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
10095 __builtin_frame_address, use stack pointer.
10097 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
10098 instead of __builtin_frame_pointer.
10100 2003-03-14 Ulrich Drepper <drepper@redhat.com>
10102 * tst-basic1.c (do_test): Add cast to avoid warning.
10103 * tst-basic2.c (do_test): Likewise.
10105 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
10106 amount of stack correction.
10108 * tst-fork4.c: Use test-skeleton.c.
10110 2003-03-14 Roland McGrath <roland@redhat.com>
10112 * init.c: Fix typo "#eli" for "#else".
10114 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
10116 * allocatestack.c (__stack_user): Use hidden_data_def.
10117 * pthread_create.c (__pthread_keys): Likewise.
10119 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
10121 2003-03-14 Roland McGrath <roland@redhat.com>
10123 * tst-fork4.c: New file.
10124 * Makefile (tests): Add it.
10126 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
10127 we always define the padding space.
10128 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
10129 stopped supporting its own extensions fully.
10130 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
10131 struct also called `header', so `header.multiple_threads' is the field
10132 name to use on all machines.
10133 * allocatestack.c (allocate_stack): Use `header.' prefix.
10134 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10135 * pthread_create.c (__pthread_create_2_1): Likewise.
10136 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
10137 (THREAD_SELF): Likewise.
10138 * sysdeps/x86_64/tls.h: Likewise.
10139 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10140 (SINGLE_THREAD_P): Likewise.
10141 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10142 (SINGLE_THREAD_P): Likewise.
10143 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10144 (SINGLE_THREAD_P): Likewise.
10146 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
10149 2003-03-14 Ulrich Drepper <drepper@redhat.com>
10151 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
10152 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
10154 * pthread_create.c (start_thread): setjmp is expected to return 0.
10156 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
10157 (THREAD_GETMEM_NC): Likewise.
10159 2003-03-13 Ulrich Drepper <drepper@redhat.com>
10161 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
10162 and the size of the stack which must be allocated is a multiple,
10163 allocate one more page.
10164 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
10165 MULTI_PAGE_ALIASING.
10167 2003-03-13 Roland McGrath <roland@redhat.com>
10169 * pthread_create.c (start_thread): Set EXITING_BIT after the
10170 event-reporting (and destructors), not before.
10172 2003-03-13 Jakub Jelinek <jakub@redhat.com>
10174 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
10175 lll_futex_wake): Declare register variables as long int instead of
10176 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
10177 Make syscall arguments clobbered by the syscall.
10178 (lll_futex_wait): Define using lll_futex_timed_wait.
10180 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
10183 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
10184 PPID if [! NDEBUG].
10186 * allocatestack.c (nptl_ncreated): Only declare if
10187 COLORING_INCREMENT != 0.
10189 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10190 (__libc_enable_asynccancel_2): Remove prototype.
10192 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10193 ctid to match kernel.
10195 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10197 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10198 libc_multiple_threads.
10199 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10200 __libc_multiple_threads to...
10201 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
10203 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10205 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10206 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10208 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10209 (__pthread_once_internal): Define.
10211 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10212 macros instead of .symver directly.
10213 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10214 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10216 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10217 * sysdeps/x86_64/tcb-offsets.sym: New file.
10218 * sysdeps/x86_64/Makefile: New file.
10220 * sysdeps/i386/tcb-offsets.sym: Add SELF.
10221 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10222 to access own pthread_t in TCB.
10223 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10225 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10227 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10229 2003-03-12 Roland McGrath <roland@redhat.com>
10231 * pthread-errnos.sym: New file.
10232 * Makefile (gen-as-const-headers): New variable, list that file.
10233 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10234 header <pthread-errnos.h> instead of defining errno values here.
10235 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10236 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10237 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10238 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10239 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10241 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10243 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10244 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10245 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10246 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10247 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10248 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10249 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10250 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10251 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10252 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10253 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10254 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10255 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10256 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10257 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10258 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10259 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10260 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10261 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10262 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10263 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10264 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10265 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10266 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10267 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10268 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10269 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10271 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10272 CLONE_CHILD_SETTID worked.
10274 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10276 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10278 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10281 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10282 (pthread_cond_t): Add padding.
10284 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10285 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10286 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10288 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10289 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10290 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10291 (__pthread_rwlock_timedrdlock): Likewise.
10292 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10293 (__pthread_rwlock_wrlock): Likewise.
10294 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10295 (__pthread_rwlock_rdlock): Likewise.
10297 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10299 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10300 result of lock re-get if it fails.
10302 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10304 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10305 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10306 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10307 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10308 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10309 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10310 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10311 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10312 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10313 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10315 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10316 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10318 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10319 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10320 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10321 (create_thread): Likewise.
10322 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10323 * init.c (__pthread_initialize_minimal_internal): Initialize
10324 __libc_multiple_threads_ptr if necessary.
10325 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
10326 __pthread_multiple_threads and __libc_multiple_threads_ptr.
10327 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10328 __libc_multiple_threads.
10329 (__libc_pthread_init): Return pointer to __libc_pthread_init if
10332 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10333 (THREAD_SETMEM_NC): Likewise.
10335 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10336 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10337 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10338 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10340 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10341 Eliminate one entire instruction.
10343 * cancellation.c (__pthread_enable_asynccancel_2): New function.
10344 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10345 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10346 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10347 instead of __pthread_enable_asynccancel.
10348 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10349 (__pthread_cond_wait): Likewise.
10350 * sysdeps/pthread/pthread_cond_timedwait.c
10351 (__pthread_cond_timedwait): Likewise.
10352 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10354 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10355 (__condvar_cleanup): Wake up all waiters in case we got signaled
10356 after being woken up but before disabling asynchronous
10358 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10359 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10360 (__condvar_cleanup): Likewise.
10362 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10363 Make it an error if architecture has no #if case. Add x86-64.
10365 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10366 pt-initfini.s generation.
10368 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10369 (TLS_INIT_TP): Fix typo.
10371 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10373 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10374 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10376 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10377 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10378 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10379 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10380 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10381 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10382 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10383 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10385 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10387 * sysdeps/pthread/pthread_cond_timedwait.c
10388 (__pthread_cond_timedwait): Return the result of the final
10389 locking. If it succeeds, the regular function return value.
10391 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10392 Return result of the final locking.
10393 * version.c (__nptl_main): Work around problems with the strange
10394 INTERNAL_SYSCALL macro on ppc32.
10395 * init.c (__pthread_initialize_minimal_internal): Unblock
10396 SIGCANCEL in case the parent blocked it.
10397 Reported by Paul Mackerras <paulus@samba.org>.
10399 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10400 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10401 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10403 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10405 * sysdeps/pthread/pthread_cond_timedwait.c
10406 (__pthread_cond_timedwait): Unlock and fail if
10407 __pthread_mutex_unlock_internal failed.
10409 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10410 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10412 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10413 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10414 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10415 ALLOCATE_STACK): New macros.
10416 (TLS_TPADJ): New macro.
10417 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10418 (allocate_stack): Handle TLS_DTV_AT_TP and
10419 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10420 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10421 Don't set PD->self.
10422 * init.c [__ia64__] (__NR_set_tid_address): Define.
10424 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10425 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10426 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10427 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10428 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10429 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10430 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10431 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10432 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10433 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10434 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10435 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10436 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10437 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10438 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10439 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10440 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10441 * sysdeps/ia64/bits/atomic.h: New file.
10442 * sysdeps/ia64/Makefile: New file.
10443 * sysdeps/ia64/pthread_spin_init.c: New file.
10444 * sysdeps/ia64/pthread_spin_lock.c: New file.
10445 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10446 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10447 * sysdeps/ia64/pthreaddef.h: New file.
10448 * sysdeps/ia64/tcb-offsets.sym: New file.
10449 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10450 * sysdeps/ia64/tls.h: New file.
10452 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10453 to syscall instead of no arguments.
10455 2003-03-10 Ulrich Drepper <drepper@redhat.com>
10457 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10458 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10459 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10460 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10462 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10465 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10467 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10468 lowlevelbarrier.sym.
10469 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10470 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10471 Include lowlevelbarrier.h and don't define offsets locally.
10472 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10474 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10475 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10476 (__lll_mutex_timedlock_wait): Likewise.
10477 (lll_mutex_lock): Adjust asm for that.
10478 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10479 (lll_lock): Adjust asm for operand order change.
10480 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10481 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10483 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10484 Reverse order of parameters.
10485 (__lll_timedwait_tid): Remove regparms attribute.
10486 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10487 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10489 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10490 (__lll_timedwait_tid): Remove one unnecessary instruction.
10492 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10493 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10494 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10497 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10498 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10500 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10503 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10504 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10506 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10507 define LOCK here (if UP is not defined). The actual code is in
10510 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10511 LOCK is already defined. Don't define lll_unlock_wake_cb and
10512 __lll_timedwait_tid for libc.so.
10513 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10514 define LOCK here (if UP is not defined). The actual code is in
10517 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10518 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10519 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10520 instead of lowlevelsem.h.
10521 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10522 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10523 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10525 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10526 lowlevelrwlock.sym.
10527 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10528 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10529 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10531 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10533 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10534 last changed. D'oh.
10536 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10538 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10539 of __libc_locking_needed.
10540 (lll_trylock): Initialize %eax to zero.
10542 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10543 pthread_cond_t definition.
10545 2003-03-10 Roland McGrath <roland@redhat.com>
10547 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10548 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10549 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10550 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10551 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10553 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10554 Instead of setting PD->multiple_threads, set globals
10555 __pthread_multiple_threads and __libc_multiple_threads.
10556 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10557 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10558 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10560 * descr.h (struct pthread): Conditionalize first member on
10561 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10562 containing an anonymous tcbhead_t. Move `list' member out.
10563 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10564 * allocatestack.c: Remove use of `header.data.' prefix.
10565 * pthread_create.c: Likewise.
10566 * init.c (__pthread_initialize_minimal_internal): Likewise.
10567 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10568 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10569 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10570 * sysdeps/x86_64/tls.h: Likewise.
10571 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10572 (SINGLE_THREAD_P): Likewise.
10573 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10574 (SINGLE_THREAD_P): Likewise.
10575 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10576 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10578 2003-03-09 Ulrich Drepper <drepper@redhat.com>
10580 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10582 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10583 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10585 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10586 leftovers from the ia32 code.
10588 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10590 (clear_once_control): Don't load %esi.
10592 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10595 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10597 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10598 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10600 * Makefile (tests): Add tst-cond10.
10601 * tst-cond10.c: New file.
10603 2003-03-08 Ulrich Drepper <drepper@redhat.com>
10605 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10606 * tst-signal3.c (do_test): Likewise.
10607 * tst-sem5.c (do_test): Likewise.
10608 * tst-kill6.c (do_test): Likewise.
10609 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10611 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10613 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10614 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10615 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10616 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10617 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10618 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10619 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10621 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10623 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10624 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10625 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10626 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10627 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10628 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10629 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10630 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10632 * allocatestack.c (allocate_stack): If mprotect() fails free the
10635 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10637 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10639 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10640 lll_wake_tid. This was used only to work around kernel limits in
10642 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10643 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10644 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10645 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10647 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10648 (__pthread_initialize_minimal_internal): Change initialization of
10649 __static_tls_align_m1 appropriately.
10650 * pthreadP.h (__static_tls_align_m1): Renamed from
10651 __static_tls_align.
10652 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10653 instead of __static_tls_align-1.
10655 2003-03-04 Ulrich Drepper <drepper@redhat.com>
10657 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10659 * pthread_create.c: Define __pthread_keys using nocommon
10660 attribute, not by placing it explicitly in bss.
10661 Remove DEFINE_DEALLOC definition. Not needed anymore.
10663 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10664 Use it in mmap call to allocate stacks.
10666 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10668 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10669 result of the thread function.
10671 2003-03-03 Ulrich Drepper <drepper@redhat.com>
10673 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10674 version is just fine.
10676 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10677 (__pthread_child_handler): Renamed from pthread_child_handler,
10678 exported, and marked hidden. Change all users.
10679 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10680 free __pthread_child_handler from child list.
10682 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10684 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10686 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10687 Fix handling of cancellation and failing pthread_mutex_unlock call.
10688 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10689 (__pthread_cond_wait): Likewise.
10691 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10692 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10693 lll_futex_timed_wait call.
10694 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10695 (pthread_rwlock_timedwrlock): Likewise.
10697 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10698 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10699 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10701 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10702 check of lll_futex_wake return value.
10704 2003-03-03 Roland McGrath <roland@redhat.com>
10706 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10708 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10709 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10710 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10712 2003-03-02 Ulrich Drepper <drepper@redhat.com>
10714 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10715 error for CPU clocks.
10717 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10718 _POSIX_MONOTONIC_CLOCK.
10719 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10721 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10724 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10726 * descr.h (struct pthread): Move cleanup field to the front.
10728 2003-03-01 Roland McGrath <roland@redhat.com>
10730 * sem_open.c (sem_open): Braino fix.
10732 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10734 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10735 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10736 __pthread_cleanup_pop functionality.
10737 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10739 * descr.h (struct pthread): Move tid field to the front now that
10742 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10743 (__lll_mutex_timedlock_wait): Remove.
10744 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10745 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10746 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10747 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10748 (lll_unlock_wake_cb): Don't save and restore %esi.
10749 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10751 (__lll_timedwait_tid): Add alignment.
10752 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10753 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10755 (__lll_timedwait_tid): Removed.
10756 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10757 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10758 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10759 (pthread_barrier_wait): Don't save, load, and restore %esi for
10761 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10762 (__pthread_cond_signal): Don't save, load, and restore %esi.
10763 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10764 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10765 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10766 Don't save, load, and restore %esi.
10768 2003-02-27 Ulrich Drepper <drepper@redhat.com>
10770 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10771 Release lock before waking up the waiters.
10773 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10775 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10776 (reader_thread): Likewise.
10778 * sysdeps/pthread/pthread_rwlock_unlock.c
10779 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10780 to wake up readers if there are none.
10782 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10783 Release internal lock before wake threads.
10785 2003-02-26 Ulrich Drepper <drepper@redhat.com>
10787 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10788 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10790 * tst-rwlock9.c: Likewise.
10791 * tst-rwlock10.c: New file.
10792 * tst-rwlock11.c: New file.
10794 * Makefile (tests): Add tst-dlsym1.
10795 * tst-dlsym1.c: New file.
10797 * init.c (__pthread_initialize_minimal_internal): Set
10798 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10799 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10801 2003-02-24 Ulrich Drepper <drepper@redhat.com>
10803 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10805 * tst-cond2.c: Fix sychronization with child.
10807 * tst-rwlock8.c (reader_thread): Remove unused variable.
10809 * Makefile: Add rules to build and run tst-tls3.
10810 * tst-tls3.c: New file.
10811 * tst-tls3mod.c: New file.
10813 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10814 * tst-rwlock8.c: New file.
10815 * tst-rwlock9.c: New file.
10816 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10817 complete broken rwlock implementation.
10818 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10820 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10822 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10823 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10824 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10825 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10826 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10827 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10828 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10830 2003-02-23 Roland McGrath <roland@redhat.com>
10832 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10834 2003-02-23 Ulrich Drepper <drepper@redhat.com>
10836 * Makefile (tests): Add tst-context1.
10837 * tst-context1.c: New file.
10839 * Makefile (tests): Add tst-tls1 and tst-tls2.
10840 * tst-tls1.c: New file.
10841 * tst-tls2.c: New file.
10843 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10844 for failed cmpxchg.
10846 * pthread_create.c (start_thread): Set EXITING_BIT early.
10848 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10849 (THREAD_GETMEM_NC): Likewise.
10851 2003-02-22 Ulrich Drepper <drepper@redhat.com>
10853 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10854 off 3 more bytes by using offset-less instructions when possible.
10856 * Makefile: Add dependency for $(objpfx)version.d.
10858 * eintr.c (eintr_source): Add unnecessary return but the compiler
10861 * tst-kill3.c: Include <unistd.h>.
10863 2003-02-21 Roland McGrath <roland@redhat.com>
10865 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10867 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10869 * Makefile (tests): Add tst-eintr1.
10870 (distribute): Add eintr.c.
10871 * tst-eintr1.c: New file.
10872 * eintr.c: New file.
10874 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10876 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10877 Disallow sending SIGCANCEL.
10879 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
10880 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10881 * tst-kill1.c: New file.
10882 * tst-kill2.c: New file.
10883 * tst-kill3.c: New file.
10884 * tst-kill5.c: New file.
10885 * tst-kill6.c: New file.
10886 * tst-basic7.c: Renamed to...
10887 * tst-kill4.c: ...this.
10889 2003-02-21 Roland McGrath <roland@redhat.com>
10891 * Makefile (install-lib-ldscripts): New variable.
10893 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10895 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10896 * pthread_cancel.c: Use INVALID_TD_P.
10897 * pthread_detach.c: Likewise.
10898 * pthread_getschedparam.c: Likewise.
10899 * pthread_setschedparam.c: Likewise.
10900 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10901 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10902 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10903 * pthread_timedjoin.c: Likewise.
10905 * tst-basic7.c: Include <signal.h>.
10907 * pthread_join.c (pthread_join): Limited checking for invalid
10909 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10911 2003-02-20 Ulrich Drepper <drepper@redhat.com>
10913 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10914 beginning of the loop. Clear the entire first block of TSD.
10915 * Makefile (tests): Add tst-key4.
10916 * tst-key4.c: New file.
10918 2003-02-18 Ulrich Drepper <drepper@redhat.com>
10920 * Makefile (tests): Add tst-basic7.
10921 * tst-basic7.c: New file.
10923 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10924 Add some more __builtin_expect.
10926 * pthreadP.h: Define dummy version of DEBUGGING_P.
10928 2003-02-17 Ulrich Drepper <drepper@redhat.com>
10930 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10931 _POSIX_THREAD_PRIORITY_SCHEDULING.
10932 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10933 _XOPEN_REALTIME_THREADS.
10934 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10936 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10937 kernel returns EINVAL for PID <= 0, work around it.
10939 * Makefile (tests): Add tst-signal5.
10940 * tst-signal5.c: New file.
10942 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10943 and LOGIN_NAME_MAX.
10945 * tst-cancel1.c (tf): Block all signals.
10947 * Makefile (tests): Add tst-basic6.
10948 * tst-basic6.c: New file.
10950 * tst-basic1.c: Add test for process ID.
10952 * Makefile (tests): Add tst-cancel10.
10953 * tst-cancel10.c: New file.
10955 * Makefile (tests): Add tst-signal4.
10956 * tst-signal4.c: New file.
10958 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10959 __sigismember instead of sigismember. Add __builtin_expect.
10961 2003-02-16 Ulrich Drepper <drepper@redhat.com>
10963 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10964 pthread_setcancelstate, and pthread_rwlock_setpshared.
10966 * tst-cancel7.c (do_test): Make sure the pid file exists before
10967 canceling the thread.
10969 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10970 pthread_rwlock_timedrdlock tests.
10971 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10972 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10973 Check for invalid tv_nsec field.
10974 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10977 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10978 recursive mutex of overflow.
10980 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10982 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10983 going into an endless loop.
10984 * Makefile (tests): Add tst-cancel9.
10985 * tst-cancel9.c: New file.
10987 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10989 2003-02-15 Ulrich Drepper <drepper@redhat.com>
10991 * tst-mutex5.c (do_test): Add more timedlock tests.
10993 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10994 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10996 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10997 use INLINE_SYSCALL. Error number is returned, not -1.
10999 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
11000 and __deallocate_stack with internal_function.
11001 * pthread_create.c: Adjust definitions appropriately.
11002 * allocatestack.c: Likewise.
11004 * pthread_join.c: Add one more __builtin_expect.
11005 * pthread_timedjoin.c: Likewise.
11007 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
11008 not data of sequence number does not match.
11009 Add one __builtin_expect.
11011 * Makefile (tests): Add tst-clock1.
11012 * tst-clock1.c: New file.
11014 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
11015 negative arguments.
11016 * Makefile (tests): Add tst-basic5.
11017 * tst-basic5.c: New file.
11019 2003-02-14 Ulrich Drepper <drepper@redhat.com>
11021 * Makefile (tests): Add tst-basic4.
11022 * tst-basic4.c: New file.
11024 * pthreadP.h: Add declaraction for __nptl_nthreads.
11025 * pthread_create.c: Define __nptl_nthreads
11026 (start_thread): Increment __nptl_nthreads at beginning. Decrement
11027 after thread is done. If then zero, call exit(0).
11028 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11029 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
11030 * init.c (pthread_functions): Initialize ptr_nthreads.
11031 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
11032 (__reclaim_stacks): Decrement __nptl_nthreads.
11033 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
11035 * Makefile (tests): Add tst-basic3.
11036 * tst-basic3.c: New file.
11038 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
11039 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
11040 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
11041 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
11042 if asynchronous canceling is enabled.
11043 * pthread_join.c (pthread_join): When recognizing circular joins,
11044 take into account the other thread might be already canceled.
11045 * Makefile (tests): Add tst-join5.
11046 * tst-join5.c: New file.
11048 * Makefile (tests): Add tst-join4.
11049 * tst-join4.c: New file.
11051 2003-02-13 Ulrich Drepper <drepper@redhat.com>
11053 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
11055 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
11057 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
11058 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
11059 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
11061 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
11063 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
11064 error if lll_futex_wake failed.
11066 2003-02-13 Ulrich Drepper <drepper@redhat.com>
11068 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
11069 handling of cancellation and failung pthread_mutex_unlock call.
11070 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11071 * Makefile (tests): Add tst-cond8 and tst-cond9.
11072 * tst-cond8.c: New file.
11073 * tst-cond9.c: New file.
11075 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
11077 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
11078 non-standard initializers with __USE_GNU.
11080 * Makefile (tests): Add tst-cleanup3.
11081 * tst-cleanup3.c: New file.
11083 2003-02-12 Ulrich Drepper <drepper@redhat.com>
11085 * Makefile (tests): Add tst-attr1 and tst-attr2.
11086 * tst-attr1.c: New file.
11087 * tst-attr2.c: New file.
11089 * Makefile: Add rules to build and run tst-atfork2 test.
11090 * tst-atfork2.c: New file.
11091 * tst-atfork2mod.c: New file.
11093 * sysdeps/unix/sysv/linux/unregister-atfork.c
11094 (__unregister_atfork): Free the memory allocated for the handlers
11095 after removing them from the lists.
11097 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
11100 * tst-atfork1.c (do_test): Wait for the child we forked.
11101 Report error in child.
11103 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
11105 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
11107 2003-02-10 Ulrich Drepper <drepper@redhat.com>
11109 * Makefile (tests): Add tst-cancel8.
11110 * tst-cancel8.c: New file.
11112 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
11113 clearing of control variable.
11114 * Makefile (tests): Add tst-once3 and tst-once4.
11115 * tst-once3.c: New file.
11116 * tst-once4.c: New file.
11118 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
11120 * sysdeps/sh/Makefile: New file.
11121 * sysdeps/sh/bits/atomic.h: New file.
11122 * sysdeps/sh/pthread_spin_init.c: New file.
11123 * sysdeps/sh/pthread_spin_lock.c: New file.
11124 * sysdeps/sh/pthread_spin_trylock.S: New file.
11125 * sysdeps/sh/pthread_spin_unlock.S: New file.
11126 * sysdeps/sh/pthreaddef.h: New file.
11127 * sysdeps/sh/tcb-offsets.sym: New file.
11128 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
11129 * sysdeps/sh/tls.h: New file.
11130 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
11131 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
11132 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
11133 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
11134 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
11135 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
11136 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
11137 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
11138 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
11139 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
11140 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
11141 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
11142 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
11143 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
11144 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
11145 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
11146 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
11147 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
11148 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
11149 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
11150 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
11151 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
11152 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
11153 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
11154 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
11155 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
11156 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
11157 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
11158 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
11159 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
11161 2003-02-08 Ulrich Drepper <drepper@redhat.com>
11163 * tst-cond2.c: Rearrange code to not rely on behavior undefined
11164 according to POSIX.
11166 * tst-basic2.c (do_test): Lock mutex before creating the thread.
11168 2003-02-07 Ulrich Drepper <drepper@redhat.com>
11170 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
11171 (TLS_GET_FS): New #define.
11172 (TLS_SET_FS): New #define.
11173 Correct value of __NR_set_thread_area.
11175 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
11177 2003-02-06 Ulrich Drepper <drepper@redhat.com>
11179 * Makefile (tests): Add tst-popen1.
11180 * tst-popen1.c: New file.
11182 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
11183 but inactive generalization.
11184 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11185 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11186 Minor optimization, remove one instruction.
11187 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11189 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
11191 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11193 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
11195 * init.c (__NR_set_tid_address): Add #ifdef for s390.
11196 * sysdeps/pthread/pthread_barrier_wait.c: New file.
11197 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11198 * sysdeps/pthread/pthread_cond_signal.c: New file.
11199 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11200 * sysdeps/pthread/pthread_cond_wait.c: New file.
11201 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11202 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11203 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11204 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11205 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11206 * sysdeps/s390/Makefile: New file.
11207 * sysdeps/s390/bits/atomic.h: New file.
11208 * sysdeps/s390/pthread_spin_init.c: New file.
11209 * sysdeps/s390/pthread_spin_lock.c: New file.
11210 * sysdeps/s390/pthread_spin_trylock.c: New file.
11211 * sysdeps/s390/pthread_spin_unlock.c: New file.
11212 * sysdeps/s390/pthreaddef.h: New file.
11213 * sysdeps/s390/tcb-offsets.sym: New file.
11214 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11215 * sysdeps/s390/tls.h: New file.
11216 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11217 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11218 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11219 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11220 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11221 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11222 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11223 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11224 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11225 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11226 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11227 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11228 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11229 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11230 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11231 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11232 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11233 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11234 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11235 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11236 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11237 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11238 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11240 2003-02-04 Ulrich Drepper <drepper@redhat.com>
11242 * atomic.h: Add a couple more default implementations.
11243 (atomic_compare_and_exchange_acq): Use
11244 __arch_compare_and_exchange_32_acq in return value definition. It
11246 (atomic_bit_set): Renamed from atomic_set_bit.
11247 Add missing atomic_ prefixes.
11249 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11250 thread library is available, use correct value to mark initialized
11253 2003-02-03 Ulrich Drepper <drepper@redhat.com>
11255 * allocatestack.c (allocate_stack): Use __getpagesize instead of
11256 __sysconf to determine pagesize.
11258 * pthread_create.c: Include <atomic.h>.
11259 * allocatestack.c (allocate_stack): Implement coloring of the
11260 allocated stack memory. Rename pagesize to pagesize_m1. It's the
11261 size minus one. Adjust users.
11262 * sysdeps/i386/i686/Makefile: New file.
11264 2003-02-02 Ulrich Drepper <drepper@redhat.com>
11266 * allocatestack.c: Improve comment throughout the file.
11268 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11269 (__lll_lock_wait): Add branch prediction.
11270 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11271 (__lll_lock_wait): Likewise.
11272 (lll_unlock_wake_cb): Removed.
11274 2003-01-31 Ulrich Drepper <drepper@redhat.com>
11276 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11277 _POSIX_THREAD_PRIORITY_SCHEDULING.
11279 2003-01-30 Jakub Jelinek <jakub@redhat.com>
11281 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11282 Fix return type of ptr___pthread_getspecific.
11284 2003-01-29 Ulrich Drepper <drepper@redhat.com>
11286 * Makefile (tests): Add tst-umask1.
11287 (tst-umask1-ARGS): Define.
11288 * tst-umask1.c: New file.
11290 2003-01-28 Ulrich Drepper <drepper@redhat.com>
11292 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
11293 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11294 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11295 pthread_rwlock_unlock.
11296 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11297 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11298 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11299 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11300 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11302 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11303 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11305 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11306 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11307 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11309 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11310 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11312 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11313 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11314 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11316 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11317 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11319 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11321 * Makefile (libpthread-routines): Remove lowlevelcond and
11322 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11323 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11324 and pthread_cond_broadcast.
11325 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11326 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11327 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11328 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11329 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11330 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11331 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11332 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11333 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11334 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11335 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11336 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11337 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11338 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11339 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11340 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11341 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11342 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11343 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11344 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11345 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11346 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11347 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11348 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11349 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11350 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11351 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11352 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11353 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11354 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11355 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11357 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11358 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11359 of the code is moved to ...
11360 * sysdeps/pthread/createthread.c: ...here. New file.
11362 2003-01-27 Ulrich Drepper <drepper@redhat.com>
11364 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11365 (__new_sem_post): Clear %eax before returning.
11366 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11368 * Makefile (tests): Add tst-cleanup2.
11369 * tst-cleanup2.c: New file.
11371 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11372 Interpret first parameter correctly.
11374 2003-01-17 Ulrich Drepper <drepper@redhat.com>
11376 * Makefile (headers): Add bits/semaphore.h.
11378 2003-01-16 Jakub Jelinek <jakub@redhat.com>
11380 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11383 2003-01-14 Ulrich Drepper <drepper@redhat.com>
11385 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11386 must be used and mapping failed.
11387 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11389 * Makefile (CFLAGS-pthread_self.os): Define this, not
11390 CFLAGS-pthread_self.c.
11392 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11394 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11395 lll_unlock_wake_cb.
11397 * Makefile (libpthread-routines): Add version. Add rules to build
11398 version.os and banner.h.
11399 * version.c: New file.
11401 2003-01-13 Jakub Jelinek <jakub@redhat.com>
11403 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11404 the alias unconditional.
11405 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11407 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11409 * Makefile (CFLAGS-pthread_self.c): New definition.
11411 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11413 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11414 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11415 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11416 * init.c (__pthread_initialize_minimal_internal): Likewise.
11418 2003-01-07 Jakub Jelinek <jakub@redhat.com>
11420 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11422 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11423 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11424 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11425 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11426 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11427 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11429 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11431 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11432 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11433 * tst-cancel-wrappers.sh: Remove all exceptions.
11435 2003-01-05 Ulrich Drepper <drepper@redhat.com>
11437 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11438 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11440 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11441 Use __libc_pthread_functions array if SHARED.
11443 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11444 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11446 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11447 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11448 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11449 __libc_ptf_call instead of __libc_maybe_call.
11450 (PTF): New #define.
11451 (__libc_cleanup_region_start): Wrap function name with PTF call.
11452 (__libc_cleanup_region_end): Likewise.
11453 (__libc_cleanup_end): Likewise.
11455 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11456 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11457 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11458 * pthreadP.h: Add prototypes.
11460 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11461 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11462 __pthread_rwlock_unlock aliases.
11463 * pthreadP.h: Add prototypes for new aliases.
11465 * pthreadP.h (struct pthead_functions): Moved to...
11466 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11467 * init.c (pthread_functions): Add initializers for new elements.
11469 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11470 __pthread_cleanup_pop_restore aliases.
11471 * pthreadP.h: Add prototypes.
11473 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11474 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11475 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11476 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11477 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11478 * pthreadP.h: Adjust prototypes and callers.
11480 2003-01-04 Ulrich Drepper <drepper@redhat.com>
11482 * Makefile (tests): Add tst-cancel7.
11483 (tst-cancel7-ARGS): New variable.
11484 * tst-cancel7.c: New file.
11486 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11487 around gcc defficiencies.
11488 * old_pthread_cond_signal.c: Likewise.
11489 * old_pthread_cond_timedwait.c: Likewise.
11490 * old_pthread_cond_wait.c: Likewise.
11492 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11494 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11496 * Makefile (tests): Add tst-cond7.
11497 * tst-cond7.c: New file.
11499 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11500 (condvar_cleanup): Get condvar address from the right place.
11502 * atomic.h: Correct definitions of atomic_full_barrier,
11503 atomic_read_barrier, atomic_write_barrier.
11505 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11507 * old_pthread_cond_signal.c: Likewise.
11508 * old_pthread_cond_timedwait.c: Likewise.
11509 * old_pthread_cond_wait.c: Likewise.
11511 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11513 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11515 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11517 * pthreadP.h (pthread_cond_2_0_t): New type.
11518 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11519 Use new type for the 2.0 condvar function prototypes.
11520 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11521 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11523 * old_pthread_cond_destroy.c: Likewise.
11524 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11525 * old_pthread_cond_signal.c: Likewise.
11526 * old_pthread_cond_timedwait.c: Likewise.
11527 * old_pthread_cond_wait.c: Likewise.
11529 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11530 (__pthread_cond_wait): Don't save cancellation mode and seq value
11533 * herrno.c (__h_errno_location): Don't define as weak.
11535 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11537 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11538 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11539 and pthread_cond_wait.
11540 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11542 (__pthread_cond_broadcast_2_0): ... this.
11543 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11545 (__pthread_cond_destroy_2_0): ... this.
11546 * old_pthread_cond_init.c (__old_pthread_cond_init):
11548 (__pthread_cond_init_2_0): ... this.
11549 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11551 (__pthread_cond_signal_2_0): ... this.
11552 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11554 (__pthread_cond_wait_2_0): ... this.
11555 * pthread_cond_destroy.c: Include shlib-compat.h.
11556 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11557 * pthread_cond_init.c: Include shlib-compat.h.
11558 (pthread_cond_init): Change strong_alias into versioned_symbol.
11559 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11560 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11562 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11563 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11564 __pthread_cond_wait_2_0): New prototypes.
11565 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11566 __old_pthread_cond_init, __old_pthread_cond_signal,
11567 __old_pthread_cond_wait): Removed.
11568 * init.c: Include shlib-compat.h.
11569 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11570 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11571 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11572 ptr___pthread_cond_*_2_0 fields.
11573 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11574 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11576 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11577 LIBC_SIGACTION was not yet defined.
11578 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11579 [!defined LIBC_SIGACTION] (__sigaction): New function and
11581 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11582 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11584 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11586 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11588 2003-01-02 Ulrich Drepper <drepper@redhat.com>
11590 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11591 New, larger type definition.
11592 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11594 * Versions [libpthread]: Add definitions for new pthread_cond_*
11595 interfaces for version GLIBC_2.3.2.
11596 * pthread_cond_init.c: Update initialization for new type definition.
11597 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11598 pthread_cond_timedwait, pthread_cond_signal, and
11599 pthread_cond_broadcast. Add old_pthread_cond_init,
11600 old_pthread_cond_destroy, old_pthread_cond_wait,
11601 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11602 old_pthread_cond_broadcast.
11603 * old_pthread_cond_broadcast.c: New file.
11604 * old_pthread_cond_destroy.c: New file.
11605 * old_pthread_cond_init.c: New file.
11606 * old_pthread_cond_signal.c: New file.
11607 * old_pthread_cond_timedwait.c: New file.
11608 * old_pthread_cond_wait.c: New file.
11609 * pthreadP.h: Add prototypes for the compatibility interfaces.
11611 * pthread_cond_destroy.c: Don't include <errno.h>.
11613 2003-01-01 Ulrich Drepper <drepper@redhat.com>
11615 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11616 unnecessary zero offset when addressing MUTEX.
11618 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11620 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11622 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11623 for __register_atfork.
11625 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11627 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11628 instead of ASSEMBLER test macro.
11630 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11631 __libc_current_sigrtmax): Add libc_hidden_def.
11633 * sysdeps/pthread/list.h: Remove assert.h include.
11635 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11637 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11638 __pthread_initialize_minimal_internal not
11639 __pthread_initialize_minimal.
11641 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11643 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11644 __pthread_initialize_minimal as hidden.
11646 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11649 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11651 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11652 $(common-objpfx)format.lds, include that into the output script.
11654 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11656 2002-12-28 Andreas Jaeger <aj@suse.de>
11658 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11659 nsec resolution changes.
11660 (xstat64_conv): Likewise.
11661 (xstat32_conv): Likewise.
11662 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11663 struct kernel_stat.
11664 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11665 structs stat and stat64.
11666 * time/time.h (__timespec_defined): Define for __USE_MISC.
11667 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11669 2002-12-30 Jakub Jelinek <jakub@redhat.com>
11671 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11673 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11674 (pthread_exit): Use strong_alias to avoid warnings.
11675 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11676 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11677 ptr___pthread_attr_init_2_*.
11678 * init.c (pthread_functions): Adjust.
11680 2002-12-29 Ulrich Drepper <drepper@redhat.com>
11682 * forward.c: Make all functions available by default again. It
11683 caused too much trouble.
11685 * pt-siglongjmp.c: Removed.
11687 2002-12-28 Jakub Jelinek <jakub@redhat.com>
11689 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11690 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11691 * sysdeps/i386/Makefile: New file.
11692 * sysdeps/i386/tcb-offsets.sym: New file.
11693 * sysdeps/pthread/tcb-offsets.h: New file.
11694 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11695 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11697 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11698 __register_atfork...
11699 (GLIBC_2.3.2): ...here.
11701 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11703 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11704 pthread_attr_setstackaddr with __attribute_deprecated__.
11706 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11708 * pt-system.c (system): Remove cancellation handling.
11709 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11710 cancellation routines.
11712 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11714 * descr.h: Include <dl-sysdep.h>.
11715 (struct pthread): Move header.data.list to the back of the struct.
11716 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11717 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11718 (SYSINFO_OFFSEET): Likewise.
11720 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11722 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11724 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11725 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11726 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11727 (USE_DL_SYSINFO): Undef.
11729 2002-12-22 Jakub Jelinek <jakub@redhat.com>
11731 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11732 $(common-objpfx)libc.so.
11733 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11734 it is bigger than pipe buffer size even on arches with bigger
11736 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11738 2002-12-25 Ulrich Drepper <drepper@redhat.com>
11740 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11741 correct errno access for case that USE___THREAD is not defined.
11743 2002-12-24 Ulrich Drepper <drepper@redhat.com>
11745 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11746 Patch by Marijn Ros <marijn@mad.scientist.com>.
11748 2002-12-22 Roland McGrath <roland@redhat.com>
11750 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11752 2002-12-20 Ulrich Drepper <drepper@redhat.com>
11754 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11756 2002-12-19 Ulrich Drepper <drepper@redhat.com>
11758 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11759 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11760 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11762 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11764 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11765 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11766 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11767 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11768 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11769 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11770 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11771 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11773 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11775 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11777 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11779 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11781 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11782 that sysinfo is properly initialized.
11783 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11784 to 1 only for ld.so.
11786 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11787 RTLD_CORRECT_DYNAMIC_WEAK.
11789 2002-12-19 Jakub Jelinek <jakub@redhat.com>
11791 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11792 Use return 0 as 6th argument to FORWARD4.
11793 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11795 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11797 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11798 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11799 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11800 (INIT_SYSINFO): New #define.
11801 (TLS_TP_INIT): Use INIT_SYSINFO.
11802 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11803 At test to make sure SYSINFO_OFFSET value is correct.
11804 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11806 2002-12-18 Jakub Jelinek <jakub@redhat.com>
11808 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11809 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11810 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11811 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11812 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11813 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11814 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11816 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11818 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11819 macro instead of using int $0x80 directly.
11821 * sysdeps/pthread/bits/stdio-lock.h: New file.
11822 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11823 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11824 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11825 * Makefile (routines): Add libc-lowlevelmutex.
11827 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11828 __i686.get_pc_thunk.dx.
11830 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11832 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11833 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11834 ($(objpfx)tst-cancel-wrappers.out): New rule.
11835 * tst-cancel-wrappers.sh: New test.
11836 * tst-locale1.c: Include signal.h.
11837 (uselocale): Test static linking of __libc_current_sigrt*.
11839 2002-12-17 Ulrich Drepper <drepper@redhat.com>
11841 * Makefile (tests): Add tst-cancel6.
11842 * tst-cancel6.c: New file
11844 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11846 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11847 Define meaningfully for assembler as well.
11848 * pthreadP.h (struct pthread_functions): Remove
11849 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11850 and ptr_pthread_attr_init_2_1 fields.
11851 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11852 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11853 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11854 (FORWARD3): Define using FORWARD4.
11855 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11857 * pt-system.c: Remove duplicate stdlib.h include.
11859 2002-12-16 Ulrich Drepper <drepper@redhat.com>
11861 * sem_init.c: Define sem_init@GLIBC_2.0.
11862 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11863 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11865 * flockfile.c: Moved to...
11866 * sysdeps/pthread/flockfile.c: ...here. New file.
11867 * funlockfile.c: Moved to...
11868 * sysdeps/pthread/funlockfile.c: ...here. New file.
11869 * ftrylockfile.c: Moved to...
11870 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11872 2002-12-16 Jakub Jelinek <jakub@redhat.com>
11874 * libc-cancellation.c: Guard both function with
11875 #if !defined NOT_IN_libc.
11876 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11877 automatically provided pthread wrappers.
11878 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11879 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11881 * pt-open.c: Removed.
11882 * pt-fcntl.c: Removed.
11883 * pt-fsync.c: Removed.
11884 * pt-lseek.c: Removed.
11885 * pt-msgrcv.c: Removed.
11886 * pt-msgsnd.c: Removed.
11887 * pt-msync.c: Removed.
11888 * pt-nanosleep.c: Removed.
11889 * pt-open64.c: Removed.
11890 * pt-pause.c: Removed.
11891 * pt-pread.c: Removed.
11892 * pt-pread64.c: Removed.
11893 * pt-pwrite.c: Removed.
11894 * pt-pwrite64.c: Removed.
11895 * pt-read.c: Removed.
11896 * pt-recv.c: Removed.
11897 * pt-recvfrom.c: Removed.
11898 * pt-recvmsg.c: Removed.
11899 * pt-send.c: Removed.
11900 * pt-sendto.c: Removed.
11901 * pt-sigtimedwait.c: Removed.
11902 * pt-sigwait.c: Removed.
11903 * pt-wait.c: Removed.
11904 * pt-waitpid.c: Removed.
11905 * pt-write.c: Removed.
11906 * pt-accept.c: Removed.
11907 * pt-close.c: Removed.
11908 * pt-connect.c: Removed.
11909 * pt-lseek64.c: Removed.
11910 * pt-sendmsg.c: Removed.
11911 * pt-tcdrain.c: Removed.
11913 2002-12-15 Ulrich Drepper <drepper@redhat.com>
11915 * init.c (__pthread_initialize_minimal_internal): Renamed from
11916 __pthread_initialize_minimal. Make old name an alias. This
11917 converts a normal relocation into a relative relocation.
11919 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11921 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11922 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11923 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11924 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11925 pt-sigwaitinfo, pt-waitid, and pt-writev.
11926 * pt-creat.c: Removed.
11927 * pt-poll.c: Removed.
11928 * pt-pselect.c: Removed.
11929 * pt-readv.c: Removed.
11930 * pt-select.c: Removed.
11931 * pt-sigpause.c: Removed.
11932 * pt-sigsuspend.c: Removed.
11933 * pt-sigwaitinfo.c: Removed.
11934 * pt-waitid.c: Removed.
11935 * pt-writev.c: Removed.
11937 * init.c (pthread_functions): New variable.
11938 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11939 (or NULL) to __libc_pthread_init.
11940 * forward.c: Rewrite to use __libc:pthread_functions array to get
11941 function addresses.
11942 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11944 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11945 Take new parameter. Copy content of variable pointed to by it
11946 to __libc_pthread_init.
11948 * pthreadP.h (struct pthread_functions): New type.
11949 (__libc_pthread_init): Declare.
11951 * pthread_attr_destroy.c: Add namespace protected alias.
11952 * pthread_attr_getdetachstate.c: Likewise.
11953 * pthread_attr_getinheritsched.c: Likewise.
11954 * pthread_attr_getschedparam.c: Likewise.
11955 * pthread_attr_getschedpolicy.c: Likewise.
11956 * pthread_attr_getscope.c: Likewise.
11957 * pthread_attr_setdetachstate.c: Likewise.
11958 * pthread_attr_setinheritsched.c: Likewise.
11959 * pthread_attr_setschedparam.c: Likewise.
11960 * pthread_attr_setschedpolicy.c: Likewise.
11961 * pthread_attr_setscope.c: Likewise.
11962 * pthread_cond_broadcast.c: Likewise.
11963 * pthread_cond_destroy.c: Likewise.
11964 * pthread_cond_init.c: Likewise.
11965 * pthread_cond_signal.c: Likewise.
11966 * pthread_cond_wait.c: Likewise.
11967 * pthread_condattr_destroy.c: Likewise.
11968 * pthread_condattr_init.c: Likewise.
11969 * pthread_equal.c: Likewise.
11970 * pthread_exit.c: Likewise.
11971 * pthread_getschedparam.c: Likewise.
11972 * pthread_self.c: Likewise.
11973 * pthread_setcancelstate.c: Likewise.
11974 * pthread_setschedparam.c: Likewise.
11975 * pthread_mutex_destroy.c: Likewise.
11976 * pthread_mutex_init.c: Likewise.
11977 * pthreadP.h: Add prototypes for the aliases.
11979 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11980 multiple_threads member in correct TCB to 1.
11982 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11983 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11984 member of thread decriptor, otherwise return unconditionally 1.
11986 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11988 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11989 regular Linux version. Remove file.
11990 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11991 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11992 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11993 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11994 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11995 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11996 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11997 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11998 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11999 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
12000 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
12001 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
12002 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
12003 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
12004 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
12005 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
12006 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
12007 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
12008 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
12009 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
12010 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
12011 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
12012 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
12013 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
12014 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
12015 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
12016 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
12017 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
12018 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
12019 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
12021 2002-12-14 Jakub Jelinek <jakub@redhat.com>
12023 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
12024 * sysdeps/unix/sysv/linux/open.c: Removed.
12025 * sysdeps/unix/sysv/linux/fsync.c: Removed.
12026 * sysdeps/unix/sysv/linux/lseek.c: Removed.
12027 * sysdeps/unix/sysv/linux/msync.c: Removed.
12028 * sysdeps/unix/sysv/linux/read.c: Removed.
12029 * sysdeps/unix/sysv/linux/close.c: Removed.
12030 * sysdeps/unix/sysv/linux/creat.c: Removed.
12031 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
12032 * sysdeps/unix/sysv/linux/pause.c: Removed.
12033 * sysdeps/unix/sysv/linux/select.c: Removed.
12034 * sysdeps/unix/sysv/linux/write.c: Removed.
12036 2002-12-14 Ulrich Drepper <drepper@redhat.com>
12038 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
12039 element in TCB to see whether locking is needed.
12041 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
12042 MULTIPLE_THREADS_OFFSET value is correct.
12044 * sysdeps/unix/sysv/linux/close.c: New file.
12045 * sysdeps/unix/sysv/linux/connect.S: New file.
12046 * sysdeps/unix/sysv/linux/creat.c: New file.
12047 * sysdeps/unix/sysv/linux/fsync.c: New file.
12048 * sysdeps/unix/sysv/linux/llseek.c: New file.
12049 * sysdeps/unix/sysv/linux/lseek.c: New file.
12050 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
12051 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
12052 * sysdeps/unix/sysv/linux/msync.c: New file.
12053 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
12054 * sysdeps/unix/sysv/linux/open.c: New file.
12055 * sysdeps/unix/sysv/linux/open64.c: New file.
12056 * sysdeps/unix/sysv/linux/pause.c: New file.
12057 * sysdeps/unix/sysv/linux/poll.c: New file.
12058 * sysdeps/unix/sysv/linux/pread.c: New file.
12059 * sysdeps/unix/sysv/linux/pread64.c: New file.
12060 * sysdeps/unix/sysv/linux/pselect.c: New file.
12061 * sysdeps/unix/sysv/linux/pwrite.c: New file.
12062 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
12063 * sysdeps/unix/sysv/linux/readv.c: New file.
12064 * sysdeps/unix/sysv/linux/recv.S: New file.
12065 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
12066 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
12067 * sysdeps/unix/sysv/linux/select.c: New file.
12068 * sysdeps/unix/sysv/linux/send.S: New file.
12069 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
12070 * sysdeps/unix/sysv/linux/sendto.S: New file.
12071 * sysdeps/unix/sysv/linux/sigpause.c: New file.
12072 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
12073 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
12074 * sysdeps/unix/sysv/linux/sigwait.c: New file.
12075 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
12076 * sysdeps/unix/sysv/linux/system.c: New file.
12077 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
12078 * sysdeps/unix/sysv/linux/wait.c: New file.
12079 * sysdeps/unix/sysv/linux/waitid.c: New file.
12080 * sysdeps/unix/sysv/linux/waitpid.c: New file.
12081 * sysdeps/unix/sysv/linux/writev.c: New file.
12082 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
12084 * pt-readv.c: Fix comment.
12086 2002-12-14 Jakub Jelinek <jakub@redhat.com>
12088 * tst-cleanup1.c: Include stdlib.h.
12090 * tst-cancel5.c: New test.
12091 * Makefile (tests): Add tst-cancel5.
12092 (tst-cancel5): Link against libc.so libpthread.so in that order.
12094 2002-12-13 Ulrich Drepper <drepper@redhat.com>
12096 * forward.c (test_loaded): Prevent recursive calls.
12098 * Makefile (routines): Add libc-cancellation.
12099 * libc-cancellation.c: New file.
12100 * descr.h (struct pthread): Add multiple_threads field.
12101 * allocatestack.c (allocate_stack): Initialize multiple_header field of
12102 new thread descriptor to 1.
12103 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
12104 Initialize multiple_thread field after successful thread creation.
12105 * cancellation.c (__do_cancel): Move to pthreadP.h.
12106 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
12107 (__pthread_disable_asynccancel): Add internal_function attribute.
12108 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
12109 * pthread_setcancelstate.c: Likewise.
12110 * pthread_setcanceltype.c: Likewise.
12111 * pthread_exit.c: Likewise.
12112 * pthreadP.h (CANCELLATION_P): Likewise.
12113 (__do_cancel): Define as static inline.
12114 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
12115 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
12117 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
12118 fields. Define MULTIPLE_THREADS_OFFSET.
12119 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
12121 * sysdeps/unix/sysv/linux/accept.S: New file.
12122 * sysdeps/unix/sysv/linux/read.c: New file.
12123 * sysdeps/unix/sysv/linux/write.c: New file.
12124 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
12125 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
12126 initialization of __libc_locking_needed.
12127 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
12128 __libc_locking_needed, use multiple_threads field in TCB.
12129 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12131 2002-12-12 Ulrich Drepper <drepper@redhat.com>
12133 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
12135 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
12137 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
12138 access to __libc_locking_needed for PIC.
12140 2002-12-12 Jakub Jelinek <jakub@redhat.com>
12142 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
12143 declare for libc.so.
12144 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
12146 (__libc_lock_lock): Put into statement expression.
12147 (__libc_lock_unlock): Remove trailing semicolon.
12148 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
12150 2002-12-12 Roland McGrath <roland@redhat.com>
12152 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
12153 "m" constraint to refer to __libc_locking_needed. Declare it here.
12155 2002-12-12 Ulrich Drepper <drepper@redhat.com>
12157 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
12158 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
12159 Initialize __libc_locking_needed.
12160 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
12161 instead of __register_pthread_fork_handler.
12162 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
12163 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
12164 fork-gen with libc_pthread_init.
12165 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
12166 of __register_pthread_fork_handler.
12167 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
12168 of __register_pthread_fork_handler.
12169 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
12170 __libc_locking_needed to determine whether lock prefix can be avoided.
12171 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12173 2002-12-11 Ulrich Drepper <drepper@redhat.com>
12175 * Makefile (tests): Add tst-cleanup1.
12176 * tst-cleanup1.c: New file.
12177 * cancellation.c (__cleanup_thread): Removed.
12178 (__do_cancel): Remove call to __cleanup_thread.
12179 * pthreadP.h: Remove __cleanup_thread prorotype.
12181 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
12182 Remember function and argument even if cancellation handler
12183 function is not available.
12184 (__libc_cleanup_region_end): Execute registered function directly if
12185 pthread functions are not available.
12186 (__libc_cleanup_end): Likewise.
12188 * init.c (__pthread_initialize_minimal): Fix initialization in
12189 static lib by preventing gcc from being too clever.
12191 2002-12-10 Ulrich Drepper <drepper@redhat.com>
12193 * init.c (__pthread_initialize_minimal): Remove unneccesary
12196 * Makefile (tests): We can run tst-locale2 now.
12198 2002-12-09 Ulrich Drepper <drepper@redhat.com>
12200 * Versions: Remove duplicated sigwait entry.
12202 2002-12-08 Ulrich Drepper <drepper@redhat.com>
12204 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12207 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12209 * pthreadP.h: Declare __pthread_enable_asynccancel and
12210 __pthread_disable_asynccancel.
12211 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12212 (CANCEL_RESET): Use __pthread_disable_asynccancel.
12213 * cancellation.c (__pthread_enable_asynccancel): New function.
12214 (__pthread_disable_asynccancel): New function.
12215 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12216 * pt-close.c: Likewise.
12217 * pt-connect.c: Likewise.
12218 * pt-creat.c: Likewise.
12219 * pt-fcntl.c: Likewise.
12220 * pt-fsync.c: Likewise.
12221 * pt-lseek.c: Likewise.
12222 * pt-lseek64.c: Likewise.
12223 * pt-msgrcv.c: Likewise.
12224 * pt-msgsnd.c: Likewise.
12225 * pt-msync.c: Likewise.
12226 * pt-nanosleep.c: Likewise.
12227 * pt-open.c: Likewise.
12228 * pt-open64.c: Likewise.
12229 * pt-pause.c: Likewise.
12230 * pt-poll.c: Likewise.
12231 * pt-pread.c: Likewise.
12232 * pt-pread64.c: Likewise.
12233 * pt-pselect.c: Likewise.
12234 * pt-pwrite.c: Likewise.
12235 * pt-pwrite64.c: Likewise.
12236 * pt-read.c: Likewise.
12237 * pt-readv.c: Likewise.
12238 * pt-recv.c: Likewise.
12239 * pt-recvfrom.c: Likewise.
12240 * pt-recvmsg.c: Likewise.
12241 * pt-select.c: Likewise.
12242 * pt-send.c: Likewise.
12243 * pt-sendmsg.c: Likewise.
12244 * pt-sendto.c: Likewise.
12245 * pt-sigpause.c: Likewise.
12246 * pt-sigsuspend.c: Likewise.
12247 * pt-sigtimedwait.c: Likewise.
12248 * pt-sigwait.c: Likewise.
12249 * pt-sigwaitinfo.c: Likewise.
12250 * pt-system.c: Likewise.
12251 * pt-tcdrain.c: Likewise.
12252 * pt-wait.c: Likewise.
12253 * pt-waitid.c: Likewise.
12254 * pt-waitpid.c: Likewise.
12255 * pt-write.c: Likewise.
12256 * pt-writev.c: Likewise.
12257 * pthread_join.c: Likewise.
12258 * pthread_timedjoin.c: Likewise.
12260 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12261 (__xpg_sigpause): New function.
12262 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12264 2002-12-07 Ulrich Drepper <drepper@redhat.com>
12266 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12268 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12269 _GI_pthread_cleanup_pop to pthreadP.h.
12271 * ftrylockfile.c: Use _IO_lock_trylock instead of
12272 pthread_mutex_trylock.
12274 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12275 (CANCEL_RESET): Likewise.
12276 (__pthread_setcanceltype_): Declare.
12277 (__pthread_mutex_lock_internal): Declare.
12278 (__pthread_mutex_unlock_internal): Declare.
12279 (__pthread_once_internal): Declare.
12280 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12281 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12283 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12284 and pthread_mutex_unlock.
12285 * pthread_cond_wait.c: Likewise.
12286 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12287 * pthread_mutex_unlock.c: Likewise.
12289 * pthread_setcanceltype.c: Add additional alias
12290 __pthread_setcanceltype.
12292 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12293 * sem_open.c (sem_open): Likewise.
12294 Use __libc_open, __libc_write, and __libc_close instead of
12295 open, write, and close respectively.
12297 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12298 Rewrite as statement expression since it must return a value.
12300 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12301 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12304 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12305 alias __pthread_once_internal.
12307 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12309 2002-12-06 Ulrich Drepper <drepper@redhat.com>
12311 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12312 * tst-stdio1.c: New file.
12313 * tst-stdio2.c: New file.
12315 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12317 * Makefile (tests): Comment out tst-locale2 for now.
12318 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12320 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12322 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12323 Use _IO_lock_init instead of explicit assignment.
12325 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12326 Define __libc_lock_* and __libc_lock_recursive macros with
12327 lowlevellock macros, not pthread mutexes.
12329 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
12330 of pthread_mutex_lock.
12331 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
12332 instead of pthread_mutex_unlock.
12334 2002-12-06 Roland McGrath <roland@redhat.com>
12336 * allocatestack.c (__stack_user): Use uninitialized defn.
12337 * init.c (__pthread_initialize_minimal): Initialize it here.
12339 2002-12-05 Roland McGrath <roland@redhat.com>
12341 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12343 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12345 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12346 missing & here too.
12348 2002-12-05 Ulrich Drepper <drepper@redhat.com>
12350 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12352 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12353 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12354 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12355 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12356 for __libc_lock_* macros.
12357 * Makefile (routines): Add libc-lowlevellock.
12359 2002-10-09 Roland McGrath <roland@redhat.com>
12361 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12362 Under [__PIC__], call the function via the pointer fetched for
12363 comparison rather than a call by name that uses the PLT.
12364 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12365 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12366 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12367 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12368 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12370 2002-12-04 Roland McGrath <roland@redhat.com>
12372 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12374 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12375 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12377 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12379 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12381 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12382 a completely opaque, non-integer type.
12383 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12385 2002-12-05 Jakub Jelinek <jakub@redhat.com>
12387 * sysdeps/i386/tls.h: Include stdlib.h.
12388 * sysdeps/x86_64/tls.h: Likewise.
12390 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12392 * Makefile (tests): Add tst-locale2.
12393 (tests-static): Likewise.
12394 * tst-locale2.c: New file.
12396 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12397 volatile and add memory clobbers to lock operations.
12399 2002-12-03 Ulrich Drepper <drepper@redhat.com>
12401 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12402 * sysdeps/i386/i486/bits/atomic.h: New file.
12403 * sysdeps/i386/i586/bits/atomic.h: New file.
12404 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12405 include i486 version.
12406 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12407 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12408 Patch by Marijn Ros <marijn@mad.scientist.com>.
12410 * allocatestack.c (get_cached_stack): Don't crash if we first
12411 found a stack with a larger size then needed.
12412 Reported by Hui Huang <hui.huang@sun.com>.
12414 * Makefile (tests): Add tst-sysconf.
12415 * tst-sysconf.c: New file.
12417 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12418 PTHREAD_THREADS_MAX.
12420 2002-12-02 Roland McGrath <roland@redhat.com>
12422 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12423 Declare using hidden_proto instead of attribute_hidden, so there are
12424 non-.hidden static symbols for gdb to find.
12425 (__pthread_keys): Likewise.
12426 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12427 * allocatestack.c (__stack_user): Likewise.
12428 * pthread_create.c (__pthread_keys): Likewise.
12429 (__nptl_threads_events, __nptl_last_event): Make these static instead
12431 * pthread_key_create.c (__pthread_pthread_keys_max,
12432 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12434 2002-12-02 Ulrich Drepper <drepper@redhat.com>
12436 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12438 * tst-locale1.c: New file.
12440 * pthread_cond_timedwait.c: Include <stdlib.h>.
12442 * Makefile (tests): Add tst-fork2 and tst-fork3.
12443 * tst-fork2.c: New file.
12444 * tst-fork3.c: New file.
12446 2002-11-28 Ulrich Drepper <drepper@redhat.com>
12448 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12450 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12451 require it to 200112L.
12453 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12454 instruction only if HAVE_CMOV is defined.
12455 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12457 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12459 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12461 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12463 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12465 2002-11-27 Ulrich Drepper <drepper@redhat.com>
12467 * sysdeps/x86_64/bits/atomic.h: New file.
12469 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12472 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12473 possible since gettid cannot fail.
12475 * sysdeps/x86_64/pthreaddef.h: New file.
12477 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12479 * sysdeps/x86_64/pthread_spin_init.c: New file.
12480 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12481 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12482 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12484 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12485 Add missing lock prefix. Minute optimization.
12487 * tst-spin2.c (main): Also check successful trylock call.
12489 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12490 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12492 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12493 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12495 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12496 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12497 value in case of an error. Add support for INTERNAL_SYSCALL.
12499 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12500 value in case of an error.
12502 * sysdeps/x86_64/tls.h: New file.
12504 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12506 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12507 takes the array member name and the index as parameters.
12508 (THREAD_SETMEM_NC): Likewise.
12509 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12510 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12513 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12514 to decide which code to use.
12515 (THREAD_SETMEM_NC): Likewise.
12517 * allocatestack.c (queue_stack): Don't remove stack from list here.
12518 Do it in the caller. Correct condition to prematurely terminate
12519 loop to free stacks.
12520 (__deallocate_stack): Remove stack from list here.
12522 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12524 * Makefile (tests): Add tst-stack1.
12525 * tst-stack1.c: New file.
12527 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12530 * pthread_attr_getstack.c: Return bottom of the thread area.
12532 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12534 * Makefile (libpthread-routines): Add pt-allocrtsig and
12535 pthread_kill_other_threads.
12536 * pt-allocrtsig.c: New file.
12537 * pthread_kill_other_threads.c: New file.
12538 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12539 all three functions.
12540 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12542 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12543 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12544 and __libc_allocate_rtsig_private.
12545 * Versions (libpthread): Export pthread_kill_other_threads_np,
12546 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12548 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12550 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12551 the end of the stack. Adjust computations.
12552 When mprotect call fails dequeue stack and free it.
12553 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12555 * pthread_getattr_np.c: Likewise.
12557 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12560 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12562 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12563 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12565 2002-11-22 Ulrich Drepper <drepper@redhat.com>
12567 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12568 * pthread_setspecific.c: Likewise.
12570 2002-11-21 Ulrich Drepper <drepper@redhat.com>
12572 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12573 definitions. Get them from the official place.
12574 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12576 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12577 Use new CLONE_ flags in clone() calls.
12579 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12580 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12582 * Versions: Add pthread_* functions for libc.
12583 * forward.c: New file.
12585 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12587 * herrno.c: New file.
12590 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12591 sem_trywait, and sem_timedwait. Add herrno and res.
12592 * sem_init.c: Don't initialize lock and waiters members.
12593 * sem_open.c: Likewise.
12594 * sem_post.c: Removed.
12595 * sem_wait.c: Removed.
12596 * sem_trywait.c: Removed.
12597 * sem_timedwait.c: Removed.
12598 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12599 Includes full implementations of sem_post, sem_wait, sem_trywait,
12601 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12602 for new implementation.
12603 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12604 and waiters fields.
12606 * tst-sem3.c: Improve error message.
12607 * tst-signal3.c: Likewise.
12609 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12610 to tell the kernel about the termination futex and to initialize tid
12611 member. Don't initialize main_thread.
12612 * descr.h (struct pthread): Remove main_thread member.
12613 * cancelllation.c (__do_cancel): Remove code handling main thread.
12614 The main thread is not special anymore.
12616 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12617 size of the stacks to stack_cache_actsize.
12619 * pt-readv.c: Add missing "defined".
12620 * pt-sigwait.c: Likewise.
12621 * pt-writev.c: Likewise.
12623 2002-11-09 Ulrich Drepper <drepper@redhat.com>
12625 * Versions: Export __connect from libpthread.
12626 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12628 * Makefile (libpthread-routines): Add pt-raise.
12629 * sysdeps/unix/sysv/linux/raise.c: New file.
12630 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12631 * sysdeps/generic/pt-raise.c: New file.
12633 * pthread_cond_init.c: Initialize all data elements of the condvar
12634 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12636 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12637 * pthread_create.c: Likewise.
12639 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12640 * tst-key1.c: New file.
12641 * tst-key2.c: New file.
12642 * tst-key3.c: New file.
12644 * Versions: Export pthread_detach for version GLIBC_2.0.
12645 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12647 2002-11-08 Ulrich Drepper <drepper@redhat.com>
12649 * pthread_key_create.c: Terminate search after an unused key was found.
12650 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12652 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12653 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12655 2002-10-10 Ulrich Drepper <drepper@redhat.com>
12657 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12658 dynamic lookup for errno in PIC.
12660 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12661 release the stack lock as soon as possible.
12662 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12663 the static TLS block.
12664 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12666 * cancellation.c: Renamed from cancelation.c.
12667 * Makefile: Adjust accordingly.
12668 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12669 * cleanup_defer.c: Use CANCELLATION_P.
12670 * pthread_testcancel.c: Likewise.
12671 * descr.h: Fix spelling in comments.
12672 * init.c: Likewise.
12673 * pthread_getattr_np.c: Likewise.
12674 * pthread_getschedparam.c: Likewise.
12675 * pthread_setschedparam.c: Likewise.
12676 * Versions: Likewise.
12678 * pt-pselect.c: New file.
12679 * Makefile (libpthread-routines): Add pt-pselect.
12680 * Versions: Add pselect.
12682 * tst-cancel4.c: New file.
12683 * Makefile (tests): Add tst-cancel4.
12685 2002-10-09 Ulrich Drepper <drepper@redhat.com>
12687 * pthread_mutex_lock.c: Always record lock ownership.
12688 * pthread_mutex_timedlock.c: Likewise.
12689 * pthread_mutex_trylock.c: Likewise.
12691 * pt-readv.c: New file.
12692 * pt-writev.c: New file.
12693 * pt-creat.c: New file.
12694 * pt-msgrcv.c: New file.
12695 * pt-msgsnd.c: New file.
12696 * pt-poll.c: New file.
12697 * pt-select.c: New file.
12698 * pt-sigpause.c: New file.
12699 * pt-sigsuspend.c: New file.
12700 * pt-sigwait.c: New file.
12701 * pt-sigwaitinfo.c: New file.
12702 * pt-waitid.c: New file.
12703 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12704 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12705 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12706 * Versions: Add all the new functions.
12708 * tst-exit1.c: New file.
12709 * Makefile (tests): Add tst-exit1.
12711 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12713 2002-10-08 Ulrich Drepper <drepper@redhat.com>
12715 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12717 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12718 call. pthread_join is an official cancellation point.
12719 * pthread_timedjoin.c: Likewise.
12721 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12722 and the condvar's mutex are retrieved.
12723 * pthread_cond_timedwait.c: Likewise.
12724 Reported by dice@saros.East.Sun.COM.
12726 2002-10-07 Ulrich Drepper <drepper@redhat.com>
12728 * pthreadP.h: Cut out all type definitions and move them...
12729 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12730 * pthreadP.h: Include <internaltypes.h>.
12732 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12733 performance tweaks.
12735 * sem_trywait.c: Shuffle #includes around to get right order.
12736 * sem_timedwait.c: Likewise.
12737 * sem_post.c: Likewise.
12738 * sem_wait.c: Likewise.
12740 * nptl 0.3 released.
12742 * Makefile (tests): Add tst-signal3.
12743 * tst-signal3.c: New file.
12745 2002-10-05 Ulrich Drepper <drepper@redhat.com>
12747 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12748 the asms modify the sem object.
12749 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12751 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12752 the actual members.
12753 * pthreadP.h (struct sem): New type. Actual semaphore type.
12754 * semaphoreP.h: Include pthreadP.h.
12755 * sem_getvalue.c: Adjust to sem_t change.
12756 * sem_init.c: Likewise.
12757 * sem_open.c: Likewise.
12758 * sem_post.c: Likewise.
12759 * sem_timedwait.c: Likewise.
12760 * sem_trywait.c: Likewise.
12761 * sem_wait.c: Likewise.
12763 2002-10-04 Ulrich Drepper <drepper@redhat.com>
12765 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12766 * tst-basic2.c: New file.
12767 * tst-exec1.c: New file.
12768 * tst-exec2.c: New file.
12769 * tst-exec3.c: New file.
12771 * tst-fork1.c: Remove extra */.
12773 * nptl 0.2 released. The API for IA-32 is complete.