1 2013-01-11 H.J. Lu <hongjiu.lu@intel.com>
3 * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd)
4 with $(host-test-program-cmd).
5 (tst-exec4-ARGS): Likewise.
6 (tst-stackguard1-ARGS): Likewise.
7 ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh.
8 Replace $(rtld-installed-name) with $(test-via-rtld-prefix).
9 * tst-tls6.sh (elf_objpfx): Removed.
10 (rtld_installed_name): Renamed to ...
11 (test_via_rtld_prefix): This.
12 (tst_tls5): Prepend ${test_via_rtld_prefix}.
14 2013-01-02 Joseph Myers <joseph@codesourcery.com>
16 * All files with FSF copyright notices: Update copyright dates
17 using scripts/update-copyrights.
19 2013-01-01 Joseph Myers <joseph@codesourcery.com>
21 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat
24 2012-12-28 Andi Kleen <ak@linux.intel.com>
26 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert
28 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
31 2012-12-27 David S. Miller <davem@davemloft.net>
33 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
34 (lll_futex_timed_wait_bitset): New macro.
36 2012-12-27 Siddhesh Poyarekar <siddhesh@redhat.com>
38 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
40 (lll_futex_timed_wait): Replace assembly code with
42 (lll_futex_timed_wait_bitset): Likewise.
43 (lll_futex_wake): Likewise.
44 (lll_futex_requeue): Likewise.
45 (lll_futex_wake_unlock): Likewise.
47 2012-12-08 Siddhesh Poyarekar <siddhesh@redhat.com>
49 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
50 Declare LOCAL_VAR as char.
52 2012-12-04 Joseph Myers <joseph@codesourcery.com>
54 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
55 Cast result of atomic_increment_val to (void) instead of storing
56 in otherwise-unused variable.
58 2012-12-03 Allan McRae <allan@archlinux.org>
60 * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
62 2012-11-26 H.J. Lu <hongjiu.lu@intel.com>
64 * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
66 * sysdeps/i386/tls.h: Include <libc-internal.h>.
67 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
68 (THREAD_SETMEM_NC): Likewise.
69 * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
70 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
71 (THREAD_SETMEM_NC): Likewise.
73 2012-11-21 Joseph Myers <joseph@codesourcery.com>
75 * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
76 of atomic_increment_val to (void) instead of storing in
77 otherwise-unused variable.
79 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
80 [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
81 instead of storing in otherwise-unused variable.
83 2012-11-14 Marcus Shawcroft <marcus.shawcroft@linaro.org>
85 * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
86 (CFLAGS-recv.c, CFLAGS-send.c): Define.
88 2012-11-06 Chris Metcalf <cmetcalf@tilera.com>
90 * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
91 * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
93 2012-11-05 Siddhesh Poyarekar <siddhesh@redhat.com>
95 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
96 if absolute timeout is negative.
97 [__ASSUME_FUTEX_CLOCK_REALTIME &&
98 lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
99 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
101 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
103 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
104 (__lll_robust_timedlock_wait): Likewise.
105 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
106 (lll_futex_timed_wait_bitset): New macro.
107 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
108 (lll_futex_timed_wait_bitset): Likewise.
110 2012-11-03 David S. Miller <davem@davemloft.net>
112 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
114 (__cpu_relax): Likewise.
116 2012-11-02 H.J. Lu <hongjiu.lu@intel.com>
118 * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
119 (__128bits): New struct typedef.
120 (tcbhead_t): Replace __m128 with __128bits.
122 2012-10-30 Aurelien Jarno <aurelien@aurel32.net>
123 Joseph Myers <joseph@codesourcery.com>
125 * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
127 2012-10-28 David S. Miller <davem@davemloft.net>
129 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
130 Define when we have v9 instructions available.
131 * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
132 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
134 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
136 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
137 to libpthread-routines.
139 2012-10-25 Roland McGrath <roland@hack.frob.com>
141 * tst-cond-except.c (TEST_FUNCTION): New macro.
143 2012-10-25 Joseph Myers <joseph@codesourcery.com>
145 * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
147 * tst-tls6.sh: Use /bin/bash not /bin/sh.
149 2012-10-25 Roland McGrath <roland@hack.frob.com>
151 * tst-basic2.c (do_test): Return RESULT, not always zero.
153 * tst-cond25.c: Include <stdint.h>
154 (waiter): Add casts to uintptr_t between casting integer<->pointer.
155 (timed_waiter): Likewise.
156 (do_test_wait): Likewise.
157 * tst-cond-except.c (thr): Likewise.
158 (do_test): Use prototype definition.
160 2012-10-24 Joseph Myers <joseph@codesourcery.com>
161 Jim Blandy <jimb@codesourcery.com>
163 * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
165 * tst-tls6.sh (test_wrapper_env): New variable. Use it to run
166 programs with LD_PRELOAD set.
168 2012-10-24 Roland McGrath <roland@hack.frob.com>
170 * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
171 ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
172 ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
173 ($(objpfx)tst-rwlock14): Likewise.
175 2012-10-24 Joseph Myers <joseph@codesourcery.com>
177 * Makefile (tests): Remove tst-oddstacklimit.
178 (test-srcs): New variable.
179 (tst-oddstacklimit-ENV): Remove.
180 [$(run-built-tests) = yes] (tests): Depend on
181 $(objpfx)tst-oddstacklimit.out.
182 [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
184 * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
185 setrlimit before executing tst-basic1 test passed to --command.
187 2012-10-23 Joseph Myers <joseph@codesourcery.com>
189 * Makefile [$(cross-compiling) = no]: Change condition to
190 [$(run-built-tests) = yes].
192 2012-10-23 Jim Blandy <jimb@codesourcery.com>
193 Joseph Myers <joseph@codesourcery.com>
195 * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
196 (tst-exec4-ARGS): Likewise.
197 (tst-stackguard1-ARGS): Likewise.
199 2012-10-21 Jim Blandy <jimb@codesourcery.com>
200 Joseph Myers <joseph@codesourcery.com>
202 * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
203 tst-cancel-wrappers.sh.
204 * tst-cancel-wrappers.sh: Use nm program given as first argument,
207 2012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
209 * tst-cond25.c (do_test_wait): Don't check for return value from
212 2012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
215 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
216 (__condvar_tw_cleanup): Adjust the mutex data structure if it
217 was locked by FUTEX_WAIT_REQUEUE_PI.
218 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
219 (__condvar_w_cleanup): Likewise.
220 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
221 (__condvar_cleanup2): Likewise.
222 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
223 (__condvar_cleanup1): Likewise.
225 2012-10-10 Carlos O'Donell <carlos@systemhalted.org>
227 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
228 defined __EXCEPTIONS) && defined __USE_GNU]
229 (pthread_cleanup_push_defer_np): Fix formatting.
231 2012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
234 * Makefile (tests): New test case tst-cond25.
235 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
236 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
237 (__condvar_tw_cleanup): Lock mutex only if we don't already
239 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
240 (__condvar_w_cleanup): Likewise.
241 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
242 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
243 (__condvar_cleanup2): Lock mutex only if we don't already
245 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
246 (__condvar_cleanup1): Likewise.
247 * tst-cond25.c: New test case.
249 2012-10-09 Roland McGrath <roland@hack.frob.com>
251 * sysdeps/pthread/configure: Regenerated.
252 * sysdeps/x86_64/configure: Regenerated.
254 2012-10-05 David S. Miller <davem@davemloft.net>
257 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
258 (DB_THREAD_SELF): Use constants for the register offsets. Correct
259 the case of a 64-bit debugger with a 32-bit inferior.
261 2012-10-05 H.J. Lu <hongjiu.lu@intel.com>
264 * Makefile (tests-static): Add tst-cancel24-static,
265 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
266 tst-sem11-static and tst-sem12-static.
268 (LDLIBS-tst-cancel24-static): New macro.
269 * tst-cancel24-static.cc: New file.
270 * tst-cond8-static.c: Likewise.
271 * tst-mutex8-static.c: Likewise.
272 * tst-mutexpi8-static.c: Likewise.
273 * tst-sem11-static.c: Likewise.
274 * tst-sem12-static.c: Likewise.
276 2012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
279 * Makefile (tests): New test case tst-cond24.
280 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
281 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
282 (__pthread_cond_timedwait): Unlock mutex before going back to
284 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
285 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
286 return from futex_wait.
287 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
288 (__pthread_cond_timedwait): Unlock mutex before going back to
289 wait in PI case. Set requeue_pi flag only if wait returned 0.
290 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
291 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
292 return from futex_wait.
293 * tst-cond24.c: New test case.
295 2012-10-04 Roland McGrath <roland@hack.frob.com>
297 * pthread_create.c (start_thread): Use __madvise, not madvise.
299 2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
301 * sysdeps/i386/tls.h: Update copyright years.
303 2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
305 * pthread_create.c (start_thread): Fix clone flag name in
306 comment to CLONE_CHILD_CLEARTID.
307 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
308 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
309 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
310 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
311 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
312 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
314 2012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
317 * Makefile (tests): Add tst-cond-except.
318 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
319 (__pthread_cond_timedwait): Mark instructions where %ebx is
320 incremented in PI case.
321 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
322 for the marked PI case instructions.
323 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
324 (__pthread_cond_wait): Mark instructions where %ebx is
325 incremented in PI case.
326 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
327 for the marked PI case instructions.
328 * tst-cond-except.c: New test case.
330 2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
332 * tst-tls6.sh: Add "set -e".
333 * Makefile: Do not specify -e option when running testsuite
336 * tst-tls6.sh: Add copyright header.
338 2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
340 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
341 to uint64_t for 64-bit store.
342 (THREAD_SETMEM_NC): Likewise.
344 2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
346 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
348 (THREAD_SETMEM_NC): Likewise.
350 2012-09-14 Jeff Law <law@redhat.com>
353 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
355 2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
358 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
361 2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
363 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
364 (LDLIBS-tst-cancel24): This.
366 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
369 * Makefile (tests-static): Add tst-cancel21-static.
371 * tst-cancel21-static.c: New file.
373 2012-09-01 Joseph Myers <joseph@codesourcery.com>
375 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
376 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
377 [__NR_clock_getres]: Make code unconditional.
378 (pthread_getcpuclockid): Remove code left unreachable by removal
381 2012-08-31 Joseph Myers <joseph@codesourcery.com>
384 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
385 atomic_compare_and_exchange_bool_rel.
386 * tst-sem14.c: New file.
387 * Makefile (tests): Add tst-sem14.
389 2012-08-15 Roland McGrath <roland@hack.frob.com>
391 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
393 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
394 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
396 2012-08-16 Joseph Myers <joseph@codesourcery.com>
398 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
399 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
400 * pthread_condattr_setclock.c (pthread_condattr_setclock)
401 [!__ASSUME_POSIX_TIMERS]: Likewise.
402 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
403 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
404 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
405 [!__ASSUME_POSIX_TIMERS]: Likewise.
406 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
407 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
408 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
410 [!__NR-timer_create]: Remove conditional code.
411 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
412 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
414 [!__NR_timer_delete]: Remove conditional code.
415 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
416 * sysdeps/unix/sysv/linux/timer_getoverr.c
417 [__NR_timer_getoverrun]: Make code unconditional.
418 [!__NR_timer_getoverrun]: Remove conditional code.
419 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
420 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
421 Make code unconditional.
422 [!__NR_timer_gettime]: Remove conditional code.
423 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
424 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
425 Make code unconditional.
426 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
427 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
428 Make code unconditional.
429 [!__NR_timer_settime]: Remove conditional code.
430 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
431 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
432 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
435 2012-08-15 Tom de Vries <vries@codesourcery.com>
436 Maxim Kuvyrkov <maxim@codesourcery.com>
438 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
439 (__libc_lock_trylock): Allow pre-existing definitions.
441 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
443 * pthread_spin_lock.c: New file.
444 * pthread_spin_trylock.c: New file.
446 2012-08-08 Joseph Myers <joseph@codesourcery.com>
448 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
450 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
451 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
453 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
454 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
455 Make code unconditional.
456 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
457 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
458 __NR_tgkill]: Make code unconditional.
459 (raise) [__ASSUME_TGKILL]: Likewise.
460 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
461 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
462 [__ASSUME_TGKILL]: Make code unconditional.
463 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
464 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
465 __NR_tgkill]: Make code unconditional.
466 (raise) [__ASSUME_TGKILL]: Likewise.
467 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
469 2012-08-07 Joseph Myers <joseph@codesourcery.com>
471 * sysdeps/pthread/createthread.c (create_thread)
472 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
474 2012-08-03 Joseph Myers <joseph@codesourcery.com>
476 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
478 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
480 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
482 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
483 (pagesize): New static variable.
484 (allocate_and_test): Return MEM. Rename parameter to TARGET.
485 (check_stack_top): New local variables MEM and PAGEMASK. Cap
486 stack size to MAX_STACK_SIZE. Call allocate_and_test for
487 halfway up the stack top page. Verify that the top page was
489 (do_test): Get pagesize using sysconf.
491 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
493 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
495 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
496 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
499 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
501 * tst-pthread-getattr.c: Revert last change.
503 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
505 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
508 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
510 (check_stack_top): Read valued written into STACKADDR in
511 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
513 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
515 * nptl-init.c (sighandler_setxid): Fix the comment that
518 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
520 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
521 (__lll_robust_timedlock_wait): Simplify CFI directives.
523 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
526 * Makefile (tests): Add test case.
527 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
528 the __libc_stack_end page from stacksize. Truncate stacksize to
529 make it page aligned when it is computed from RLIMIT_STACK.
530 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
533 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
536 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
539 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
540 Jakub Jelinek <jakub@redhat.com>
543 * sysdeps/pthread/pthread.h
544 [!(defined __GNUC__ && defined __EXCEPTIONS)]
545 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
546 __libc_unlikely instead of __builtin_expect.
548 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
551 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
552 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
553 * sysdeps/unix/sysv/linux/i386/Implies: New file.
554 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
555 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
557 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
558 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
560 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
562 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
565 * nptl-init.c (pthread_functions): Remove use of INTUSE and
567 (__pthread_initialize_minimal_internal): Likewise.
568 * sem_open.c: Likewise.
569 * sem_unlink.c: Likewise.
570 * pthreadP.h: Replace _internal aliases by hidden_proto
572 * pthread_getspecific.c: Replace _internal alias by hidden_def.
573 * pthread_key_create.c: Likewise.
574 * pthread_mutex_destroy.c: Likewise.
575 * pthread_mutex_init.c: Likewise.
576 * pthread_mutex_lock.c: Likewise.
577 * pthread_mutex_unlock.c: Likewise.
578 * pthread_once.c: Likewise.
579 * pthread_rwlock_rdlock.c: Likewise.
580 * pthread_rwlock_unlock.c: Likewise.
581 * pthread_rwlock_wrlock.c: Likewise.
582 * pthread_setspecific.c: Likewise.
583 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
585 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
587 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
589 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
590 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
591 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
592 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
593 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
594 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
595 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
596 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
597 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
598 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
600 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
602 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
605 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
607 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
608 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
610 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
611 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
613 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
614 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
615 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
616 (pthread_barrier_wait): Likewise.
617 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
618 (__pthread_cond_broadcast): Likewise.
619 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
620 (__pthread_cond_signal): Likewise.
621 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
622 (__pthread_cond_timedwait): Likewise.
623 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
625 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
626 (__pthread_rwlock_rdlock): Likewise.
627 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
628 (pthread_rwlock_timedrdlock): Likewise.
629 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
630 (pthread_rwlock_timedwrlock): Likewise.
631 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
632 (__pthread_rwlock_unlock): Likewise.
633 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
634 (__pthread_rwlock_wrlock): Likewise.
635 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
636 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
637 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
639 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
641 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
644 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
645 __libc_stack_end rounded to the end of containing page as the
648 2012-05-25 Rayson Ho <rho@redhat.com>
650 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
652 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
653 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
654 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
655 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
656 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
657 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
658 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
659 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
661 2012-05-25 Rayson Ho <rho@redhat.com>
662 Roland McGrath <roland@hack.frob.com>
664 * DESIGN-systemtap-probes.txt: New file.
665 * pthread_cond_broadcast.c: SystemTap probes.
666 * pthread_cond_init.c: Likewise.
667 * pthread_cond_signal.c: Likewise.
668 * pthread_cond_wait.c: Likewise.
669 * pthread_cond_destroy.c: Likewise.
670 * pthread_create.c: Likewise.
671 * pthread_join.c: Likewise.
672 * pthread_mutex_destroy.c: Likewise.
673 * pthread_mutex_init.c: Likewise.
674 * pthread_mutex_lock.c: Likewise.
675 * pthread_mutex_timedlock.c: Likewise.
676 * pthread_mutex_unlock.c: Likewise.
677 * pthread_rwlock_destroy.c: Likewise.
678 * pthread_rwlock_rdlock.c: Likewise.
679 * pthread_rwlock_unlock.c: Likewise.
680 * pthread_rwlock_wrlock.c: Likewise.
681 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
682 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
683 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
684 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
685 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
686 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
687 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
688 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
690 2012-05-24 Roland McGrath <roland@hack.frob.com>
692 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
694 2012-05-17 Andreas Jaeger <aj@suse.de>
696 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
697 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
698 only for older kernels.
700 2012-05-15 Joseph Myers <joseph@codesourcery.com>
702 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
705 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
707 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
708 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
709 (lll_robust_lock): Likewise.
710 (lll_cond_lock): Likewise.
711 (lll_robust_cond_lock): Likewise.
712 (lll_timedlock): Likewise.
713 (lll_robust_timedlock): Likewise.
714 (lll_unlock): Likewise.
715 (lll_robust_unlock): Likewise.
717 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
719 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
720 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
722 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
724 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
726 (__gcc_personality_v0): Replace 8-byte data alignment with
727 LP_SIZE alignment and .quad with ASM_ADDR.
729 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
731 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
733 (__gcc_personality_v0): Replace 8-byte data alignment with
734 LP_SIZE alignment and .quad with ASM_ADDR.
736 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
738 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
739 NWAITERS, which is unsigned long int.
741 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
743 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
744 (__gcc_personality_v0): Replace 8-byte data alignment with
745 LP_SIZE alignment and .quad with ASM_ADDR.
747 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
749 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
750 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
751 __vdso_clock_gettime pointer into RAX_LP.
752 (__gcc_personality_v0): Replace 8-byte data alignment with
753 LP_SIZE alignment and .quad with ASM_ADDR.
755 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
757 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
758 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
759 __vdso_clock_gettime pointer into RAX_LP.
760 (__gcc_personality_v0): Replace 8-byte data alignment with
761 LP_SIZE alignment and .quad with ASM_ADDR.
763 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
765 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
766 LP_OP(cmp) and R8_LP on dep_mutex pointer.
768 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
770 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
771 to update pointer in memory. Load pointer into RDI_LP.
773 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
775 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
776 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
778 (LLL_STUB_UNWIND_INFO_END): Likewise.
779 (lll_timedlock): Load timeout pointer into RDX_LP.
780 (lll_robust_timedlock): Likewise.
782 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
783 Jakub Jelinek <jakub@redhat.com>
786 * Makefile (tests): Add test cases.
787 * descr.h (struct pthread): Add a comment describing multiple_threads.
788 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
790 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
791 before setting cancelstate of the thread.
792 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
793 (__libc_multiple_threads): Add explanatory comment.
794 * tst-cancel-self-cancelstate.c: New test case.
795 * tst-cancel-self-canceltype.c: Likewise.
796 * tst-cancel-self-cleanup.c: Supporting file for test cases.
797 * tst-cancel-self-testcancel.c: New test case.
798 * tst-cancel-self.c: Likewise.
799 * vars.c: Expand comment to include single-process case.
801 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
803 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
804 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
807 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
809 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
811 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
812 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
814 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
816 * shlib-versions: Move x86_64-.*-linux.* entry to ...
817 * sysdeps/x86_64/64/shlib-versions: Here. New file.
818 * sysdeps/x86_64/x32/shlib-versions: New file.
820 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
822 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
823 __SIZEOF_PTHREAD_XXX_T.
824 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
825 (pthread_mutex_t): Likewise.
826 (pthread_rwlock_t): Likewise.
827 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
830 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
832 * sysdeps/x86_64/x32/tls.h: New file.
834 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
836 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
838 (THREAD_SETMEM_NC): Likewise.
840 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
842 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
845 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
847 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
848 (__cleanup_fct_attribute): Check __x86_64__ instead of
851 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
853 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
854 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
855 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
856 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
857 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
859 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
861 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
862 instead of __WORDSIZE.
864 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
867 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
869 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
871 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
872 (__pthread_cond_timedwait): Use CFI directives.
873 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
874 (__pthread_cond_wait): Likewise.
875 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
876 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
878 2012-05-03 David S. Miller <davem@davemloft.net>
880 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
881 always have to return 0, especially for the pthread_spin_init
883 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
885 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
886 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
888 2012-05-02 David S. Miller <davem@davemloft.net>
890 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
891 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
892 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
893 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
894 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
895 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
896 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
897 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
898 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
899 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
900 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
901 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
902 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
903 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
904 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
905 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
906 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
907 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
909 2012-05-02 Allan McRae <allan@archlinux.org>
911 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
912 (LDFLAGS-tst-cancel24): Likewise.
914 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
916 * sysdeps/i386/pthread_spin_lock.S: New.
917 * sysdeps/i386/pthread_spin_lock.c: Delete.
918 * sysdeps/x86_64/pthread_spin_lock.S: New.
919 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
921 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
923 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
924 run when cross-compiling.
926 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
928 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
929 instead of libgcc_s.h.
931 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
933 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
935 2012-03-27 David S. Miller <davem@davemloft.net>
937 * tst-cond16.c (do_test): Use a thread stack size which is either
938 PTHREAD_STACK_MIN or the page size, whichever is larger.
939 * tst-cond18.c (do_test): Likewise.
941 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
943 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
944 register char * __asm__("rsp") to get stack frame.
946 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
948 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
951 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
953 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
956 2012-03-16 David S. Miller <davem@davemloft.net>
959 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
961 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
964 2012-03-15 David S. Miller <davem@davemloft.net>
967 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
969 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
972 * pt-crti.S: Replace FSF snail mail address with URL.
974 2012-03-09 Joseph Myers <joseph@codesourcery.com>
976 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
977 Do not define before including <time.h>.
979 2012-03-08 David S. Miller <davem@davemloft.net>
981 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
983 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
985 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
986 Check for timestamp before the Epoch.
988 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
991 * tst-sem13.c (do_test): Add another test case.
992 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
993 Fix updating nwaiters.
995 2012-03-07 Joseph Myers <joseph@codesourcery.com>
998 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
999 link test to a compile test.
1000 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
1002 * sysdeps/pthread/configure: Regenerated.
1004 2012-03-07 Ulrich Drepper <drepper@gmail.com>
1006 * Makefile (distribute): Remove variable.
1008 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
1010 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
1011 superfluous assignment.
1012 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
1014 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1015 (sem_timedwait): Likewise.
1017 2012-03-06 Ulrich Drepper <drepper@gmail.com>
1019 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
1020 installed headers to...
1021 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
1023 2012-03-06 David S. Miller <davem@davemloft.net>
1025 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
1026 atomic_increment and remove unused local variable.
1027 (__old_sem_post): Likewise.
1029 2012-02-27 David S. Miller <davem@davemloft.net>
1031 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
1032 non-existing __pthread_attr.
1033 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1034 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1035 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1036 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1037 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1039 2012-02-26 Ulrich Drepper <drepper@gmail.com>
1041 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
1043 * sysdeps/pthread/pthread.h: Define __need_timespec before including
1045 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1047 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1048 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1049 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1050 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1051 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1053 2012-02-21 Joseph Myers <joseph@codesourcery.com>
1056 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1058 [crti.S not in sysdirs] (omit-deps): Do not append.
1059 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1060 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1061 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1062 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1063 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1064 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1065 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1066 [crti.S in sysdirs] (extra-objs): Append unconditionally.
1067 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1069 * sysdeps/pthread/pt-initfini.c: Remove file.
1071 2012-02-16 Richard Henderson <rth@twiddle.net>
1073 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1074 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1076 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1078 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1080 2012-02-16 David S. Miller <davem@davemloft.net>
1082 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1084 2012-02-15 Marek Polacek <polacek@redhat.com>
1086 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1088 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
1090 Replace FSF snail mail address with URLs, as per GNU coding standards.
1092 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
1094 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1096 2012-02-08 Joseph Myers <joseph@codesourcery.com>
1098 Support crti.S and crtn.S provided directly by architectures.
1099 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1100 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1101 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1102 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1103 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1104 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1105 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1106 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1107 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1108 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1109 * pt-crti.S: New file.
1110 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1112 2012-02-03 Joseph Myers <joseph@codesourcery.com>
1114 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1115 macros for PIC register setup.
1116 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1117 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1118 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1119 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1120 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1122 2012-01-11 Marek Polacek <polacek@redhat.com>
1124 * forward.c (FORWARD_NORETURN): Define macro.
1125 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1126 (__pthread_exit): Likewise.
1128 2012-01-10 Ulrich Drepper <drepper@gmail.com>
1130 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1132 * pthreadP.h: Add noreturn to __pthread_exit.
1133 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1135 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
1137 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1138 Call pthread_attr_setstacksize() with result of
1139 __pthread_get_minstack() to account for application TLS usage.
1141 2012-01-08 Marek Polacek <polacek@redhat.com>
1143 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1145 2012-01-07 Ulrich Drepper <drepper@gmail.com>
1148 * pthreadP.h: Use const instead of __const.
1149 * semaphore.h: Likewise.
1150 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1151 * sysdeps/pthread/bits/sigthread.h: Likewise.
1152 * sysdeps/pthread/pthread.h: Likewise.
1154 * Makefile: Remove elf=yes test, only ELF is supported.
1156 * shlib-versions: Remove entries for ports architectures.
1158 In case anyone cares, the IA-64 architecture could move to ports.
1159 * sysdeps/ia64/*: Removed.
1160 * sysdeps/unix/sysv/linux/ia64/*: Removed.
1162 2011-12-22 Ulrich Drepper <drepper@gmail.com>
1164 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1165 __pthread_get_minstack.
1166 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1169 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1170 through __pthread_get_minstack.
1171 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1172 directly from _rtld_global_ro.
1173 (__pthread_get_minstack): New function.
1174 * pthreadP.h: Declare __pthread_get_minstack.
1175 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1177 2011-12-21 Ulrich Drepper <drepper@gmail.com>
1180 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1181 Correct reading name from file.
1183 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
1185 * allocatestack.c (allocate_stack): Return errno on failure.
1187 2011-12-14 Jeff Law <law@redhat.com>
1190 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1192 2011-11-28 Andreas Schwab <schwab@redhat.com>
1194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1195 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1196 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1198 2011-11-15 Ulrich Drepper <drepper@gmail.com>
1200 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1203 2011-10-29 Ulrich Drepper <drepper@gmail.com>
1206 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1207 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1208 path for kernels with FUTEX_CLOCK_REALTIME.
1209 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1211 2011-10-27 Andreas Schwab <schwab@redhat.com>
1214 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1215 for memory synchronization functions.
1216 * semaphore.h: Likewise.
1218 2011-10-24 Ulrich Drepper <drepper@gmail.com>
1220 * tst-cancel7.c: Avoid warning.
1221 * tst-mutex6.c: Likewise.
1222 * tst-mutex9.c: Likewise.
1223 * tst-mutexpi6.c: Likewise.
1225 2011-10-23 Ulrich Drepper <drepper@gmail.com>
1227 * sysdeps/i386/tls.h: Remove #include <list.h>.
1229 2011-10-15 Ulrich Drepper <drepper@gmail.com>
1231 * pthread_create.c (start_thread): Call __ctype_init.
1233 2011-09-15 Andreas Schwab <schwab@redhat.com>
1235 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1237 (list_add): Add atomic_write_barrier.
1238 * descr.h: Define __need_list_t before including <list.h>.
1239 * nptl-init.c: Include <list.h>
1240 * allocatestack.c: Likewise.
1242 2011-09-11 Ulrich Drepper <drepper@gmail.com>
1244 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1245 * sysdeps/ia64/tls.h: Likewise.
1246 * sysdeps/powerpc/tls.h: Likewise.
1247 * sysdeps/s390/tls.h: Likewise.
1248 * sysdeps/sh/tls.h: Likewise.
1249 * sysdeps/sparc/tls.h: Likewise.
1250 * sysdeps/x86_64/tls.h: Likewise.
1252 2011-09-10 Ulrich Drepper <drepper@gmail.com>
1254 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1256 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1258 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1259 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1260 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1261 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1262 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1263 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1264 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1265 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1266 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1267 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1268 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1269 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1271 * tst-tls1.c: Support for __thread is now mandatory.
1272 * tst-tls2.c: Likewise.
1273 * tst-tls3.c: Likewise.
1274 * tst-tls3mod.c: Likewise.
1275 * tst-tls4.c: Likewise.
1276 * tst-tls4moda.c: Likewise.
1277 * tst-tls4modb.c: Likewise.
1278 * tst-tls5.h: Likewise.
1280 2011-09-08 Ulrich Drepper <drepper@gmail.com>
1283 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1284 (pthread_rwlock_timedwrlock): Use correct macro in test.
1285 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1287 2011-09-06 Ulrich Drepper <drepper@gmail.com>
1289 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1290 use gettimeofday vsyscall, just call gettimeofday.
1291 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1292 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1293 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1295 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1297 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1298 Simplify __vdso_clock_gettime use.
1300 2011-09-05 David S. Miller <davem@davemloft.net>
1302 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1304 (sem_timedwait): Call it to force an exception region around
1305 the async cancel enable and the futex operation.
1306 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1307 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1308 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1309 (__new_sem_wait): Call it to force an exception region around
1310 the async cancel enable and the futex operation.
1311 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1312 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1314 2011-08-31 Andreas Schwab <schwab@redhat.com>
1316 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1319 2011-08-20 David S. Miller <davem@davemloft.net>
1321 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1323 2011-08-14 Roland McGrath <roland@hack.frob.com>
1325 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1326 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1328 2011-08-08 Andreas Schwab <schwab@redhat.com>
1330 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1332 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1333 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1335 2011-07-22 Ulrich Drepper <drepper@gmail.com>
1337 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1339 (__gcc_personality_v0): Likewise.
1340 (_Unwind_ForcedUnwind): Likewise.
1341 (_Unwind_GetCFA): Likewise.
1343 2011-07-14 Roland McGrath <roland@hack.frob.com>
1345 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1348 2011-06-30 Ulrich Drepper <drepper@gmail.com>
1350 * nptl-init.c (__nptl_set_robust): New function.
1351 (pthread_functions): Add reference.
1352 * npthreadP.h: Declare __nptl_set_robust.
1353 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1354 ptr_set_robust member.
1355 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1356 child if threads are used.
1358 2011-06-14 Andreas Jaeger <aj@suse.de>
1360 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1362 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1365 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1367 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1370 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1372 Patch partly by Robert Rex <robert.rex@exasol.com>.
1374 2011-01-19 Roland McGrath <roland@redhat.com>
1376 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1377 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1378 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1379 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1380 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1381 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1383 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1385 * Makefile (test-extras): Add tst-cleanup4aux.
1387 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1390 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1391 (__SETXID_2): Likewise.
1392 (__SETXID_3): Likewise.
1394 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1397 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1398 * alloca_cutoff.c: Add libc_hidden_def.
1400 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1403 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1404 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1405 of "struct pthread".
1407 2010-09-21 Andreas Schwab <schwab@redhat.com>
1409 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1410 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1411 (pthread_cleanup_push_defer_np): Likewise.
1413 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1415 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1418 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1419 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1421 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1422 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1424 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1426 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1428 2010-05-01 Alan Modra <amodra@gmail.com>
1430 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1431 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1432 to save temps. Correct cfi for possible later frame manipulation.
1433 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1434 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1435 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1436 (DOCARGS_6, UNDOCARGS_6): Likewise.
1437 (CENABLE, CDISABLE): Add nops for non-shared calls.
1439 2010-07-06 Andreas Schwab <schwab@redhat.com>
1441 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1444 2010-07-03 Ulrich Drepper <drepper@redhat.com>
1446 * tst-abstime.c (do_test): Some more cleanups
1448 2010-07-02 Ulrich Drepper <drepper@redhat.com>
1450 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1452 2010-07-01 Andreas Schwab <schwab@redhat.com>
1453 Ulrich Drepper <drepper@redhat.com>
1455 * Makefile (tests): Add tst-abstime.
1456 * tst-abstime.c: New file.
1457 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1458 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1459 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1460 (__lll_timedlock_wait): Likewise.
1461 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1462 (__lll_robust_timedlock_wait): Likewise.
1463 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1464 (__pthread_cond_timedwait): Likewise.
1465 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1466 (pthread_rwlock_timedrdlock): Likewise.
1467 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1468 (pthread_rwlock_timedwrlock): Likewise.
1469 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1472 2010-07-01 Ulrich Drepper <drepper@redhat.com>
1474 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1476 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1478 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1479 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1481 2010-04-09 Ulrich Drepper <drepper@redhat.com>
1484 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1485 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1486 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1488 * Makefile (libpthread-routines): Add pthread_getname and
1490 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1492 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1494 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1495 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1496 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1497 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1499 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1501 * pthread_cond_timedwait.c: Add check for
1502 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1503 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1506 2010-03-09 Ulrich Drepper <drepper@redhat.com>
1508 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1509 and the call fails wake eventually waiting setxid threads. Don't free
1510 stack here if we try starting a thread.
1511 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1512 if the clone call failed.
1514 2010-03-08 Andreas Schwab <schwab@redhat.com>
1516 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1517 * allocatestack.c (get_cached_stack): Set setxid_futex.
1518 (allocate_stack): Likewise.
1520 2010-03-05 Andreas Schwab <schwab@redhat.com>
1521 Ulrich Drepper <drepper@redhat.com>
1523 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1524 it is creating a thread or it is just being created.
1525 * pthread_create.c (start_thread): Wake setxid thread if it is
1527 (__pthread_create_2_1): Initialize setxid_futex.
1528 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1531 2010-01-15 Ulrich Drepper <drepper@redhat.com>
1533 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1535 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1537 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
1539 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1540 Fix pthread_cond_timedwait with requeue-PI.
1541 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1542 Fix pthread_cond_wait with requeue-PI.
1544 2010-01-14 Ulrich Drepper <drepper@redhat.com>
1546 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1547 and pthread_mutexattr_setrobust for GLIBC_2.12.
1548 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1549 * pthread_mutexattr_getrobust.c: Define alias
1550 pthread_mutexattr_getrobust.
1551 * pthread_mutexattr_setrobust.c: Define alias
1552 pthread_mutexattr_setrobust.
1554 2010-01-12 Ulrich Drepper <drepper@redhat.com>
1556 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1558 2010-01-08 Ulrich Drepper <drepper@redhat.com>
1560 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1562 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1564 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1565 call __gmon_start__.
1566 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1568 2009-12-17 Ulrich Drepper <drepper@redhat.com>
1570 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1573 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1575 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1576 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1577 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1578 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1579 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1580 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1581 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1582 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1584 2009-12-12 Ulrich Drepper <drepper@redhat.com>
1586 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1587 Don't update nwaiters after invalid timeout is recognized.
1589 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1591 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1594 2009-11-27 Andreas Schwab <schwab@redhat.com>
1596 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1597 THREAD_SELF->cancelhandling after returning from futex call.
1599 2009-11-24 Ulrich Drepper <drepper@redhat.com>
1601 * tst-sem13.c: New file.
1602 * Makefile (tests): Add tst-sem13.
1604 2009-11-22 Roland McGrath <roland@redhat.com>
1606 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1607 instead of recapitulating its contents.
1609 2009-11-18 Ulrich Drepper <drepper@redhat.com>
1611 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1612 optimizations and cleanups.
1614 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1616 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1617 Remove redundant code. Fix cfi offsets.
1618 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1621 2009-11-17 Ulrich Drepper <drepper@redhat.com>
1623 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1624 reduce size of unwind info.
1626 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1628 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1629 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1631 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1634 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1636 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1638 2009-10-30 Ulrich Drepper <drepper@redhat.com>
1640 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1643 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1644 steps to avoid races with creation and terminations.
1645 * nptl-init.c (sighandler_setxid): Adjust.
1646 Patch by Daniel Jacobowitz.
1648 2009-09-07 Andreas Schwab <schwab@redhat.com>
1650 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1652 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
1653 Joseph Myers <joseph@codesourcery.com>
1656 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1657 Initialize the sigev_notify field for newly created timer to make sure
1658 the timer gets deleted from the active timer's list upon timer_delete.
1660 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
1662 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1663 Correct a logic error.
1665 2009-08-25 Ulrich Drepper <drepper@redhat.com>
1667 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1668 of the field in local variables.
1669 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1670 variable and don't unconditionally clear it.
1672 2009-08-24 Ulrich Drepper <drepper@redhat.com>
1674 * pthread_create.c (start_thread): Hint to the kernel that memory for
1675 the stack can be reused. We do not mark all the memory. The part
1676 still in use and some reserve are kept.
1678 2009-08-23 Ulrich Drepper <drepper@redhat.com>
1680 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1682 2009-08-11 Ulrich Drepper <drepper@redhat.com>
1684 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1687 2009-08-10 Ulrich Drepper <drepper@redhat.com>
1689 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1691 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1693 2009-08-10 Andreas Schwab <schwab@redhat.com>
1695 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1696 (__pthread_cond_signal): Don't clobber register used for syscall
1699 2009-08-08 Ulrich Drepper <drepper@redhat.com>
1701 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1702 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1704 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1705 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1708 2009-08-07 Ulrich Drepper <drepper@redhat.com>
1710 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1711 enabled by the special *_asynccancel functions.
1712 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1713 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1715 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1717 2009-08-04 Ulrich Drepper <drepper@redhat.com>
1719 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1720 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1721 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1722 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1723 since we can assume the special __*_{en,dis}able_asynccancel
1725 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1726 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1727 and PTHREAD_CANCELED.
1729 2009-07-31 Ulrich Drepper <drepper@redhat.com>
1731 * descr.h: Better definition of *_BITMASK macros for cancellation.
1733 2009-07-29 Ulrich Drepper <drepper@redhat.com>
1735 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1737 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1738 dynamic linker might have to save.
1739 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1740 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1743 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1745 2009-07-28 Ulrich Drepper <drepper@redhat.com>
1747 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1749 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1750 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1751 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1752 requeue_pi for robust mutexes.
1753 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1754 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1755 Don't only skip __pthread_mutex_cond_lock. Call instead
1756 __pthread_mutex_cond_lock_adjust.
1757 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1759 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1760 optimization of PI mutex handling.
1762 2009-07-27 Ulrich Drepper <drepper@redhat.com>
1765 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1766 instead of of _acq variants of cmpxchg.
1768 2009-07-23 Ulrich Drepper <drepper@redhat.com>
1770 * sysdeps/x86_64/configure.in: New file.
1772 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1773 path when not using absolute timeout futex.
1775 2009-07-20 Ulrich Drepper <drepper@redhat.com>
1777 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1778 optimizations of last changes.
1779 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1781 2009-07-19 Ulrich Drepper <drepper@redhat.com>
1783 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1784 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1785 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1786 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1787 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1788 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1789 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1790 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1792 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1793 (__pthread_cond_timedwait): Make more robust.
1795 2009-07-18 Ulrich Drepper <drepper@redhat.com>
1797 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1798 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1799 directly use absolute timeout.
1801 * tst-sem5.c (do_test): Add test for premature timeout.
1802 * Makefile: Linu tst-sem5 with librt.
1804 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1805 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1806 directly use absolute timeout.
1807 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1808 (pthread_rwlock_timedrdlock): Likewise.
1810 * tst-cond11.c (run_test): Add test to check that the timeout is
1813 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1814 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1815 directly use absolute timeout.
1817 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1818 (__pthread_cond_wait): Convert to using exception handler instead of
1819 registered unwind buffer.
1820 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1821 (__pthread_cond_timedwait): Likewise.
1823 2009-07-17 Ulrich Drepper <drepper@redhat.com>
1825 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1826 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1827 use absolute timeout.
1829 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1830 handling of uncontested semaphore.
1832 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1833 (__condvar_cleanup): Rewrite to use cfi directives instead of
1834 hand-coded unwind tables.
1835 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1837 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1838 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1841 2009-06-12 Ulrich Drepper <drepper@redhat.com>
1843 * Makefile (libpthread-routines): Add pthread_sigqueue.
1844 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1845 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1846 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1848 2009-06-11 Ulrich Drepper <drepper@redhat.com>
1851 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1852 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1854 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1856 2009-05-16 Ulrich Drepper <drepper@redhat.com>
1858 * libc-cancellation.c: Move __libc_cleanup_routine to...
1859 * libc-cleanup.c: ...here. New file.
1860 * Makefile (routines): Add libc-cleanup.
1862 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1864 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1865 * sysdeps/pthread/librt-cancellation.c: Likewise.
1868 * nptl-init.c: Renamed from init.c.
1869 * Makefile: Change all occurences of init.c to nptl-init.c.
1871 2009-05-15 Ulrich Drepper <drepper@redhat.com>
1873 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1874 to test when deciding on the delay.
1875 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1876 * pthread_cancel.c: Close race between deciding on sending a signal
1877 and setting the CANCELING_BIT bit.
1879 * cancellation.c (__pthread_disable_asynccancel): Don't return if
1881 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1883 2009-04-27 Ulrich Drepper <drepper@redhat.com>
1885 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1887 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1888 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1889 * sysdeps/i386/tls.h: Likewise.
1890 (tcbhead_t): Add __private_tm member.
1892 2009-04-26 Ulrich Drepper <drepper@redhat.com>
1894 * sem_open.c (sem_open): Rewrite initialization of initsem to
1897 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1898 Avoid warning by using may_alias attribute on ptrhack.
1900 2009-04-22 Ulrich Drepper <drepper@redhat.com>
1903 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1904 Check policy and priority for validity.
1905 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1907 2009-03-15 Ulrich Drepper <drepper@redhat.com>
1909 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1910 (__pthread_cond_timedwait): Change to use cfi directives instead of
1911 hand-coded unwind sections.
1913 2009-03-10 Ulrich Drepper <drepper@redhat.com>
1915 * init.c (nptl_freeres): Compile only for SHARED.
1917 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1919 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1920 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1921 FUTEX_BITSET_MATCH_ANY.
1923 2009-02-27 Roland McGrath <roland@redhat.com>
1925 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1926 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1928 2009-02-26 Ulrich Drepper <drepper@redhat.com>
1930 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1931 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1932 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1935 2009-02-25 Ulrich Drepper <drepper@redhat.com>
1937 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1940 2009-02-24 Ulrich Drepper <drepper@redhat.com>
1942 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1943 Unify name of include protector macro.
1945 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1947 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1948 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1950 2009-01-29 Ulrich Drepper <drepper@redhat.com>
1952 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1955 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1956 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1957 * init.c (nptl_freeres): New function.
1958 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1959 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1960 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1962 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1963 load DSO. Assign last.
1964 (__unwind_freeres): New function.
1966 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1967 for better debugging. No need to use stack_list_add here.
1969 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1971 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1972 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1973 instead of computing relative timeout.
1974 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1975 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1977 2009-01-25 Ulrich Drepper <drepper@redhat.com>
1979 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1981 2009-01-08 Ulrich Drepper <drepper@redhat.com>
1983 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1984 (list_add_tail): Removed.
1986 2009-01-07 Ulrich Drepper <drepper@redhat.com>
1988 * (in_flight_stack): New variable.
1989 (stack_list_del): New function. Use instead of list_del.
1990 (stack_list_add): New function. Use instead of list_add when adding to
1991 stack_cache and stack_used lists.
1992 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1993 when the fork call interrupted another thread.
1995 2009-01-04 Ulrich Drepper <drepper@redhat.com>
1997 * init.c (__pthread_initialize_minimal_internal): Optimize test
1998 FUTEX_CLOCK_REALTIME a bit.
2000 2009-01-03 Ulrich Drepper <drepper@redhat.com>
2002 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
2003 only passing five parameters to FUTEX_WAIT_BITSET call.
2005 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2006 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2007 instead of computing relative timeout.
2009 2009-01-02 Ulrich Drepper <drepper@redhat.com>
2011 * init.c (__pthread_initialize_minimal_internal): Check for
2012 FUTEX_CLOCK_REALTIME flag.
2013 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2014 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
2017 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2018 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2019 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2020 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2021 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2022 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2024 2008-12-09 Ulrich Drepper <drepper@redhat.com>
2026 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
2027 loop body instead of ; to avoid gcc warnings.
2028 (pthread_cleanup_pop_restore_np): Likewise.
2029 Patch by Caolán McNamara <caolanm@redhat.com>.
2031 2008-12-09 Jakub Jelinek <jakub@redhat.com>
2033 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
2034 fast path here, for robust/PI/PP mutexes call
2035 __pthread_mutex_lock_full. Don't use switch, instead use a series
2036 of ifs according to their probability.
2037 (__pthread_mutex_lock_full): New function.
2038 * pthread_mutex_unlock.c: Include assert.h.
2039 (__pthread_mutex_unlock_usercnt): Handle only the
2040 fast path here, for robust/PI/PP mutexes call
2041 __pthread_mutex_unlock_full. Don't use switch, instead use a series
2042 of ifs according to their probability.
2043 (__pthread_mutex_unlock_full): New function.
2044 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
2045 (__pthread_mutex_lock_full): Define.
2047 2008-12-08 Ulrich Drepper <drepper@redhat.com>
2049 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2050 implementation. Add necessary padding and.
2051 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2054 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2056 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2057 and FUTEX_WAKE_BITSET.
2059 2008-12-02 Ulrich Drepper <drepper@redhat.com>
2061 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2062 and FUTEX_WAKE_BITSET.
2063 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2064 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2065 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2066 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2068 2008-11-25 Roland McGrath <roland@redhat.com>
2070 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2071 Subdirectories moved to ports repository as
2072 sysdeps/.../nptl subdirectories.
2074 2008-11-12 Jakub Jelinek <jakub@redhat.com>
2077 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2079 * pthread_cond_init.c (__pthread_cond_init): Fix
2080 cond->__data.__nwaiters initialization.
2081 * Makefile (tests): Add tst-cond23.
2082 * tst-cond23.c: New test.
2084 2008-11-07 Jakub Jelinek <jakub@redhat.com>
2086 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2088 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2091 2008-11-01 Ulrich Drepper <drepper@redhat.com>
2094 * pthread_mutex_lock.c: Add support for private PI mutexes.
2095 * pthread_mutex_timedlock.c: Likewise.
2096 * pthread_mutex_trylock.c: Likewise.
2097 * pthread_mutex_unlock.c: Likewise.
2098 Patch mostly by Ben Jackson <ben@ben.com>.
2100 2008-10-31 Ulrich Drepper <drepper@redhat.com>
2103 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2104 Increase stack size for helper thread.
2106 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2108 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2109 assembly with a clobber list for access registers a0 and a1.
2111 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
2113 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2114 to force runp->refcntr to be read from memory.
2116 2008-09-08 Richard Guenther <rguenther@suse.de>
2118 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2119 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2120 lll_timedlock, lll_robust_timedlock, lll_unlock,
2121 lll_robust_unlock): Promote private to int.
2123 2008-08-15 Ulrich Drepper <drepper@redhat.com>
2125 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2126 ARCH_RETRY_MMAP definitions.
2127 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2128 Define MAP_STACK when not defined.
2129 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
2130 handling of ARCH_RETRY_MMAP.
2132 2008-07-30 Ulrich Drepper <drepper@redhat.com>
2134 * tst-align2.c (f): Print message that f is reached.
2136 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
2139 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2140 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2142 2008-07-25 Ulrich Drepper <drepper@redhat.com>
2144 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2145 SOCK_CLOEXEC if possible.
2147 2008-05-29 Ulrich Drepper <drepper@redhat.com>
2149 * Makefile (tests): Add tst-rwlock2a.
2150 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2151 * tst-rwlock2a.c: New file.
2153 2008-06-12 Ulrich Drepper <drepper@redhat.com>
2155 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2157 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
2159 * sysdeps/pthread/pthread.h: Fix typo in comment.
2161 2008-05-28 Ulrich Drepper <drepper@redhat.com>
2163 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2164 of CPU set to the kernel.
2166 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2168 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2170 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2171 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2172 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2173 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2174 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2175 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2177 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
2179 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2181 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2183 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2185 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2188 2008-05-26 Ulrich Drepper <drepper@redhat.com>
2190 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2192 2008-05-20 Jakub Jelinek <jakub@redhat.com>
2194 David S. Miller <davem@davemloft.net>
2196 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2198 2008-05-10 Ulrich Drepper <drepper@redhat.com>
2200 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2201 __pshared correctly.
2202 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2204 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2206 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2208 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2210 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2212 2008-04-14 David S. Miller <davem@davemloft.net>
2214 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2215 (__old_sem_wait): Fix argument to lll_futex_wait().
2217 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2219 * pthread_create.c: Require pthread_mutex_trylock and
2220 pthread_key_delete for libgcc.
2222 2008-04-08 Jakub Jelinek <jakub@redhat.com>
2225 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2226 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2227 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2229 2008-03-27 Ulrich Drepper <drepper@redhat.com>
2231 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2232 <linux/limits.h> has defined it.
2233 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2234 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2235 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2236 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2238 2008-03-18 Jakub Jelinek <jakub@redhat.com>
2240 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2242 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2243 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2245 2008-03-14 Ulrich Drepper <drepper@redhat.com>
2247 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2248 HAVE_DL_DISCOVER_OSVERSION.
2249 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2250 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2252 2008-03-07 Ulrich Drepper <drepper@redhat.com>
2255 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2256 _POSIX_CHOWN_RESTRICTED value to zero.
2258 2008-01-31 Roland McGrath <roland@redhat.com>
2260 * Makefile (omit-deps): Variable removed.
2262 2008-01-30 Ulrich Drepper <drepper@redhat.com>
2264 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2265 unnecessary addr32 prefix.
2267 2008-01-29 Roland McGrath <roland@redhat.com>
2269 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2271 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2273 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2275 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2277 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2279 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2280 (__lll_lock_wait_private): Fix typo.
2281 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2282 (pthread_barrier_wait): Likewise. Adjust XADD use.
2283 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2285 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2286 (pthread_rwlock_timedrdlock): Return correct return value.
2287 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2288 (pthread_rwlock_timedwrlock): Likewise.
2290 2008-01-15 Ulrich Drepper <drepper@redhat.com>
2292 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2293 thread returns the program exits with an error code.
2295 2008-01-10 Ulrich Drepper <drepper@redhat.com>
2297 * pthread-errnos.sym: Add EOVERFLOW.
2298 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2299 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2300 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2301 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2303 2007-12-14 Ulrich Drepper <drepper@redhat.com>
2305 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2306 parameter. Passed it as permission to mmap.
2307 * allocatestack.c (allocate_stack): Pass prot as second parameter
2310 2007-12-12 Ulrich Drepper <drepper@redhat.com>
2312 * tst-basic7.c: Allocate memory for the stack.
2315 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2316 (__pthread_cond_timedwait): Don't use VDSO.
2317 Patch by Michal Januszewski.
2319 2007-12-07 Ulrich Drepper <drepper@redhat.com>
2322 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2323 Allow label before pthread_cleanup_pop.
2324 (pthread_cleanup_pop_restore_np): Likewise.
2326 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2328 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2329 Store 2 before returning ETIMEDOUT.
2331 2007-11-23 Ulrich Drepper <drepper@redhat.com>
2333 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2334 Store 2 before returning ETIMEDOUT.
2335 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2336 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2337 (__lll_lock_wait_private): Optimize.
2338 (__lll_lock_wait): Likewise.
2340 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2342 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2343 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2344 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2346 2007-11-08 Ulrich Drepper <drepper@redhat.com>
2349 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2350 If we time out, try one last time to lock the futex to avoid
2351 losing a wakeup signal.
2352 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2353 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2356 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2359 2007-11-07 Ulrich Drepper <drepper@redhat.com>
2362 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2363 mmap failed to EAGAIN.
2364 * Makefile (tests): Add tst-basic7.
2365 * tst-basic7.c: New file.
2367 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2369 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2370 Use __linkin_atfork.
2372 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2374 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2375 missing line continuations.
2376 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2377 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2379 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2382 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2383 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2384 (struct timer): Add next element.
2385 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2386 enqueue timer structure into __active_timer_sigev_thread list.
2387 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2388 remove timer struct from __active_timer_sigev_thread.
2389 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2390 Before using timer structure make sure it is still on the
2391 __active_timer_sigev_thread list. Keep lock until done.
2392 Define __active_timer_sigev_thread and
2393 __active_timer_sigev_thread_lock.
2395 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2397 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2398 Redefine thread_atfork for use of ATFORK_MEM.
2399 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2400 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2402 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2403 Use atomic operation when removing first element of list.
2405 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2407 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2408 routine instead of an alias to __new_sem_post.
2410 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2412 * init.c (__pthread_initialize_minimal): Initialize word to appease
2415 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2417 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2418 libc.so just clear NAME.
2419 (__libc_rwlock_fini): Nop inside of libc.so.
2420 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2423 2007-09-02 Ulrich Drepper <drepper@redhat.com>
2425 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2426 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2428 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2430 2007-08-21 Ulrich Drepper <drepper@redhat.com>
2433 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2434 reclaimed stack if necessary.
2435 * Makefile (tests): Add tst-tsd6.
2436 * tst-tsd6.c: New file.
2438 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2440 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2441 Add private argument.
2443 2007-08-20 Ulrich Drepper <drepper@redhat.com>
2445 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2446 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2448 2007-08-16 Jakub Jelinek <jakub@redhat.com>
2450 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2451 (__lll_robust_timedlock): Pass private as last argument to
2452 __lll_robust_timedlock_wait.
2453 (__lll_unlock): Fix a pasto.
2455 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2457 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2458 sparc_old_sem): New structs.
2459 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2460 (__sem_wait_cleanup): New function.
2461 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2462 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2463 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2465 (__old_sem_wait): New function.
2466 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2467 nptl/sysdeps/unix/sysv/linux/sparc version.
2468 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2470 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2471 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2472 (__new_sem_trywait): Use sparc_old_sem structure.
2473 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2474 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2475 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2476 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2477 lll_futex_timed_wait.
2478 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2479 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2480 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2482 (__old_sem_post): New function.
2483 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2484 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2485 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2486 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2487 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2488 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2490 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2492 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2493 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2494 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2495 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2496 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2497 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2498 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2500 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2501 kernel-features.h and tcb-offsets.h.
2502 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2503 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2505 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2507 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2508 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2510 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2511 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2512 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2513 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2514 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2515 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2516 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2518 2007-08-14 Jakub Jelinek <jakub@redhat.com>
2520 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2521 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2522 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2523 lll_futex_timed_wait.
2525 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2526 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2527 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2528 __lll_robust_unlock, __lll_wait_tid): Likewise.
2530 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2532 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2534 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2535 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2536 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2537 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2538 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2539 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2540 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2541 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2543 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2544 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2545 process private. Switch DW_CFA_advance_loc1 and some
2546 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2547 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2548 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2549 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2550 process private. Switch DW_CFA_advance_loc{1,2} and some
2551 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2552 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2553 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2554 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2556 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2557 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2558 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2560 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2561 (__pthread_cond_broadcast): Compare %r8 instead of
2562 dep_mutex-cond_*(%rdi) with $-1.
2563 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2564 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2567 2007-08-13 Ulrich Drepper <drepper@redhat.com>
2569 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2571 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2573 * allocatestack.c: Include kernel-features.h.
2574 * pthread_create.c: Likewise.
2575 * pthread_mutex_init.c: Likewise.
2577 * pthread_cond_timedwait.c: Likewise.
2578 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2579 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2580 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2581 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2582 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2583 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2584 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2586 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2588 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2589 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2590 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2591 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2593 2007-08-12 Jakub Jelinek <jakub@redhat.com>
2595 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2596 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2597 byte elements. One of them is the new __shared element.
2598 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2599 adjust names of other padding elements.
2600 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2601 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2602 byte elements. One of them is the new __shared element.
2603 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2604 adjust names of other padding elements.
2605 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2606 Renamed __pad1 element to __shared, adjust names of other padding
2608 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2609 (pthread_rwlock_t): Likewise.
2610 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2613 2007-08-09 Anton Blanchard <anton@samba.org>
2615 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2617 2007-08-12 Ulrich Drepper <drepper@redhat.com>
2619 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2620 <kernel-features.h>.
2621 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2623 2007-08-11 Ulrich Drepper <drepper@redhat.com>
2625 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2626 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2627 dealing with robust mutexes.
2628 * pthread_mutex_timedlock.c: Likewise.
2629 * pthread_mutex_trylock.c: Likewise.
2630 * pthread_mutex_unlock.c: Likewise.
2631 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2633 2007-08-06 Jakub Jelinek <jakub@redhat.com>
2635 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2636 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2637 (PTHREAD_MUTEX_PSHARED): Define.
2638 * pthread_mutex_init.c (__pthread_mutex_init): Set
2639 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2641 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2642 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2643 as second argument to lll_lock.
2644 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2645 instead of its __data.__lock field.
2646 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2647 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2649 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2650 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2651 instead of mutex->__data.__kind directly, pass
2652 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2653 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2654 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2655 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2656 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2657 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2658 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2659 of mutex->__data.__kind directly.
2660 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2661 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2662 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2663 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2664 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2665 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2667 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2668 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2669 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2671 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2672 Take mutex as argument instead of its __data.__lock field, pass
2673 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2674 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2675 __data.__lock field.
2676 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2677 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2678 to lll_robust_cond_lock.
2679 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2680 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2681 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2682 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2683 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2684 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2686 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2687 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2689 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2690 pshared variable, pass it to lll_lock, lll_unlock,
2691 lll_futex_timedwait and lll_futex_wake.
2692 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2693 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2695 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2696 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2698 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2699 lll_futex_wake_unlock): Likewise.
2700 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2702 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2703 lll_futex_wake_unlock): Likewise.
2704 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2706 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2707 lll_futex_wake_unlock): Likewise.
2708 (lll_futex_wake): Fix a typo.
2709 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2710 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2711 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2712 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2713 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2714 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2715 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2716 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2717 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2718 (__pthread_cond_timedwait): Likewise.
2719 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2720 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2722 2007-08-05 Jakub Jelinek <jakub@redhat.com>
2724 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2725 Don't use CGOTSETUP and CGOTRESTORE macros.
2726 (CGOTSETUP, CGOTRESTORE): Remove.
2727 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2730 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2732 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2733 definitions for private futexes.
2734 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2735 kernel-features.h and lowlevellock.h. Use private futexes if
2737 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2738 (__lll_mutex_lock_wait): Rename to
2739 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2740 (__lll_mutex_timedlock_wait): Rename to ...
2741 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2742 Don't compile in for libc.so.
2743 (__lll_mutex_unlock_wake): Rename to ...
2744 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2745 (__lll_timedwait_tid): Use __NR_gettimeofday.
2746 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2747 the header from assembler. Renamed all lll_mutex_* resp.
2748 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2749 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2750 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2752 (__lll_lock_wait_private): Add prototype.
2753 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2754 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2755 __lll_unlock_wake): Likewise.
2756 (lll_lock): Add private argument. Call __lll_lock_wait_private
2757 if private is constant LLL_PRIVATE.
2758 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2759 lll_timedlock, lll_robust_timedlock): Add private argument.
2760 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2761 if private is constant LLL_PRIVATE.
2762 (lll_robust_unlock, lll_robust_dead): Add private argument.
2763 (lll_lock_t): Remove.
2764 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2765 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2766 lll_cond_wake, lll_cond_broadcast): Remove.
2767 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2768 kernel-features.h and lowlevellock.h.
2769 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2770 (LOAD_FUTEX_WAIT): Define.
2771 (__lll_robust_mutex_lock_wait): Rename to ...
2772 (__lll_robust_lock_wait): ... this. Add private argument.
2773 Use LOAD_FUTEX_WAIT macro.
2774 (__lll_robust_mutex_timedlock_wait): Rename to ...
2775 (__lll_robust_timedlock_wait): ... this. Add private argument.
2776 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2777 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2779 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2780 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2781 __lll_mutex_{lock,unlock}_*.
2782 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2783 lowlevellock.h and pthread-errnos.h.
2784 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2785 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2786 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2787 __lll_mutex_{lock,unlock}_*.
2788 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2789 lowlevellock.h and pthread-errnos.h.
2790 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2791 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2792 __lll_mutex_{lock,unlock}_*.
2793 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2795 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2796 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2797 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2798 (__condvar_tw_cleanup): Likewise.
2799 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2801 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2802 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2803 __lll_mutex_{lock,unlock}_*.
2804 ( __condvar_w_cleanup): Likewise.
2805 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2806 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2807 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2809 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2810 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2811 __lll_mutex_{lock,unlock}_*.
2812 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2814 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2815 FUTEX_PRIVATE_FLAG): Remove.
2816 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2817 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2818 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2820 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2821 FUTEX_PRIVATE_FLAG): Remove.
2822 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2823 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2824 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2826 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2827 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2828 __lll_mutex_{lock,unlock}_*.
2829 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2831 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2832 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2833 __lll_mutex_{lock,unlock}_*.
2834 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2835 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2836 (__new_sem_post): Use standard initial exec code sequences.
2837 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2839 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2840 FUTEX_PRIVATE_FLAG): Remove.
2841 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2842 exec code sequences.
2843 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2844 (__new_sem_trywait): Use standard initial exec code sequences.
2845 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2846 (__new_sem_wait): Use standard initial exec code sequences.
2848 2007-07-31 Anton Blanchard <anton@samba.org>
2850 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2851 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2852 atomic_full_barrier.
2854 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2856 * allocatestack.c (stack_cache_lock): Change type to int.
2857 (get_cached_stack, allocate_stack, __deallocate_stack,
2858 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2859 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2860 as second argument to lll_lock and lll_unlock macros on
2862 * pthread_create.c (__find_in_stack_list): Likewise.
2863 (start_thread): Similarly with pd->lock. Use lll_robust_dead
2864 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2866 * descr.h (struct pthread): Change lock and setxid_futex field
2868 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2869 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2870 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2871 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2873 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2874 * pthread_cond_init.c (__pthread_cond_init): Likewise.
2875 * pthreadP.h (__attr_list_lock): Change type to int.
2876 * pthread_attr_init.c (__attr_list_lock): Likewise.
2877 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2878 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2880 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2881 also for lll_futex_{wake,wait}.
2882 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2884 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2885 LLL_SHARED as second argument to lll_{,un}lock.
2886 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2887 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2888 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2889 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2891 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2892 as second argument to lll_{,un}lock macros on pd->lock.
2893 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2894 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2895 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2896 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2898 * sysdeps/pthread/createthread.c (do_clone, create_thread):
2900 * pthread_once.c (once_lock): Change type to int.
2901 (__pthread_once): Pass LLL_PRIVATE as second argument to
2902 lll_{,un}lock macros on once_lock.
2903 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2904 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2905 rwlock->__data.__shared as second argument to them and similarly
2907 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2909 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2911 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2912 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2913 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2914 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2915 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2916 to lll_{,un}lock macros on __sem_mappings_lock.
2917 * sem_open.c (check_add_mapping): Likewise.
2918 (__sem_mappings_lock): Change type to int.
2919 * semaphoreP.h (__sem_mappings_lock): Likewise.
2920 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2921 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2922 instead of lll_*mutex_*, pass LLL_SHARED as last
2924 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2925 pass LLL_SHARED as last argument.
2926 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2927 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2928 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2929 pass LLL_SHARED as last argument.
2930 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2931 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2932 LLL_SHARED as last argument.
2933 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2934 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2936 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2937 __libc_lock_lock_recursive, __libc_lock_unlock,
2938 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2939 argument to lll_{,un}lock.
2940 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2941 _IO_lock_unlock): Likewise.
2942 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2944 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2945 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2947 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2948 free_mem): Likewise.
2949 (__fork_lock): Change type to int.
2950 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2951 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2952 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2954 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2955 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2956 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2958 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2959 pass it through to lll_futex_*wait, only compile in when
2961 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2962 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2963 argument and pass it through to lll_futex_*wait.
2964 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2965 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2966 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2967 inline functions to __lll_* resp. __lll_robust_*.
2968 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2969 (lll_mutex_dead): Add private argument.
2970 (__lll_lock_wait_private): New prototype.
2971 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2972 __lll_robust_lock_timedwait): Add private argument to prototypes.
2973 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2974 call __lll_lock_wait_private, otherwise pass private to
2976 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2977 __lll_robust_timedlock): Add private argument, pass it to
2978 __lll_*wait functions.
2979 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2980 call __lll_unlock_wake_private, otherwise pass private to
2982 (__lll_robust_unlock): Add private argument, pass it to
2983 __lll_robust_unlock_wake.
2984 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2985 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2986 argument, pass it through to __lll_* inline function.
2987 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2988 (lll_lock_t): Remove.
2989 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2990 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2991 lll_cond_wake, lll_cond_broadcast): Remove.
2992 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2993 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2994 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2995 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2996 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2997 the header from assembler. Renamed all lll_mutex_* resp.
2998 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2999 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
3000 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3001 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
3002 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
3003 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
3004 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
3006 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
3007 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
3008 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
3009 (lll_trylock): Likewise, use __lll_trylock_asm, pass
3010 MULTIPLE_THREADS_OFFSET as another asm operand.
3011 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
3012 MULTIPLE_THREADS_OFFSET as last asm operand, call
3013 __lll_lock_wait_private if private is constant LLL_PRIVATE,
3014 otherwise pass private as another argument to __lll_lock_wait.
3015 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3016 lll_timedlock, lll_robust_timedlock): Add private argument, pass
3017 private as another argument to __lll_*lock_wait call.
3018 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
3019 MULTIPLE_THREADS_OFFSET as another asm operand, call
3020 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
3021 otherwise pass private as another argument to __lll_unlock_wake.
3022 (lll_robust_unlock): Add private argument, pass private as another
3023 argument to __lll_unlock_wake.
3024 (lll_robust_dead): Add private argument, use __lll_private_flag
3026 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
3027 LLL_MUTEX_LOCK_INITIALIZER.
3028 (lll_lock_t): Remove.
3029 (LLL_LOCK_INITIALIZER_WAITERS): Define.
3030 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3031 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3032 lll_cond_wake, lll_cond_broadcast): Remove.
3033 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3034 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
3035 2007-05-2{3,9} changes.
3036 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
3037 kernel-features.h and lowlevellock.h.
3038 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3039 (LOAD_FUTEX_WAIT): Rewritten.
3040 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3042 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3043 (__lll_mutex_lock_wait): Rename to ...
3044 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
3045 %ecx, %ecx is now private argument. Don't compile in for libc.so.
3046 (__lll_mutex_timedlock_wait): Rename to ...
3047 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
3048 contains private argument. Don't compile in for libc.so.
3049 (__lll_mutex_unlock_wake): Rename to ...
3050 (__lll_unlock_wake): ... this. %ecx contains private argument.
3051 Don't compile in for libc.so.
3052 (__lll_timedwait_tid): Use __NR_gettimeofday.
3053 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3054 kernel-features.h and lowlevellock.h.
3055 (LOAD_FUTEX_WAIT): Define.
3056 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3058 (__lll_robust_mutex_lock_wait): Rename to ...
3059 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
3060 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
3062 (__lll_robust_mutex_timedlock_wait): Rename to ...
3063 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
3064 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3065 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3067 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3068 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3069 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3070 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3071 to __lll_lock_wait in %edx.
3072 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3073 Include lowlevellock.h and pthread-errnos.h.
3074 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3075 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3076 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3077 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3078 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3080 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3081 Include lowlevellock.h and pthread-errnos.h.
3082 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3083 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3084 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3085 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3086 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3088 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3089 Include lowlevellock.h.
3090 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3092 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3093 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3094 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3095 __lll_unlock_wake. Use __NR_gettimeofday.
3096 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3097 Include lowlevellock.h.
3098 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3099 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3100 to __lll_*, pass cond_lock address in %edx rather than %ecx to
3101 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3102 and __lll_unlock_wake.
3103 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3104 Include lowlevellock.h.
3105 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3106 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3107 MUTEX(%ebx) address in %edx rather than %ecx to
3108 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3109 and __lll_unlock_wake. Move return value from %ecx to %edx
3111 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3112 Include lowlevellock.h.
3113 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3115 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3116 MUTEX(%ebp) address in %edx rather than %ecx to
3117 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3118 and __lll_unlock_wake. Move return value from %ecx to %edx
3119 register. Use __NR_gettimeofday.
3120 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3121 Include lowlevellock.h.
3122 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3124 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3125 MUTEX(%ebp) address in %edx rather than %ecx to
3126 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3127 and __lll_unlock_wake. Move return value from %ecx to %edx
3128 register. Use __NR_gettimeofday.
3129 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3130 Include lowlevellock.h.
3131 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3132 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3133 MUTEX(%edi) address in %edx rather than %ecx to
3134 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3135 and __lll_unlock_wake.
3136 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3137 Include lowlevellock.h.
3138 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3139 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3140 MUTEX(%ebx) address in %edx rather than %ecx to
3141 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3142 and __lll_unlock_wake. Move return value from %ecx to %edx
3144 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3146 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3148 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3149 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3150 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3152 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3153 (sem_timedwait): Use __NR_gettimeofday.
3154 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3156 (LOCK): Don't define.
3157 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3159 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3160 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3162 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3163 2007-05-2{3,9} changes.
3164 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3165 kernel-features.h and lowlevellock.h.
3166 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3167 (LOAD_FUTEX_WAIT): Rewritten.
3168 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3169 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3170 (__lll_mutex_lock_wait): Rename to ...
3171 (__lll_lock_wait): ... this. %esi is now private argument.
3172 Don't compile in for libc.so.
3173 (__lll_mutex_timedlock_wait): Rename to ...
3174 (__lll_timedlock_wait): ... this. %esi contains private argument.
3175 Don't compile in for libc.so.
3176 (__lll_mutex_unlock_wake): Rename to ...
3177 (__lll_unlock_wake): ... this. %esi contains private argument.
3178 Don't compile in for libc.so.
3179 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3180 kernel-features.h and lowlevellock.h.
3181 (LOAD_FUTEX_WAIT): Define.
3182 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3183 (__lll_robust_mutex_lock_wait): Rename to ...
3184 (__lll_robust_lock_wait): ... this. %esi argument contains private.
3185 Use LOAD_FUTEX_WAIT macro.
3186 (__lll_robust_mutex_timedlock_wait): Rename to ...
3187 (__lll_robust_timedlock_wait): ... this. %esi argument contains
3188 private, use LOAD_FUTEX_WAIT macro.
3189 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3191 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3192 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3193 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3194 __lll_lock_wait and __lll_unlock_wake.
3195 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3196 Include lowlevellock.h and pthread-errnos.h.
3197 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3198 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3199 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3200 pass LLL_SHARED in %esi to both __lll_lock_wait and
3202 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3203 Include lowlevellock.h and pthread-errnos.h.
3204 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3205 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3206 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3207 pass LLL_SHARED in %esi to both __lll_lock_wait and
3209 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3210 Include lowlevellock.h.
3211 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3212 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3213 pass LLL_SHARED in %esi to both __lll_lock_wait and
3215 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3216 Include lowlevellock.h.
3217 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3218 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3219 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3220 and __lll_unlock_wake.
3221 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3222 Include lowlevellock.h.
3223 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3225 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3226 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3227 and __lll_unlock_wake.
3228 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3229 Include lowlevellock.h.
3230 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3232 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3233 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3234 and __lll_unlock_wake.
3235 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3236 Include lowlevellock.h.
3237 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3239 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3240 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3241 and __lll_unlock_wake.
3242 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3243 Include lowlevellock.h.
3244 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3246 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3247 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3248 and __lll_unlock_wake.
3249 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3250 Include lowlevellock.h.
3251 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3253 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3254 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3255 and __lll_unlock_wake.
3256 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3258 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3260 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3261 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3262 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3264 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3265 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3267 (LOCK): Don't define.
3268 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3270 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3271 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3272 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3273 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3274 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3275 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3276 (__lll_lock_wait_private): New function.
3277 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3278 it to lll_futex_*wait. Don't compile in for libc.so.
3279 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3281 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3282 (struct sparc_pthread_barrier): Remove.
3283 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3284 struct sparc_pthread_barrier. Pass
3285 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3286 and lll_futex_wait macros.
3287 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3289 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3290 Include sparc pthread_barrier_wait.c instead of generic one.
3292 2007-07-30 Jakub Jelinek <jakub@redhat.com>
3294 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3296 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3297 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3299 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3300 (pthread_rwlock_timedwrlock): Likewise.
3301 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3302 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3304 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3306 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3308 2007-07-26 Jakub Jelinek <jakub@redhat.com>
3310 * tst-locale2.c (useless): Add return statement.
3312 2007-07-24 Jakub Jelinek <jakub@redhat.com>
3314 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3315 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3316 * pthread_create.c (start_thread): Likewise.
3317 * init.c (sighandler_setxid): Likewise.
3318 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3319 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3320 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3321 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3322 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3323 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3324 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3325 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3326 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3328 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3330 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3332 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3333 __rtld_notify): Likewise.
3334 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3335 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3336 __pthread_once): Likewise.
3337 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3338 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3339 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3340 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3341 (lll_futex_wait): Add private argument, define as wrapper around
3342 lll_futex_timed_wait.
3343 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3344 use __lll_private_flag macro.
3345 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3346 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3347 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3348 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3349 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3350 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3351 (lll_futex_wait): Add private argument, define as wrapper around
3352 lll_futex_timed_wait.
3353 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3354 use __lll_private_flag macro.
3355 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3356 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3357 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3359 (lll_futex_timed_wait, lll_futex_wake): Use it.
3360 (lll_private_futex_wait, lll_private_futex_timed_wait,
3361 lll_private_futex_wake): Removed.
3362 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3363 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3364 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3365 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3366 (lll_futex_wait): Add private argument, define as wrapper around
3367 lll_futex_timed_wait.
3368 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3369 use __lll_private_flag macro.
3370 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3371 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3373 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3374 (lll_private_futex_wait, lll_private_futex_timed_wait,
3375 lll_private_futex_wake): Removed.
3376 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3377 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3378 (lll_private_futex_wait, lll_private_futex_timed_wait,
3379 lll_private_futex_wake): Removed.
3380 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3381 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3382 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3383 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3384 (lll_futex_wait): Add private argument, define as wrapper around
3385 lll_futex_timed_wait.
3386 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3387 use __lll_private_flag macro.
3388 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3389 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3391 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3393 (lll_futex_timed_wait, lll_futex_wake): Use it.
3394 (lll_private_futex_wait, lll_private_futex_timed_wait,
3395 lll_private_futex_wake): Removed.
3397 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3399 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3400 of the structure for sparc32.
3402 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3404 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3406 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3408 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3409 code used when private futexes are assumed.
3410 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3413 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3415 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3416 (__lll_private_flag): Define.
3417 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3418 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3420 (lll_private_futex_wait, lll_private_futex_timedwait,
3421 lll_private_futex_wake): Define as wrapper around non-_private
3423 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3424 (__lll_private_flag): Define.
3425 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3426 (lll_private_futex_wait, lll_private_futex_timedwait,
3427 lll_private_futex_wake): Define as wrapper around non-_private
3430 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3432 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3433 parameter to lll_futex_wait call.
3434 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3436 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3437 Replace lll_futex_wait with lll_private_futex_wait.
3438 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3439 Add LLL_SHARED parameter to lll_futex_wake().
3441 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3442 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3443 lll_private_futex_wake.
3444 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3445 bit from private parm before syscall.
3446 (lll_futex_timed_wait): Likewise.
3447 (lll_futex_wake): Likewise.
3448 (lll_futex_wake_unlock): Likewise.
3449 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3450 (lll_robust_mutex_unlock): Likewise.
3451 (lll_mutex_unlock_force): Likewise.
3452 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3454 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3456 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3457 compilation when unconditionally using private futexes.
3458 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3459 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3461 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3462 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3464 2007-07-17 Jakub Jelinek <jakub@redhat.com>
3466 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3469 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3471 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3474 2007-05-16 Roland McGrath <roland@redhat.com>
3476 * init.c (__nptl_initial_report_events): New variable.
3477 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3480 2007-06-22 Jakub Jelinek <jakub@redhat.com>
3482 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3483 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3485 2007-06-19 Ulrich Drepper <drepper@redhat.com>
3487 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3490 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3492 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3493 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3494 * pthread_mutex_timedlock.c: Likewise.
3495 * pthread_mutex_trylock.c: Likewise.
3496 * pthread_mutex_unlock.c: Likewise.
3498 2007-06-17 Andreas Schwab <schwab@suse.de>
3500 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3503 2007-06-17 Ulrich Drepper <drepper@redhat.com>
3505 * allocatestack.c (allocate_stack): Make code compile if
3506 __ASSUME_PRIVATE_FUTEX is set.
3508 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3510 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3511 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3512 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3513 (__pthread_rwlock_wrlock): Likewise.
3514 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3515 (pthread_rwlock_timedrdlock): Likewise.
3516 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3517 (pthread_rwlock_timedwrlock): Likewise.
3518 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3519 (__pthread_rwlock_unlock): Likewise.
3521 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3523 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3524 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3525 Split __flags into __flags, __shared, __pad1 and __pad2.
3526 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3527 futexes if they are available.
3528 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3529 in libc-lowlevellock.S allow using private futexes.
3530 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3531 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3532 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3533 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3534 lll_private_futex_timed_wait and lll_private_futex_wake.
3535 (lll_robust_mutex_unlock): Fix typo.
3536 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3537 field in futex command setup.
3538 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3539 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3540 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3541 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3542 if they are available. Remove clear_once_control.
3543 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3544 futexes if they are available.
3545 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3546 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3547 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3548 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3549 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3550 Wake only when there are waiters.
3551 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3552 support. Indicate that there are waiters. Remove unnecessary
3553 extra cancellation test.
3554 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3555 left-over duplication of __sem_wait_cleanup.
3557 2007-06-07 Ulrich Drepper <drepper@redhat.com>
3559 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3560 parameter to lll_futex_wait, lll_futex_timed_wait, and
3561 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3562 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3563 lll_private_futex_wake.
3564 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3565 * allocatestack.c: Adjust use of lll_futex_* macros.
3567 * lowlevellock.h: Likewise.
3568 * pthread_barrier_wait.c: Likewise.
3569 * pthread_cond_broadcast.c: Likewise.
3570 * pthread_cond_destroy.c: Likewise.
3571 * pthread_cond_signal.c: Likewise.
3572 * pthread_cond_timedwait.c: Likewise.
3573 * pthread_cond_wait.c: Likewise.
3574 * pthread_create.c: Likewise.
3575 * pthread_mutex_lock.c: Likewise.
3576 * pthread_mutex_setprioceiling.c: Likewise.
3577 * pthread_mutex_timedlock.c: Likewise.
3578 * pthread_mutex_unlock.c: Likewise.
3579 * pthread_rwlock_timedrdlock.c: Likewise.
3580 * pthread_rwlock_timedwrlock.c: Likewise.
3581 * pthread_rwlock_unlock.c: Likewise.
3582 * sysdeps/alpha/tls.h: Likewise.
3583 * sysdeps/i386/tls.h: Likewise.
3584 * sysdeps/ia64/tls.h: Likewise.
3585 * sysdeps/powerpc/tls.h: Likewise.
3586 * sysdeps/pthread/aio_misc.h: Likewise.
3587 * sysdeps/pthread/gai_misc.h: Likewise.
3588 * sysdeps/s390/tls.h: Likewise.
3589 * sysdeps/sh/tls.h: Likewise.
3590 * sysdeps/sparc/tls.h: Likewise.
3591 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3592 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3593 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3594 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3595 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3596 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3597 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3598 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3599 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3600 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3602 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3603 * sysdeps/x86_64/tls.h: Likewise.
3605 2007-05-29 Ulrich Drepper <drepper@redhat.com>
3607 * pthread_getattr_np.c: No need to install a cancellation handler,
3608 this is no cancellation point.
3609 * pthread_getschedparam.c: Likewise.
3610 * pthread_setschedparam.c: Likewise.
3611 * pthread_setschedprio.c: Likewise.
3612 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3614 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3615 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3616 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3617 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3618 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3619 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3620 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3621 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3622 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3623 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3624 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3625 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3627 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3628 whether there are more than one thread makes no sense here since
3629 we only call the slow path if the locks are taken.
3630 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3632 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3633 COND_NWAITERS_SHIFT.
3634 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3636 * pthread_cond_init.c: Likewise.
3637 * pthread_cond_timedwait.c: Likewise.
3638 * pthread_cond_wait.c: Likewise.
3639 * pthread_condattr_getclock.c: Likewise.
3640 * pthread_condattr_setclock.c: Likewise.
3641 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3642 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3643 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3644 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3645 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3647 2007-05-28 Jakub Jelinek <jakub@redhat.com>
3649 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3652 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3654 (THREAD_GSCOPE_GET_FLAG): Remove.
3655 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3656 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3658 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3659 (THREAD_GSCOPE_GET_FLAG): Remove.
3660 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3661 instead of THREAD_GSCOPE_GET_FLAG.
3662 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3664 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3665 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3666 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3667 THREAD_GSCOPE_WAIT): Define.
3668 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3669 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3670 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3671 THREAD_GSCOPE_WAIT): Define.
3672 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3673 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3674 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3675 THREAD_GSCOPE_WAIT): Define.
3676 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3677 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3678 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3679 THREAD_GSCOPE_WAIT): Define.
3681 2007-05-24 Richard Henderson <rth@redhat.com>
3683 * descr.h (struct pthread): Add header.gscope_flag.
3684 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3685 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3686 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3687 THREAD_GSCOPE_WAIT): Define.
3689 2007-05-27 Ulrich Drepper <drepper@redhat.com>
3691 * init.c: Make it compile with older kernel headers.
3693 * tst-initializers1.c: Show through exit code which test failed.
3695 * pthread_rwlock_init.c: Also initialize __shared field.
3696 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3697 element in rwlock structure into four byte elements. One of them is
3698 the new __shared element.
3699 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3701 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3702 __shared, adjust names of other padding elements.
3703 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3704 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3705 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3706 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3708 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3709 futex to use private operations if possible.
3710 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3712 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3714 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3715 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3716 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3717 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3719 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3721 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3722 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3724 2007-05-26 Ulrich Drepper <drepper@redhat.com>
3726 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3727 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3728 * pthread_rwlock_timedrdlock.c: Likewise.
3729 * pthread_rwlock_tryrdlock.c: Likewise.
3731 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3734 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3735 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3736 duplication of __sem_wait_cleanup.
3738 * allocatestack.c: Revert last change.
3740 * sysdeps/i386/tls.h: Likewise.
3741 * sysdeps/x86_64/tls.h: Likewise.
3742 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3744 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3746 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3748 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3749 * pthread_barrier_init.c: Set private flag if pshared and private
3750 futexes are supported.
3751 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3752 private field in futex command setup.
3753 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3755 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3757 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3759 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3760 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3761 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3762 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3763 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3765 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3766 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3767 fields in the structure.
3768 (__old_sem_init): New function.
3769 * sem_open.c: Initialize all fields of the structure.
3770 * sem_getvalue.c: Adjust for renamed element.
3771 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3772 (gen-as-const-headers): Add structsem.sym.
3773 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3774 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3775 struct new_sem. Add struct old_sem.
3776 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3777 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3778 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3779 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3780 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3781 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3782 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3783 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3784 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3785 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3786 * tst-sem10.c: New file.
3787 * tst-sem11.c: New file.
3788 * tst-sem12.c: New file.
3789 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3792 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3793 Jakub Jelinek <jakub@redhat.com>
3795 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3796 Move __pthread_enable_asynccancel right before futex syscall.
3797 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3800 2007-05-24 Jakub Jelinek <jakub@redhat.com>
3802 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3803 THREAD_COPY_PRIVATE_FUTEX): Define.
3804 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3805 THREAD_COPY_PRIVATE_FUTEX): Define.
3806 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3807 * init.c (__pthread_initialize_minimal_internal): Use
3808 THREAD_SET_PRIVATE_FUTEX.
3810 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3811 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3812 THREAD_GSCOPE_FLAG_WAIT): Define.
3813 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3814 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3815 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3817 (THREAD_GSCOPE_GET_FLAG): Define.
3818 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3819 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3820 instead of ->header.gscope_flag directly.
3822 2007-05-23 Ulrich Drepper <drepper@redhat.com>
3824 * init.c (__pthread_initialize_minimal_internal): Check whether
3825 private futexes are available.
3826 * allocatestack.c (allocate_stack): Copy private_futex field from
3827 current thread into the new stack.
3828 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3829 futexes if they are available.
3830 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3831 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3832 in libc-lowlevellock.S allow using private futexes.
3833 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3834 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3836 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3837 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3838 if they are available.
3839 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3840 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3841 * sysdeps/i386/tcb-offsets.sym: Likewise.
3842 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3843 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3845 2007-05-21 Ulrich Drepper <drepper@redhat.com>
3847 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3848 Remove ptr_wait_lookup_done again.
3849 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3850 (__pthread_initialize_minimal_internal): Initialize
3851 _dl_wait_lookup_done pointer in _rtld_global directly.
3852 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3853 Remove code to code _dl_wait_lookup_done.
3854 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3857 2007-05-21 Jakub Jelinek <jakub@redhat.com>
3859 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3860 pthread_mutex_init failed with ENOTSUP.
3862 2007-05-19 Ulrich Drepper <drepper@redhat.com>
3864 * allocatestack.c (__wait_lookup_done): New function.
3865 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3866 Add ptr_wait_lookup_done.
3867 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3868 * pthreadP.h: Declare __wait_lookup_done.
3869 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3870 Define macros to implement reference handling of global scope.
3871 * sysdeps/x86_64/tls.h: Likewise.
3872 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3873 Initialize GL(dl_wait_lookup_done).
3875 2007-05-17 Ulrich Drepper <drepper@redhat.com>
3878 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3880 * pthread_mutex_timedlock.c: Likewise.
3881 * pthread_mutex_trylock.c: Likewise.
3882 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3884 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3885 * tst-robust9.c: New file.
3886 * tst-robustpi9.c: New file.
3888 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3889 unnecessary extra cancellation test.
3891 2007-05-14 Ulrich Drepper <drepper@redhat.com>
3893 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3894 extra cancellation test.
3895 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3897 2007-05-10 Ulrich Drepper <drepper@redhat.com>
3899 * descr.h (struct pthread): Rearrange members to fill hole in
3902 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3903 (__pthread_setaffinity_new): If syscall was successful and
3904 RESET_VGETCPU_CACHE is defined, use it before returning.
3905 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3907 2007-05-10 Jakub Jelinek <jakub@redhat.com>
3910 * tst-align2.c: Include stackinfo.h.
3911 * tst-getpid1.c: Likewise.
3913 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
3916 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3917 * tst-getpid1.c (do_test): Likewise.
3920 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3921 (allocate_stack): Likewise.
3923 2007-05-07 Ulrich Drepper <drepper@redhat.com>
3925 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3926 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3927 (__lll_robust_timedlock_wait): Likewise.
3928 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3930 2007-05-06 Mike Frysinger <vapier@gentoo.org>
3933 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3934 * tst-cancel4.c (tf_fdatasync): New test.
3936 2007-04-27 Ulrich Drepper <drepper@redhat.com>
3939 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3940 check mutexes like normal mutexes.
3943 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3944 Initialize the whole sigevent structure to appease valgrind.
3946 2007-04-25 Ulrich Drepper <drepper@redhat.com>
3948 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3949 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3951 2007-04-06 Ulrich Drepper <drepper@redhat.com>
3953 * tst-locale1.c: Avoid warnings.
3954 * tst-locale2.c: Likewise.
3956 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3958 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3959 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3961 2007-03-16 Jakub Jelinek <jakub@redhat.com>
3963 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3964 __extern_always_inline where appropriate.
3965 * sysdeps/pthread/pthread.h: Likewise.
3967 2007-03-13 Richard Henderson <rth@redhat.com>
3969 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3970 separate cfi regions for the two subsections.
3972 2007-02-25 Ulrich Drepper <drepper@redhat.com>
3974 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3975 new thread, don't just decrement it.
3976 Patch by Suzuki K P <suzuki@in.ibm.com>.
3978 2007-02-21 Ulrich Drepper <drepper@redhat.com>
3980 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3981 PTHFCT_CALL definition.
3983 2007-02-18 Ulrich Drepper <drepper@redhat.com>
3985 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3986 available, don't use it.
3988 2007-02-09 Jakub Jelinek <jakub@redhat.com>
3990 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3991 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3992 call into the kernel to delay.
3994 2007-01-18 Ulrich Drepper <drepper@redhat.com>
3996 * tst-initializers1.c: We want to test the initializers as seen
3997 outside of libc, so undefined _LIBC.
3999 * pthread_join.c (cleanup): Avoid warning.
4001 2007-01-17 Ulrich Drepper <drepper@redhat.com>
4003 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4004 (__lll_timedwait_tid): Add unwind info.
4006 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4007 function table, mangle the pointers.
4008 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
4009 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
4010 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
4011 demangle pointers before use.
4012 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
4014 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4015 * sysdeps/pthread/setxid.h: Likewise.
4017 2007-01-12 Ulrich Drepper <drepper@redhat.com>
4019 * tst-rwlock7.c: Show some more information in case of correct
4022 2007-01-11 Ulrich Drepper <drepper@redhat.com>
4024 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4025 (lll_futex_timed_wait): Undo part of last change, don't negate
4028 2007-01-10 Ulrich Drepper <drepper@redhat.com>
4030 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
4031 FUTEX_CMP_REQUEUE and lll_futex_requeue.
4033 2006-12-28 David S. Miller <davem@davemloft.net>
4035 * shlib-versions: Fix sparc64 linux target specification.
4037 2007-01-10 Jakub Jelinek <jakub@redhat.com>
4039 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4040 Adjust include path for pthread_barrier_wait.c move.
4042 2006-12-21 Jakub Jelinek <jakub@redhat.com>
4044 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
4045 tid isn't reread from pd->tid in between ESRCH test and the syscall.
4047 2006-12-06 Jakub Jelinek <jakub@redhat.com>
4049 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4050 6 argument cancellable syscalls.
4051 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4052 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4053 6 argument cancellable syscalls.
4054 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4056 2006-12-09 Ulrich Drepper <drepper@redhat.com>
4058 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4059 (__rtld_mrlock_initialize): Add missing closing parenthesis.
4061 2006-10-30 Jakub Jelinek <jakub@redhat.com>
4063 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4064 __sync_lock_release instead of __sync_lock_release_si.
4066 2006-10-29 Jakub Jelinek <jakub@redhat.com>
4068 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4070 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4071 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4072 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4073 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4074 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4075 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4076 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4077 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4078 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4079 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4080 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4082 2006-10-27 Ulrich Drepper <drepper@redhat.com>
4084 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4085 * pthread_barrier_wait.c: ...here.
4086 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4087 * pthread_cond_broadcast.c: ...here.
4088 * sysdeps/pthread/pthread_cond_signal.c: Move to...
4089 * pthread_cond_signal.c: ...here.
4090 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4091 * pthread_cond_timedwait.c: ...here.
4092 * sysdeps/pthread/pthread_cond_wait.c: Move to...
4093 * pthread_cond_wait.c: ...here.
4094 * sysdeps/pthread/pthread_once.c: Move to...
4095 * pthread_once.c: ...here.
4096 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4097 * pthread_rwlock_rdlock.c: ...here.
4098 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4099 * pthread_rwlock_timedrdlock.c: ...here.
4100 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4101 * pthread_rwlock_timedwrlock.c: ...here.
4102 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4103 * pthread_rwlock_unlock.c: ...here.
4104 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4105 * pthread_rwlock_wrlock.c: ...here.
4106 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4107 * pthread_spin_destroy.c: ...here.
4108 * sysdeps/pthread/pthread_spin_init.c: Move to...
4109 * pthread_spin_init.c: ...here.
4110 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4111 * pthread_spin_unlock.c: ...here.
4112 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4113 * pthread_getcpuclockid.c: ...here.
4115 * init.c: USE_TLS support is now always enabled.
4116 * tst-tls5.h: Likewise.
4117 * sysdeps/alpha/tls.h: Likewise.
4118 * sysdeps/i386/tls.h: Likewise.
4119 * sysdeps/ia64/tls.h: Likewise.
4120 * sysdeps/powerpc/tls.h: Likewise.
4121 * sysdeps/s390/tls.h: Likewise.
4122 * sysdeps/sh/tls.h: Likewise.
4123 * sysdeps/sparc/tls.h: Likewise.
4124 * sysdeps/x86_64/tls.h: Likewise.
4126 2006-10-27 Jakub Jelinek <jakub@redhat.com>
4128 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4129 __rtld_mrlock_change): Update oldval if atomic compare and exchange
4132 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4133 Define to THREAD_SELF->header.multiple_threads.
4134 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4136 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4138 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4139 (SINGLE_THREAD_P): Likewise.
4140 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4141 (SINGLE_THREAD_P): Likewise.
4142 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4143 (SINGLE_THREAD_P): Likewise.
4144 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4145 (SINGLE_THREAD_P): Likewise.
4146 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4148 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4149 (SINGLE_THREAD_P): Likewise.
4150 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4151 (SINGLE_THREAD_P): Likewise.
4152 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4155 2006-10-26 Jakub Jelinek <jakub@redhat.com>
4157 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4158 by default rather than 2_3_3.
4160 2006-10-17 Jakub Jelinek <jakub@redhat.com>
4162 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4163 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4164 atomic_* instead of catomic_* macros.
4166 2006-10-12 Ulrich Drepper <drepper@redhat.com>
4169 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4170 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4171 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4172 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4173 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4174 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4175 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4176 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4177 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4178 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4179 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4180 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4181 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4183 2006-10-11 Ulrich Drepper <drepper@redhat.com>
4185 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4186 cancelable syscalls with six parameters.
4188 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4189 operations instead of atomic_*.
4191 2006-10-09 Ulrich Drepper <drepper@redhat.com>
4193 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4195 2006-10-07 Ulrich Drepper <drepper@redhat.com>
4197 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4198 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4199 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4201 * pthread_attr_setstack.c: Allow overwriting the version number of the
4203 * pthread_attr_setstacksize.c: Likewise.
4204 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4206 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4207 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4209 2006-09-24 Ulrich Drepper <drepper@redhat.com>
4212 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4213 Patch by Petr Baudis.
4215 2006-09-18 Jakub Jelinek <jakub@redhat.com>
4217 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4219 * tst-cancel2.c (tf): Loop as long as something was written.
4221 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4223 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4224 mutexes wake all mutexes.
4225 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4226 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4227 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4229 2006-09-12 Ulrich Drepper <drepper@redhat.com>
4231 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4232 to guarantee the thread is always canceled.
4234 2006-09-08 Jakub Jelinek <jakub@redhat.com>
4236 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4238 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4239 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4240 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4241 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4242 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4244 2006-09-08 Ulrich Drepper <drepper@redhat.com>
4247 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4248 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4249 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4250 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4251 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4252 * Makefile (tests): Add tst-cond22.
4253 * tst-cond22.c: New file.
4255 2006-09-05 Ulrich Drepper <drepper@redhat.com>
4258 * descr.h (struct pthread): Add parent_cancelhandling.
4259 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4260 cancelhandling value to child.
4261 * pthread_create.c (start_thread): If parent thread was canceled
4262 reset the SIGCANCEL mask.
4263 * Makefile (tests): Add tst-cancel25.
4264 * tst-cancel25.c: New file.
4266 2006-09-05 Jakub Jelinek <jakub@redhat.com>
4267 Ulrich Drepper <drepper@redhat.com>
4269 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4270 counterp if it is already zero.
4271 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4273 2006-03-04 Jakub Jelinek <jakub@redhat.com>
4274 Roland McGrath <roland@redhat.com>
4276 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4277 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4278 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4279 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4280 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4281 lll_robust_mutex_timedlock, lll_mutex_unlock,
4282 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4283 Add _L_*_ symbols around the subsection.
4284 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4285 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4287 2006-03-03 Jakub Jelinek <jakub@redhat.com>
4288 Roland McGrath <roland@redhat.com>
4290 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4291 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4292 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4293 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4294 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4295 lll_robust_mutex_timedlock, lll_mutex_unlock,
4296 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4297 Add _L_*_ symbols around the subsection.
4298 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4299 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4301 2006-08-31 Ulrich Drepper <drepper@redhat.com>
4303 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4304 change because it can disturb too much existing code. If real hard
4305 reader preference is needed we'll introduce another type.
4306 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4307 (pthread_rwlock_timedwrlock): Likewise.
4308 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4311 2006-08-30 Ulrich Drepper <drepper@redhat.com>
4313 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4315 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4316 (pthread_rwlock_timedwrlock): Likewise.
4317 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4320 2006-08-25 Jakub Jelinek <jakub@redhat.com>
4322 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4323 Only define ifdef SHARED.
4325 2006-08-23 Ulrich Drepper <drepper@redhat.com>
4327 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4328 (free_stacks): ...here.
4329 (__free_stack_cache): New function.
4330 * pthreadP.h: Declare __free_stack_cache.
4331 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4333 * init.c (pthread_functions): Initialize ptr_freeres.
4334 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4335 New freeres function.
4337 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4340 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4342 2006-08-20 Ulrich Drepper <drepper@redhat.com>
4344 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4345 _XOPEN_REALTIME_THREADS.
4347 2006-08-15 Jakub Jelinek <jakub@redhat.com>
4349 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4350 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4351 HAVE_CLOCK_GETTIME_VSYSCALL.
4352 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4354 2006-08-14 Jakub Jelinek <jakub@redhat.com>
4356 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4357 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4358 * descr.h (struct priority_protection_data): New type.
4359 (struct pthread): Add tpp field.
4360 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4361 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4362 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4363 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4365 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4366 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4367 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4368 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4370 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4372 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4373 * pthread_mutexattr_getprioceiling.c
4374 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4375 in the SCHED_FIFO priority range.
4376 * pthread_mutexattr_setprioceiling.c
4377 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4378 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4379 if mutex is not TPP. Ceiling is now in __data.__lock.
4380 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4381 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4382 is now in __data.__lock. Add locking.
4383 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4384 * Makefile (libpthread-routines): Add tpp.
4385 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4386 * tst-tpp.h: New file.
4387 * tst-mutexpp1.c: New file.
4388 * tst-mutexpp6.c: New file.
4389 * tst-mutexpp10.c: New file.
4390 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4391 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4393 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4396 * pthread_join.c (pthread_join): Account for self being canceled
4397 when checking for deadlocks.
4398 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4399 (tf1): Don't print anything after pthread_join returns, this would be
4400 another cancellation point.
4402 * tst-join6.c: New file.
4403 * Makefile (tests): Add tst-join6.
4405 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4408 * pthread_setspecific.c (__pthread_setspecific): Check
4409 out-of-range index before checking for unused key.
4411 * sysdeps/pthread/gai_misc.h: New file.
4413 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4415 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4416 file. Don't use sysctl.
4417 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4418 overwrite the file if this is likely not true.
4420 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4422 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4423 * Makefile (tests): Add tst-getpid3.
4424 * tst-getpid3.c: New file.
4426 2006-07-30 Roland McGrath <roland@redhat.com>
4428 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4430 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4431 (pause_not_cancel): New macro.
4432 (nanosleep_not_cancel): New macro.
4433 (sigsuspend_not_cancel): New macro.
4434 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4435 nanosleep_not_cancel macro from <not-cancel.h>.
4436 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4437 macro from <not-cancel.h>.
4439 2006-07-28 Ulrich Drepper <drepper@redhat.com>
4440 Jakub Jelinek <jakub@redhat.com>
4442 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4443 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4444 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4445 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4446 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4447 * pthread_mutex_lock.c: Likewise.
4448 * pthread_mutex_timedlock.c: Likewise.
4449 * pthread_mutex_trylock.c: Likewise.
4450 * pthread_mutex_unlock.c: Likewise.
4451 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4453 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4454 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4455 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4456 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4457 pthread-pi-defines.sym.
4458 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4459 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4460 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4461 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4462 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4463 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4464 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4465 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4466 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4467 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4468 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4469 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4470 * tst-mutex2.c: Likewise.
4471 * tst-mutex3.c: Likewise.
4472 * tst-mutex4.c: Likewise.
4473 * tst-mutex5.c: Likewise.
4474 * tst-mutex6.c: Likewise.
4475 * tst-mutex7.c: Likewise.
4476 * tst-mutex7a.c: Likewise.
4477 * tst-mutex8.c: Likewise.
4478 * tst-mutex9.c: Likewise.
4479 * tst-robust1.c: Likewise.
4480 * tst-robust7.c: Likewise.
4481 * tst-robust8.c: Likewise.
4482 * tst-mutexpi1.c: New file.
4483 * tst-mutexpi2.c: New file.
4484 * tst-mutexpi3.c: New file.
4485 * tst-mutexpi4.c: New file.
4486 * tst-mutexpi5.c: New file.
4487 * tst-mutexpi6.c: New file.
4488 * tst-mutexpi7.c: New file.
4489 * tst-mutexpi7a.c: New file.
4490 * tst-mutexpi8.c: New file.
4491 * tst-mutexpi9.c: New file.
4492 * tst-robust1.c: New file.
4493 * tst-robust2.c: New file.
4494 * tst-robust3.c: New file.
4495 * tst-robust4.c: New file.
4496 * tst-robust5.c: New file.
4497 * tst-robust6.c: New file.
4498 * tst-robust7.c: New file.
4499 * tst-robust8.c: New file.
4500 * Makefile (tests): Add the new tests.
4502 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4503 * pthread_mutex_destroy.c: Remove unneeded label.
4505 2006-07-01 Ulrich Drepper <drepper@redhat.com>
4507 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4508 computations to compile time.
4510 2006-06-04 Ulrich Drepper <drepper@redhat.com>
4512 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4514 2006-05-15 Ulrich Drepper <drepper@redhat.com>
4516 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4518 2006-05-11 Ulrich Drepper <drepper@redhat.com>
4520 * pthread_key_create.c (__pthread_key_create): Do away with
4521 __pthread_keys_lock.
4523 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4524 (__kernel_cpumask_size): Mark as hidden.
4525 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4527 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4528 * semaphoreP.h (__sem_mappings_lock): Likewise.
4530 2006-05-10 Ulrich Drepper <drepper@redhat.com>
4532 * pthread_atfork.c: Mark __dso_handle as hidden.
4534 2006-05-09 Ulrich Drepper <drepper@redhat.com>
4537 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4538 the reload problem. Change the one path in pthread_cancel_init
4539 which causes the problem. Force gcc to reload. Simplify callers.
4540 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4541 (_Unwind_GetBSP): Undo last patch.
4543 2006-05-07 Ulrich Drepper <drepper@redhat.com>
4545 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4546 function pointer is reloaded after pthread_cancel_init calls.
4549 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4550 pointers are reloaded after pthread_cancel_init calls.
4552 2006-05-01 Ulrich Drepper <drepper@redhat.com>
4554 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4557 2006-04-27 Ulrich Drepper <drepper@redhat.com>
4559 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4560 Allocate new object which is passed to timer_sigev_thread so that
4561 the timer can be deleted before the new thread is scheduled.
4563 2006-04-26 Roland McGrath <roland@redhat.com>
4565 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4567 2006-04-08 Ulrich Drepper <drepper@redhat.com>
4569 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4570 suffix for conditional jumps.
4571 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4572 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4573 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4574 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4575 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4576 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4578 * init.c (sigcancel_handler): Compare with correct PID even if the
4579 thread is in the middle of a fork call.
4580 (sighandler_setxid): Likewise.
4581 Reported by Suzuki K P <suzuki@in.ibm.com> .
4583 2006-04-07 Jakub Jelinek <jakub@redhat.com>
4585 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4587 2006-04-06 Ulrich Drepper <drepper@redhat.com>
4589 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4590 fails [Coverity CID 105].
4592 2006-04-05 Ulrich Drepper <drepper@redhat.com>
4594 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4596 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4599 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4600 Define __lll_rel_instr using lwsync.
4602 2006-03-27 Ulrich Drepper <drepper@redhat.com>
4604 * allocatestack.c (allocate_stack): Always initialize robust_head.
4605 * descr.h: Define struct robust_list_head.
4606 (struct pthread): Use robust_list_head in robust mutex list definition.
4607 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4608 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4609 (__pthread_initialize_minimal_internal): Register robust_list with
4611 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4612 Declare __set_robust_list_avail.
4613 * pthread_create.c (start_thread): Register robust_list of new thread.
4614 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4616 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4617 number of users, it's unreliable.
4618 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4619 set_robust_list syscall is available.
4620 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4621 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4622 Set robust_head.list_op_pending before trying to lock a robust mutex.
4623 * pthread_mutex_timedlock.c: Likewise.
4624 * pthread_mutex_trylock.c: Likewise.
4625 * pthread_mutex_unlock.c: Likewise for unlocking.
4626 * Makefile (tests): Add tst-robust8.
4627 * tst-robust8.c: New file.
4629 2006-03-08 Andreas Schwab <schwab@suse.de>
4631 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4632 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4634 2006-03-05 Roland McGrath <roland@redhat.com>
4636 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4637 and $config_os doesn't match *linux*.
4639 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
4641 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4642 Use __syscall_error.
4643 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4644 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4645 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4646 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4647 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4648 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4650 2006-03-02 Ulrich Drepper <drepper@redhat.com>
4652 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4654 2006-03-01 Ulrich Drepper <drepper@redhat.com>
4656 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4657 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4659 (__lll_robust_timedlock_wait): Likewise.
4660 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4661 (__lll_robust_lock_wait): Likewise.
4662 (__lll_robust_timedlock_wait): Likewise.
4663 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4664 (__lll_robust_lock_wait): Likewise.
4665 (__lll_robust_timedlock_wait): Likewise.
4667 2006-03-01 Jakub Jelinek <jakub@redhat.com>
4669 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4670 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4671 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4672 lll_robust_mutex_unlock): Define.
4673 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4675 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4677 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4678 instead of <clone.S>.
4680 2006-02-27 Jakub Jelinek <jakub@redhat.com>
4682 * Makefile (libpthread-routines): Add
4683 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4684 and pthread_mutex_[sg]etprioceiling.
4685 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4686 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4687 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4688 pthread_mutex_setprioceiling.
4689 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4690 PTHREAD_PRIO_PROTECT): New enum values.
4691 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4692 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4693 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4695 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4696 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4697 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4699 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4700 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4701 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4702 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4703 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4704 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4705 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4707 * pthread_mutex_getprioceiling.c: New file.
4708 * pthread_mutex_setprioceiling.c: New file.
4709 * pthread_mutexattr_getprioceiling.c: New file.
4710 * pthread_mutexattr_setprioceiling.c: New file.
4711 * pthread_mutexattr_getprotocol.c: New file.
4712 * pthread_mutexattr_setprotocol.c: New file.
4714 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4716 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4718 2006-02-27 Roland McGrath <roland@redhat.com>
4720 * sysdeps/pthread/Subdirs: List nptl here too.
4721 * configure (libc_add_on_canonical): New variable.
4723 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4725 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4726 self to get main source tree's file.
4727 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4728 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4729 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4730 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4731 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4732 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4733 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4734 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4735 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4736 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4737 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4738 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4739 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4741 * Makefile: Use $(sysdirs) in vpath directive.
4743 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4744 (CPPFLAGS-timer_routines.c): Likewise.
4746 * Makeconfig (includes): Variable removed.
4748 2006-02-26 Roland McGrath <roland@redhat.com>
4750 * sysdeps/generic/pt-raise.c: Moved to ...
4751 * pt-raise.c: ... here.
4752 * sysdeps/generic/lowlevellock.h: Moved to ...
4753 * lowlevellock.h: ... here.
4755 2006-02-23 Roland McGrath <roland@redhat.com>
4757 * descr.h (struct pthread): Add final member `end_padding'.
4758 (PTHREAD_STRUCT_END_PADDING): Use it.
4760 2006-02-20 Roland McGrath <roland@redhat.com>
4762 * sysdeps/mips: Directory removed, saved in ports repository.
4763 * sysdeps/unix/sysv/linux/mips: Likewise.
4765 2006-02-18 Ulrich Drepper <drepper@redhat.com>
4767 * tst-robust1.c: Add second mutex to check that the mutex list is
4770 2006-02-17 Jakub Jelinek <jakub@redhat.com>
4772 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4773 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4774 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4775 lll_robust_mutex_unlock): New macros.
4776 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4777 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4778 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4779 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4780 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4782 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4784 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4786 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4788 2006-02-17 Ulrich Drepper <drepper@redhat.com>
4790 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4791 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4792 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4793 (lll_robust_mutex_unlock): Likewise.
4795 2006-02-13 Jakub Jelinek <jakub@redhat.com>
4797 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4798 Set robust_list.__next rather than robust_list.
4799 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4800 (__pthread_list_t): New typedef.
4801 (pthread_mutex_t): Replace __next and __prev fields with __list.
4802 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4803 (__pthread_list_t): New typedef.
4804 (pthread_mutex_t): Replace __next and __prev fields with __list.
4805 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4806 (__pthread_list_t, __pthread_slist_t): New typedefs.
4807 (pthread_mutex_t): Replace __next and __prev fields with __list.
4808 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4809 (__pthread_list_t, __pthread_slist_t): New typedefs.
4810 (pthread_mutex_t): Replace __next and __prev fields with __list.
4811 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4812 (__pthread_list_t, __pthread_slist_t): New typedefs.
4813 (pthread_mutex_t): Replace __next and __prev fields with __list.
4814 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4815 (__pthread_slist_t): New typedef.
4816 (pthread_mutex_t): Replace __next field with __list.
4818 2006-02-15 Ulrich Drepper <drepper@redhat.com>
4820 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4821 PTHREAD_MUTEX_OWNERDEAD.
4822 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4823 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4824 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4825 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4826 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4827 to PTHREAD_MUTEX_INCONSISTENT.
4828 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4829 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4830 * pthread_mutex_trylock.c: Likewise.
4831 * pthread_mutex_timedlock.c: Likewise.
4832 * pthread_mutex_unlock.c: Likewise.
4833 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4834 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4835 lowlevelrobustlock.sym.
4836 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4837 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4839 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4840 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4841 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4842 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4843 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4845 2006-02-12 Ulrich Drepper <drepper@redhat.com>
4847 * allocatestack.c (allocate_stack): Initialize robust_list.
4848 * init.c (__pthread_initialize_minimal_internal): Likewise.
4849 * descr.h (struct xid_command): Pretty printing.
4850 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4851 robust_list. Adjust macros.
4852 * pthread_create.c (start_thread): Adjust robust_list handling.
4853 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4854 but the owner for all robust mutex types.
4855 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4856 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
4857 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4858 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4860 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4861 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4863 2006-02-08 Jakub Jelinek <jakub@redhat.com>
4865 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4866 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4868 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4870 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4872 (lll_futex_timed_wait): Define.
4874 2006-01-19 Ulrich Drepper <drepper@redhat.com>
4876 * tst-cancel4.c: Test ppoll.
4878 2006-01-18 Andreas Jaeger <aj@suse.de>
4881 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4882 (pthread_mutex_t): Follow changes for other archs. Based on patch
4883 by Jim Gifford <patches@jg555.com>.
4885 2006-01-13 Richard Henderson <rth@redhat.com>
4887 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4889 2006-01-10 Roland McGrath <roland@redhat.com>
4891 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4892 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4893 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4894 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4895 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4896 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4897 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4898 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4899 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4900 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4902 2006-01-09 Roland McGrath <roland@redhat.com>
4904 * tst-initializers1-c89.c: New file.
4905 * tst-initializers1-c99.c: New file.
4906 * tst-initializers1-gnu89.c: New file.
4907 * tst-initializers1-gnu99.c: New file.
4908 * Makefile (tests): Add them.
4909 (CFLAGS-tst-initializers1-c89.c): New variable.
4910 (CFLAGS-tst-initializers1-c99.c): New variable.
4911 (CFLAGS-tst-initializers1-gnu89.c): New variable.
4912 (CFLAGS-tst-initializers1-gnu99.c): New variable.
4914 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4915 Use __extension__ on anonymous union definition.
4916 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4917 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4918 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4919 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4920 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4922 2006-01-08 Jakub Jelinek <jakub@redhat.com>
4924 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4925 Don't give the union a name because it changes the mangled name.
4926 Instead name the struct for __data.
4927 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4929 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4932 2006-01-09 Jakub Jelinek <jakub@redhat.com>
4934 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4935 stack bias to mc_ftp field.
4937 2006-01-07 Ulrich Drepper <drepper@redhat.com>
4939 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4940 being too clever and reloading the futex value where it shouldn't.
4942 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4944 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4947 2006-01-06 Jakub Jelinek <jakub@redhat.com>
4949 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4952 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4954 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4955 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4956 rename in tcbhead_t.
4958 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4959 Don't give the union a name because it changes the mangled name.
4960 Instead name the struct for __data.
4961 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4962 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4963 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4964 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4965 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4966 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4968 2006-01-05 Ulrich Drepper <drepper@redhat.com>
4970 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4972 (lll_futex_timed_wait): Define.
4973 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4974 * sysdeps/pthread/aio_misc.h: New file.
4976 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4978 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4980 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4982 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4983 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4984 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4986 2006-01-04 Ulrich Drepper <drepper@redhat.com>
4988 * tst-cancel24.cc: Use C headers instead of C++ headers.
4990 2006-01-03 Jakub Jelinek <jakub@redhat.com>
4992 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4993 sparc-linux configured glibc.
4994 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4995 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4996 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4997 atomic_compare_and_exchange_val_24_acq instead of
4998 atomic_compare_and_exchange_val_acq.
4999 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
5000 instead of atomic_exchange_rel.
5001 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
5002 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
5004 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
5006 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
5007 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
5008 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
5009 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
5010 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
5011 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
5013 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
5015 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
5016 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
5017 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
5019 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
5021 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
5023 2006-01-03 Ulrich Drepper <drepper@redhat.com>
5025 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
5028 2006-01-02 Jakub Jelinek <jakub@redhat.com>
5030 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
5031 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5032 THREAD_COPY_POINTER_GUARD): Define.
5033 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
5034 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
5036 2006-01-01 Ulrich Drepper <drepper@redhat.com>
5038 * version.c: Update copyright year.
5040 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5042 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
5043 .eh_frame section, use cfi_* directives.
5044 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5046 2005-12-30 Ulrich Drepper <drepper@redhat.com>
5048 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5051 2005-12-29 Ulrich Drepper <drepper@redhat.com>
5053 * sysdeps/pthread/sigaction.c: Removed.
5054 * sigaction.c: New file.
5055 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5057 2005-12-28 Ulrich Drepper <drepper@redhat.com>
5059 * Makefile (tests): Add tst-signal7.
5060 * tst-signal7.c: New file.
5062 2005-12-27 Roland McGrath <roland@redhat.com>
5064 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5065 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5066 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5067 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5068 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5069 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5070 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5071 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5072 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5073 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5074 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5076 2005-12-27 Jakub Jelinek <jakub@redhat.com>
5078 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5079 and __prev field to pthread_mutex_t.
5080 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5081 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5082 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5083 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5084 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5087 2005-12-26 Ulrich Drepper <drepper@redhat.com>
5089 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5090 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5091 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5092 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5093 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5094 and PTHREAD_MUTEXATTR_FLAG_BITS.
5095 * descr.h (struct pthread): Add robust_list field and define
5096 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5097 * pthread_mutexattr_getrobust.c: New file.
5098 * pthread_mutexattr_setrobust.c: New file.
5099 * pthread_mutex_consistent.c: New file.
5100 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5101 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5102 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5103 Adjust pthread_mutex_t initializers.
5104 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5105 field to pthread_mutex_t.
5106 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5107 and __prev field to pthread_mutex_t.
5108 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5109 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5110 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5111 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5112 * pthread_mutexattr_gettype.c: Likewise.
5113 * pthread_mutexattr_setpshared.c: Likewise.
5114 * pthread_mutexattr_settype.c: Likewise.
5115 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5116 Initialize mutex kind according to robust flag.
5117 * pthread_mutex_lock.c: Implement local robust mutex.
5118 * pthread_mutex_timedlock.c: Likewise.
5119 * pthread_mutex_trylock.c: Likewise.
5120 * pthread_mutex_unlock.c: Likewise.
5121 * pthread_create.c (start_thread): Mark robust mutexes which remained
5123 * tst-robust1.c: New file.
5124 * tst-robust2.c: New file.
5125 * tst-robust3.c: New file.
5126 * tst-robust4.c: New file.
5127 * tst-robust5.c: New file.
5128 * tst-robust6.c: New file.
5129 * tst-robust7.c: New file.
5130 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5131 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5132 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5133 tst-robust5, tst-robust6, and tst-robust7.
5135 * tst-typesizes.c: New file.
5136 * Makefile (tests): Add tst-typesizes.
5138 * tst-once3.c: More debug output.
5140 2005-12-24 Ulrich Drepper <drepper@redhat.com>
5142 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5143 missing after last change.
5145 * version.c: Update copyright year.
5147 2005-12-23 Ulrich Drepper <drepper@redhat.com>
5149 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5150 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5151 * pthread_mutex_trylock.c: Likewise.
5152 * pthread_mutex_timedlock.c: Likewise.
5153 * pthread_mutex_unlock.c: Likewise.
5155 2005-12-22 Roland McGrath <roland@redhat.com>
5157 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5158 so that #include_next's search location is not reset to the -I..
5159 directory where <nptl/...> can be found.
5161 2005-12-22 Ulrich Drepper <drepper@redhat.com>
5164 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5165 Fix unwind info. Remove useless branch prediction prefix.
5166 * tst-cancel24.cc: New file.
5167 * Makefile: Add rules to build and run tst-cancel24.
5169 2005-12-21 Roland McGrath <roland@redhat.com>
5171 * libc-cancellation.c: Use <> rather than "" #includes.
5172 * pt-cleanup.c: Likewise.
5173 * pthread_create.c: Likewise.
5174 * pthread_join.c: Likewise.
5175 * pthread_timedjoin.c: Likewise.
5176 * pthread_tryjoin.c: Likewise.
5177 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5178 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5179 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5180 * unwind.c: Likewise.
5182 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5184 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5185 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5186 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5187 THREAD_COPY_POINTER_GUARD): Define.
5189 2005-12-19 Jakub Jelinek <jakub@redhat.com>
5191 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5193 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5194 THREAD_COPY_POINTER_GUARD): Define.
5195 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5196 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5197 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5198 THREAD_COPY_POINTER_GUARD): Define.
5199 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5200 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5201 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5202 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5203 Use PTR_DEMANGLE for B0 if defined.
5205 2005-12-17 Ulrich Drepper <drepper@redhat.com>
5207 * pthread_create.c (__pthread_create_2_1): Use
5208 THREAD_COPY_POINTER_GUARD if available.
5209 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5210 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5211 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5212 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5213 * sysdeps/x86_64/tls.h: Likewise.
5215 2005-12-15 Roland McGrath <roland@redhat.com>
5217 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5219 2005-12-13 Ulrich Drepper <drepper@redhat.com>
5221 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5223 * errno-loc.c: New file.
5225 2005-12-12 Roland McGrath <roland@redhat.com>
5227 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5228 adjustments before choosing stack size. Update minimum stack size
5229 calculation to match allocate_stack change.
5231 2005-12-12 Ulrich Drepper <drepper@redhat.com>
5233 * allocatestack.c (allocate_stack): Don't demand that there is an
5234 additional full page available on the stack beside guard, TLS, the
5237 2005-11-24 Ulrich Drepper <drepper@redhat.com>
5239 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5240 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5242 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5243 compiling 32-bit code we must define __cleanup_fct_attribute.
5245 005-11-24 Jakub Jelinek <jakub@redhat.com>
5248 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5249 __attribute__ instead of __attribute.
5250 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5251 (__cleanup_fct_attribute): Likewise.
5253 2005-11-17 Jakub Jelinek <jakub@redhat.com>
5255 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5256 a write barrier before writing libgcc_s_getcfa.
5258 2005-11-06 Ulrich Drepper <drepper@redhat.com>
5260 * sysdeps/unix/sysv/linux/configure: Removed.
5262 2005-11-05 Ulrich Drepper <drepper@redhat.com>
5264 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5265 optional init_array/fini_array support.
5267 2005-10-24 Roland McGrath <roland@redhat.com>
5269 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5270 versioned_symbol use.
5272 2005-10-16 Roland McGrath <roland@redhat.com>
5274 * init.c (__pthread_initialize_minimal_internal): Even when using a
5275 compile-time default stack size, apply the minimum that allocate_stack
5276 will require, and round up to page size.
5278 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5280 * Makefile ($(test-modules)): Remove static pattern rule.
5282 2005-10-14 Jakub Jelinek <jakub@redhat.com>
5283 Ulrich Drepper <drepper@redhat.com>
5285 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5286 alignment in callback function.
5287 * Makefile: Add rules to build and run tst-align3.
5288 * tst-align3.c: New file.
5290 2005-10-03 Jakub Jelinek <jakub@redhat.com>
5292 * allocatestack.c (setxid_signal_thread): Add
5293 INTERNAL_SYSCALL_DECL (err).
5295 2005-10-02 Jakub Jelinek <jakub@redhat.com>
5297 * allocatestack.c (setxid_signal_thread): Need to use
5298 atomic_compare_and_exchange_bool_acq.
5300 2005-10-01 Ulrich Drepper <drepper@redhat.com>
5301 Jakub Jelinek <jakub@redhat.com>
5303 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5305 (struct pthread): Move specific_used field to avoid padding.
5306 Add setxid_futex field.
5307 * init.c (sighandler_setxid): Reset setxid flag and release the
5309 * allocatestack.c (setxid_signal_thread): New function. Broken
5310 out of the bodies of the two loops in __nptl_setxid. For undetached
5311 threads check whether they are exiting and if yes, don't send a signal.
5312 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5313 * pthread_create.c (start_thread): For undetached threads, check
5314 whether setxid bit is set. If yes, wait until signal has been
5317 * allocatestack.c (STACK_VARIABLES): Initialize them.
5318 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5320 2004-09-02 Jakub Jelinek <jakub@redhat.com>
5322 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5323 waiters, awake all waiters on the associated mutex.
5325 2005-09-22 Roland McGrath <roland@redhat.com>
5327 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5328 ../sysdeps/x86_64/hp-timing.h).
5330 2005-08-29 Jakub Jelinek <jakub@redhat.com>
5332 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5333 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5334 (lll_futex_wake_unlock): Define.
5335 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5336 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5337 (lll_futex_wake_unlock): Define.
5338 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5339 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5340 (lll_futex_wake_unlock): Define.
5341 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5342 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5343 (lll_futex_wake_unlock): Define.
5344 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5345 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5346 (lll_futex_wake_unlock): Define.
5347 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5348 lll_futex_wake_unlock.
5349 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5350 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5351 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5352 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5353 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5354 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5356 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5358 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5359 Fix typo in register name.
5361 2005-08-23 Ulrich Drepper <drepper@redhat.com>
5363 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5364 Use __sigfillset. Document that sigfillset does the right thing wrt
5367 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5370 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5371 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5372 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5373 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5374 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5375 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5377 * Makefile (tests): Add tst-initializers1.
5378 (CFLAGS-tst-initializers1.c): Set.
5379 * tst-initializers1.c: New test.
5381 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5383 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5384 Make sure __flags are located at offset 48 from the start of the
5387 2005-07-02 Roland McGrath <roland@redhat.com>
5389 * Makeconfig: Comment fix.
5391 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5393 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5394 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5395 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5396 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5397 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5398 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5399 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5400 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5401 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5402 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5404 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5406 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5407 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5408 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5410 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5411 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5412 field. Put in sysinfo field unconditionally.
5413 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5414 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5415 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5416 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5418 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5419 * pthread_create.c (__pthread_create_2_1): Use
5420 THREAD_COPY_STACK_GUARD macro.
5421 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5423 * tst-stackguard1.c: New file.
5424 * tst-stackguard1-static.c: New file.
5426 2005-06-14 Alan Modra <amodra@bigpond.net.au>
5428 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5429 Invoke CGOTSETUP and CGOTRESTORE.
5430 (CGOTSETUP, CGOTRESTORE): Define.
5432 2005-05-29 Richard Henderson <rth@redhat.com>
5434 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5435 (tf_write, tf_writev): Use it.
5436 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5439 2005-05-23 Jakub Jelinek <jakub@redhat.com>
5441 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5442 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5443 __librt_*_asynccancel@local.
5445 2005-05-17 Alan Modra <amodra@bigpond.net.au>
5447 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5448 all occurrences of JUMPTARGET. Instead append @local to labels.
5450 2005-05-20 Jakub Jelinek <jakub@redhat.com>
5452 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5453 size/alignment of struct pthread rather than tcbhead_t.
5454 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5456 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5458 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5461 2005-05-19 Richard Henderson <rth@redhat.com>
5463 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5464 __sync_val_compare_and_swap, not explicit _si variant.
5465 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5467 2005-05-03 Ulrich Drepper <drepper@redhat.com>
5470 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5472 2005-05-03 Jakub Jelinek <jakub@redhat.com>
5474 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5475 .eh_frame section, use cfi_* directives.
5477 2005-04-27 Jakub Jelinek <jakub@redhat.com>
5479 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5482 2005-04-27 Ulrich Drepper <drepper@redhat.com>
5485 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5488 2005-04-27 Roland McGrath <roland@redhat.com>
5490 * Makefile (tests): Remove tst-clock2.
5492 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5493 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5494 translating to the kernel clockid_t for our own process/thread clock.
5496 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5498 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5500 * old_pthread_cond_init.c: Include <errno.h>.
5501 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5502 process shared or uses clock other than CLOCK_REALTIME.
5503 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5505 2005-04-13 David S. Miller <davem@davemloft.net>
5507 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5508 * sysdeps/sparc/sparc64/clone.S: New file.
5510 2005-04-05 Jakub Jelinek <jakub@redhat.com>
5513 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5514 __inline instead of inline.
5515 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5517 2005-03-31 Jakub Jelinek <jakub@redhat.com>
5519 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5520 functionally equivalent, but shorter instructions.
5521 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5522 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5523 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5525 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5526 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5527 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5528 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5529 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5530 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5531 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5533 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5534 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5535 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5536 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5537 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5539 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5541 * sysdeps/mips/Makefile: New file.
5542 * sysdeps/mips/nptl-sysdep.S: New file.
5543 * sysdeps/mips/tcb-offsets.sym: New file.
5544 * sysdeps/mips/pthread_spin_lock.S: New file.
5545 * sysdeps/mips/pthread_spin_trylock.S: New file.
5546 * sysdeps/mips/pthreaddef.h: New file.
5547 * sysdeps/mips/tls.h: New file.
5548 * sysdeps/mips/jmpbuf-unwind.h: New file.
5549 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5550 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5551 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5552 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5553 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5554 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5555 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5556 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5557 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5558 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5560 2005-03-23 Ulrich Drepper <drepper@redhat.com>
5563 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5566 2005-03-10 Jakub Jelinek <jakub@redhat.com>
5568 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5570 2005-02-25 Roland McGrath <roland@redhat.com>
5572 * alloca_cutoff.c: Correct license text.
5573 * tst-unload.c: Likewise.
5574 * sysdeps/pthread/allocalim.h: Likewise.
5575 * sysdeps/pthread/pt-initfini.c: Likewise.
5576 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5577 * sysdeps/pthread/bits/sigthread.h: Likewise.
5578 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5579 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5581 2005-02-16 Roland McGrath <roland@redhat.com>
5583 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5584 Use unsigned int * for ptr_nthreads.
5586 2005-02-14 Alan Modra <amodra@bigpond.net.au>
5589 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5592 2005-02-07 Richard Henderson <rth@redhat.com>
5595 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5598 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
5600 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5601 order of arguments in invocation of atomic_add_zero.
5603 2005-01-26 Jakub Jelinek <jakub@redhat.com>
5606 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5607 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5608 at least gotntpoff relocation and addition.
5609 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5611 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5613 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5616 2005-01-06 Ulrich Drepper <drepper@redhat.com>
5618 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5619 entry for static tls deallocation fix.
5620 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5621 also contains information whether the memory pointed to is static
5623 * sysdeps/i386/tls.h: Likewise.
5624 * sysdeps/ia64/tls.h: Likewise.
5625 * sysdeps/powerpc/tls.h: Likewise.
5626 * sysdeps/s390/tls.h: Likewise.
5627 * sysdeps/sh/tls.h: Likewise.
5628 * sysdeps/sparc/tls.h: Likewise.
5629 * sysdeps/x86_64/tls.h: Likewise.
5631 2004-12-27 Ulrich Drepper <drepper@redhat.com>
5633 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5635 2004-12-21 Jakub Jelinek <jakub@redhat.com>
5637 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5639 * Makefile (tests): Add tst-align2.
5640 * tst-align2.c: New test.
5641 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5642 -mpreferred-stack-boundary=4.
5644 2004-12-18 Roland McGrath <roland@redhat.com>
5646 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5647 New file removed withdrawn for the moment.
5649 2004-12-17 Richard Henderson <rth@redhat.com>
5651 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5652 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5654 2004-12-16 Ulrich Drepper <drepper@redhat.com>
5656 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5657 Increased PTHREAD_STACK_MIN.
5659 * tst-context1.c (stacks): Use bigger stack size.
5661 2004-12-16 Jakub Jelinek <jakub@redhat.com>
5663 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5664 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5666 2004-12-15 Jakub Jelinek <jakub@redhat.com>
5668 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5669 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5670 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5672 2004-12-15 Ulrich Drepper <drepper@redhat.com>
5674 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5676 2004-12-14 Ulrich Drepper <drepper@redhat.com>
5678 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5679 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5681 * tst-getpid1.c: If child crashes, report this first. Print which
5684 2004-12-09 Ulrich Drepper <drepper@redhat.com>
5686 * init.c (__pthread_initialize_minimal_internal): Also unblock
5689 2004-12-01 Jakub Jelinek <jakub@redhat.com>
5691 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5692 _POSIX_THREAD_CPUTIME): Define to 0.
5693 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5694 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5695 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5696 __timer_signal_thread_tclk): Remove.
5697 (init_module): Remove their initialization.
5698 (thread_cleanup): Remove their cleanup assertions.
5699 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5700 __timer_signal_thread_tclk): Remove.
5701 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5702 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5703 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5705 2004-12-07 Jakub Jelinek <jakub@redhat.com>
5707 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5708 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5710 * Makefile (tests): Add tst-getpid2.
5711 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5712 (do_test): Use it. Use __clone2 instead of clone on ia64.
5713 * tst-getpid2.c: New test.
5715 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5717 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5719 2004-12-04 Ulrich Drepper <drepper@redhat.com>
5721 * Makefile (tests): Add tst-getpid1.
5722 * tst-getpid1.c: New file.
5723 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5724 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5726 2004-12-02 Roland McGrath <roland@redhat.com>
5728 * Makefile (libpthread-nonshared): Variable removed.
5729 ($(objpfx)libpthread_nonshared.a): Target removed.
5730 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5731 These are now handled by generic magic from
5732 libpthread-static-only-routines being set.
5734 2004-11-27 Ulrich Drepper <drepper@redhat.com>
5736 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5737 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5738 _POSIX_THREAD_PRIO_PROTECT): Define.
5739 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5740 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5741 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5743 2004-11-26 Jakub Jelinek <jakub@redhat.com>
5745 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5746 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5747 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5748 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5749 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5750 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5751 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5753 2004-11-24 Ulrich Drepper <drepper@redhat.com>
5755 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5757 * Makefile (libpthread-routines): Add pthread_setschedprio.
5758 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5759 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5760 * pthread_setschedprio.c: New file.
5762 2004-11-20 Jakub Jelinek <jakub@redhat.com>
5764 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5765 * pthread_cancel.c (pthread_create): Likewise.
5767 * Makefile (libpthread-routines): Add vars.
5768 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5769 * init.c (__default_stacksize, __is_smp): Remove.
5771 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5772 and define a wrapper macro.
5773 (PTHREAD_STATIC_FN_REQUIRE): Define.
5774 * allocatestack.c (__find_thread_by_id): Undefine.
5775 * pthread_create (__pthread_keys): Remove.
5776 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5777 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5778 PTHREAD_STATIC_FN_REQUIRE.
5780 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5782 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5783 parameter to REGISTER macro.
5785 2004-11-17 Roland McGrath <roland@redhat.com>
5787 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5788 Make sure SIGCANCEL is blocked as well.
5790 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5792 * sysdeps/pthread/setxid.h: New file.
5793 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5794 (struct xid_command): Add forward decl.
5795 (struct pthread_functions): Change return type of __nptl_setxid hook
5797 * pthreadP.h (__nptl_setxid): Change return type to int.
5798 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5799 calling thread, return its return value and set errno on failure.
5800 * descr.h (struct xid_command): Change id type to long array.
5802 * Makefile: Add rules to build and test tst-setuid1 and
5804 * tst-setuid1.c: New test.
5805 * tst-setuid1-static.c: New test.
5807 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5809 * Makefile (tests): Add tst-exit3.
5810 * tst-exit3.c: New test.
5812 2004-11-09 Ulrich Drepper <drepper@redhat.com>
5814 * Makefile (tests): Add tst-exit2.
5815 * tst-exit2.c: New file.
5817 2004-11-09 Roland McGrath <roland@redhat.com>
5820 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5821 here, before calling clone.
5822 * pthread_create.c (start_thread): Don't do it here.
5824 2004-11-02 Jakub Jelinek <jakub@redhat.com>
5826 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5828 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5830 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5831 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5834 2004-10-28 Jakub Jelinek <jakub@redhat.com>
5836 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5837 if sched_priority is not between minprio and maxprio.
5839 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5841 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5842 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5844 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5845 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5847 2004-10-24 Ulrich Drepper <drepper@redhat.com>
5849 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5850 not-cancelable I/O functions.
5852 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5854 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5855 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5856 make sure 2 is stored in the futex and we looked at the old value.
5857 Fix a few other problems to return the correct value.
5859 2004-10-14 Richard Henderson <rth@redhat.com>
5861 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5864 2004-10-06 Jakub Jelinek <jakub@redhat.com>
5866 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5867 of pthread-functions.h and pthreaddef.h.
5868 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5870 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5871 Change __data.__nwaiters from int to unsigned int.
5873 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5874 sysconf (_SC_THREAD_CPUTIME) returns negative value.
5876 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5879 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5880 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5882 2004-10-06 Ulrich Drepper <drepper@redhat.com>
5884 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
5885 test fails, remove message queue.
5886 (tf_msgsnd): Likewise.
5888 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5890 * tst-clock1.c: Change #ifdef to #if defined.
5891 * tst-clock2.c: Likewise.
5892 * tst-cond11.c: Likewise.
5894 * sysdeps/pthread/timer_create.c (timer_create): Use
5895 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5896 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5899 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5901 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5902 _POSIX_THREAD_CPUTIME): Define to 0.
5904 2004-10-04 Ulrich Drepper <drepper@redhat.com>
5906 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5907 and _POSIX_THREAD_CPUTIME to zero.
5908 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5909 * tst-barrier2.c: Fix testing for POSIX feature.
5910 * tst-clock1.c: Likewise.
5911 * tst-clock2.c: Likewise.
5912 * tst-cond11.c: Likewise.
5913 * tst-cond4.c: Likewise.
5914 * tst-cond6.c: Likewise.
5915 * tst-flock2.c: Likewise.
5916 * tst-mutex4.c: Likewise.
5917 * tst-mutex9.c: Likewise.
5918 * tst-rwlock12.c: Likewise.
5919 * tst-rwlock4.c: Likewise.
5920 * tst-signal1.c: Likewise.
5921 * tst-spin2.c: Likewise.
5922 * sysdeps/pthread/posix-timer.h: Likewise.
5923 * sysdeps/pthread/timer_create.c: Likewise.
5924 * sysdeps/pthread/timer_routines.c: Likewise.
5926 2004-10-01 Ulrich Drepper <drepper@redhat.com>
5928 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5929 (__lll_mutex_timedlock_wait): Address futex correctly.
5931 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5932 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5933 make sure 2 is stored in the futex and we looked at the old value.
5934 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5935 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5936 which might very well made the code not working at all before.
5939 2004-09-28 Ulrich Drepper <drepper@redhat.com>
5941 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5942 allow SIGSETXID to be sent.
5943 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5944 for SIGSETXID to be defined.
5945 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5946 SIGSETXID cannot be blocked.
5948 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5949 Add __extension__ to long long types.
5950 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5951 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5952 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5953 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5954 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5955 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5956 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5958 2004-09-25 Ulrich Drepper <drepper@redhat.com>
5960 * descr.h (struct pthread): Add stopped_start field.
5961 * sysdeps/pthread/createthread.c (create_thread): Set
5962 start_stopped flag in descriptor for new thread appropriately.
5963 * pthread_create.c (start_thread): Only take lock to be stopped on
5964 startup if stopped_start flag says so.
5966 2004-09-24 Ulrich Drepper <drepper@redhat.com>
5968 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5969 is created detached and if yes, do not try to free the stack in case
5970 the thread creation failed.
5971 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5972 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5973 case there has been no error. [BZ #405]
5975 * pthread_create.c (start_thread): Don't wait for scheduler data
5976 etc to be set at the beginning of the function. The cancellation
5977 infrastructure must have been set up. And enable async
5978 cancellation before potentially going to sleep. [BZ #401]
5980 2004-09-20 Ulrich Drepper <drepper@redhat.com>
5982 * Versions: Remove exports for pthread_set*id_np functions.
5983 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5985 * Makefile: Don't build pthread_set*id code for now.
5987 2004-09-19 Ulrich Drepper <drepper@redhat.com>
5989 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5991 * allocatestack.c (__nptl_setxid): New function.
5992 * descr.h (struct xid_command): Define type.
5993 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5994 (sighandler_setxid): New function.
5995 (__pthread_initialize_minimal): Register sighandler_setxid for
5997 * pt-allocrtsig.c: Update comment.
5998 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
5999 Declare __nptl_setxid.
6000 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
6001 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
6002 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6003 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6004 and pthread_setresuid_np.
6005 * pthread_setgid_np.c: New file.
6006 * pthread_setuid_np.c: New file.
6007 * pthread_setegid_np.c: New file.
6008 * pthread_seteuid_np.c: New file.
6009 * pthread_setregid_np.c: New file.
6010 * pthread_setreuid_np.c: New file.
6011 * pthread_setresgid_np.c: New file.
6012 * pthread_setresuid_np.c: New file.
6013 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
6014 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6015 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6016 and pthread_setresuid_np.
6017 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
6018 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
6019 pthread_setregid, and pthread_setresgid.
6021 2004-09-18 Ulrich Drepper <drepper@redhat.com>
6023 * allocatestack.c (allocate_stack): Return EAGAIN instead of
6024 ENOMEM when out of memory.
6026 2004-09-10 Roland McGrath <roland@redhat.com>
6029 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
6030 code, since we don't try to use the broken CLONE_STOPPED any more.
6031 * pthread_create.c (start_thread): Likewise.
6033 2004-09-15 Richard Henderson <rth@redhat.com>
6035 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
6037 2004-09-01 David Mosberger <davidm@hpl.hp.com>
6039 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
6040 (__libc_unwind_longjmp): Delete macro and declare as function.
6041 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
6042 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
6044 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
6045 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6046 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6048 2004-09-12 Ulrich Drepper <drepper@redhat.com>
6050 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6052 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6053 types also for __USE_XOPEN2K.
6054 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6055 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6056 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6057 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6058 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6059 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6060 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6063 2004-09-08 Ulrich Drepper <drepper@redhat.com>
6065 * sysdeps/pthread/pthread.h
6066 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6067 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6068 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6069 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6072 2004-09-07 Ulrich Drepper <drepper@redhat.com>
6074 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6075 PSEUDO to be used with . prefix.
6077 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6078 Use atomic_increment instead of atomic_exchange_and_add.
6079 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6081 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6083 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6086 * allocatestack.c (allocate_stack): Use atomic_increment_val
6087 instead of atomic_exchange_and_add.
6088 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6089 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6091 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6094 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6095 the initialization function might throw.
6097 2005-09-05 Richard Henderson <rth@redhat.com>
6099 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6100 Move definition inside libpthread, libc, librt check. Provide
6101 definition for rtld.
6103 2004-09-02 Ulrich Drepper <drepper@redhat.com>
6105 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6106 * sysdeps/i386/jmpbuf-unwind.h: Likewise
6107 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6108 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6109 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6110 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6111 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6112 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6115 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6116 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6117 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6119 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6120 Decrement __nwaiters. If pthread_cond_destroy has been called and
6121 this is the last waiter, signal pthread_cond_destroy caller and
6122 avoid using the pthread_cond_t structure after unlock.
6123 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6124 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6125 Read clock type from the least significant bits of __nwaiters instead
6127 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6128 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6130 2004-08-31 Jakub Jelinek <jakub@redhat.com>
6133 * Makefile (tests): Add tst-cond20 and tst-cond21.
6134 * tst-cond20.c: New test.
6135 * tst-cond21.c: New test.
6136 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6137 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6139 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6141 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6142 (pthread_cond_t): Likewise.
6143 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6145 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6147 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6149 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6150 (cond_nwaiters): New.
6152 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6153 if there are waiters not signalled yet.
6154 Wait until all already signalled waiters wake up.
6155 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6156 __nwaiters. If pthread_cond_destroy has been called and this is the
6157 last waiter, signal pthread_cond_destroy caller and avoid using
6158 the pthread_cond_t structure after unlock.
6159 (__pthread_cond_wait): Increment __nwaiters in the beginning,
6160 decrement it when leaving. If pthread_cond_destroy has been called
6161 and this is the last waiter, signal pthread_cond_destroy caller.
6162 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6163 Likewise. Read clock type from the least significant bits of
6164 __nwaiters instead of __clock.
6165 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6166 whether clock ID can be encoded in COND_CLOCK_BITS bits.
6167 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6168 clock type just from the last COND_CLOCK_BITS bits of value.
6169 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6170 instead of __clock, just from second bit of condattr's value.
6172 2004-08-30 Jakub Jelinek <jakub@redhat.com>
6174 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6175 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
6177 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6179 2004-08-15 Roland McGrath <roland@frob.com>
6181 * pthread_atfork.c: Update copyright terms including special exception
6182 for these trivial files, which are statically linked into executables
6183 that use dynamic linking for the significant library code.
6185 2004-08-09 Jakub Jelinek <jakub@redhat.com>
6187 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6188 pthread_rwlock_rdlock.
6189 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6190 Decrease __nr_readers_queued after reacquiring lock.
6191 * sysdeps/pthread/pthread_rwlock_timedrdlock
6192 (pthread_rwlock_timedrdlock): Likewise.
6193 Reported by Bob Cook <bobcook47@hotmail.com>.
6195 2004-08-11 Jakub Jelinek <jakub@redhat.com>
6197 * tst-rwlock14.c (tf): Read main thread handle from *ARG
6198 before pthread_barrier_wait.
6200 2004-08-07 Ulrich Drepper <drepper@redhat.com>
6202 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6203 Remove unnecessary exception handling data.
6205 2004-07-23 Jakub Jelinek <jakub@redhat.com>
6208 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6209 instead of clockid_t.
6211 2004-07-21 Roland McGrath <roland@redhat.com>
6213 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6215 2004-07-19 Roland McGrath <roland@redhat.com>
6217 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6219 2004-07-02 Roland McGrath <roland@redhat.com>
6221 * configure: Don't exit.
6223 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6225 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6226 (__pthread_cond_timedwait): Check for invalid nanosecond in
6229 2004-07-07 Ulrich Drepper <drepper@redhat.com>
6231 * Makefile: Add rules to build and run tst-fini1.
6232 * tst-fini1.c: New file.
6233 * tst-fini1mod.c: New file.
6235 2004-07-05 Ulrich Drepper <drepper@redhat.com>
6237 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6238 if no cancellation support is needed.
6239 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6240 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6241 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6242 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6243 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6244 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6245 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6246 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6247 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6249 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6250 only if not already defined.
6252 2004-07-05 Jakub Jelinek <jakub@redhat.com>
6254 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6255 constraint "m" instead of "0" for futex.
6257 * shlib-versions: Add powerpc64-.*-linux.*.
6259 2004-07-04 Jakub Jelinek <jakub@redhat.com>
6261 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6262 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6264 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6265 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6268 2004-06-29 Roland McGrath <roland@redhat.com>
6270 * Banner: NPTL no longer has its own version number.
6271 * Makefile (nptl-version): Variable removed.
6272 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6273 using $(version), the glibc version number.
6275 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6277 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6278 Fix branch offset for a PLT entry.
6279 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6281 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6283 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6285 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6288 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6290 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6293 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6295 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6296 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6298 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6299 (pthread_rwlock_timedrdlock): Likewise.
6301 2004-06-22 Jakub Jelinek <jakub@redhat.com>
6303 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6304 Set __r7 to val, not mutex.
6306 2004-06-27 Ulrich Drepper <drepper@redhat.com>
6308 * Makefile: Add rules to build tst-rwlock14.
6309 * tst-rwlock14.c: New file.
6311 2004-06-24 Boris Hu <boris.hu@intel.com>
6313 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6315 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6317 2004-06-19 Andreas Jaeger <aj@suse.de>
6319 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6320 assembler in last patch.
6322 2004-06-17 Ulrich Drepper <drepper@redhat.com>
6324 * sysdeps/pthread/pthread_cond_timedwait.c
6325 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6326 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6327 (__pthread_cond_timedwait): Check for invalid nanosecond in
6329 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6330 * tst-cond19.c: New file.
6331 * Makefile: Add rules to build and run tst-cond19.
6333 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6335 * tst-context1.c (GUARD_PATTERN): Defined.
6336 (tst_context_t): Define struct containing ucontext_t & guard words.
6337 (ctx): Declare as an array of tst_context_t.
6338 (fct): Verify uc_link & guard words are still valid.
6339 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6341 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6343 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6344 Add __data.__futex field, reshuffle __data.__clock.
6345 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6346 (__pthread_cond_signal): Increment __futex at the same time as
6347 __wakeup_seq or __total_seq. Pass address of __futex instead of
6348 address of low 32-bits of __wakeup_seq to futex syscall.
6349 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6350 (__pthread_cond_wait): Likewise. Pass __futex value from before
6351 releasing internal lock to FUTEX_WAIT.
6352 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6353 (__pthread_cond_timedwait): Likewise.
6354 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6355 (FUTEX_CMP_REQUEUE): Define.
6356 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6357 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6358 Pass __futex value from before the unlock and __futex address instead
6359 of address of low 32-bits of __wakeup_seq to futex syscall.
6360 Fallback to FUTEX_WAKE all on any errors.
6362 2004-06-08 Jakub Jelinek <jakub@redhat.com>
6364 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6366 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6367 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6368 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6369 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6370 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6372 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6374 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6375 Add memory clobber to inline assembly.
6376 (__lll_mutex_trylock): Likewise.
6377 (__lll_mutex_cond_trylock): Likewise.
6379 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6381 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6382 Pass val argument as 6th system call argument in %r7.
6384 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6386 * Makefile (tests): Add tst-cond16.
6387 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6388 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6389 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6390 Add __data.__futex field, reshuffle __data.__clock.
6391 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6392 (__pthread_cond_signal): Increment __futex at the same time as
6393 __wakeup_seq or __total_seq. Pass address of __futex instead of
6394 address of low 32-bits of __wakeup_seq to futex syscall.
6395 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6396 (__pthread_cond_wait): Likewise. Pass __futex value from before
6397 releasing internal lock to FUTEX_WAIT.
6398 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6399 (__pthread_cond_timedwait): Likewise.
6400 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6401 (FUTEX_CMP_REQUEUE): Define.
6402 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6403 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6404 Pass __futex value from before the unlock and __futex address instead
6405 of address of low 32-bits of __wakeup_seq to futex syscall.
6406 Fallback to FUTEX_WAKE all on any errors.
6407 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6409 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6410 internally. Return non-zero if error, zero if success.
6411 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6412 Add __data.__futex field, reshuffle __data.__clock.
6413 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6415 (lll_futex_requeue): Add val argument, return 1 unconditionally
6417 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6418 Add __data.__futex field, reshuffle __data.__clock.
6419 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6421 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6422 internally. Return non-zero if error, zero if success.
6423 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6424 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6425 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6427 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6428 internally. Return non-zero if error, zero if success.
6429 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6430 Add __data.__futex field, reshuffle __data.__clock.
6431 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6433 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6434 internally. Return non-zero if error, zero if success.
6435 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6436 Add __data.__futex field, reshuffle __data.__clock.
6437 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6438 Add __data.__futex field, reshuffle __data.__clock.
6439 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6440 Increment __futex at the same time as __wakeup_seq or __total_seq.
6441 Pass address of __futex instead of address of low 32-bits of
6442 __wakeup_seq to futex syscall.
6443 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6444 Pass __futex value from before releasing internal lock
6446 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6447 Likewise. Avoid unnecessary shadowing of variables.
6448 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6449 Set __futex to 2 * __total_seq. Pass __futex value from before the
6450 unlock and __futex address instead of address of low 32-bits of
6451 __wakeup_seq to futex_requeue macro, adjust for new return value
6453 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6454 (__pthread_cond_signal): Increment __futex at the same time as
6455 __wakeup_seq or __total_seq. Pass address of __futex instead of
6456 address of low 32-bits of __wakeup_seq to futex syscall.
6457 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6458 (__pthread_cond_wait): Likewise. Pass __futex value from before
6459 releasing internal lock to FUTEX_WAIT.
6460 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6461 (__pthread_cond_timedwait): Likewise.
6462 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6463 (FUTEX_CMP_REQUEUE): Define.
6464 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6465 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6466 Pass __futex value from before the unlock and __futex address instead
6467 of address of low 32-bits of __wakeup_seq to futex syscall.
6468 Fallback to FUTEX_WAKE all on any errors.
6470 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6472 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6473 Add nop to align the end of critical section.
6474 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6476 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6478 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6479 Add __broadcast_seq field.
6480 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6481 all waiters as woken with woken_seq and bump broadcast counter.
6482 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6483 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6484 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6485 Comment typo fixes. Avoid returning -ETIMEDOUT.
6487 2004-06-01 Ulrich Drepper <drepper@redhat.com>
6489 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6490 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6491 Reported by Kaz Kojima.
6493 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6495 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6497 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6499 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6500 __broadcast_seq with bc_seq after acquiring internal lock instead of
6503 2004-05-18 Jakub Jelinek <jakub@redhat.com>
6505 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6507 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6508 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6509 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6510 (pthread_cond_t): Add __data.__broadcast_seq field.
6511 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6512 (FRAME_SIZE): Define.
6513 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6515 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6517 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6519 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6520 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6523 2004-05-18 Ulrich Drepper <drepper@redhat.com>
6525 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6526 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6527 Add __broadcast_seq field.
6528 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6529 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6530 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6531 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6532 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6533 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6534 all waiters as woken with woken_seq and bump broadcast counter.
6535 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6536 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6537 __broadcast_seq field.
6538 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6539 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6540 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6541 * pthread_cond_init.c: Initialize __broadcast_seq field.
6542 * Makefile (tests): Add tst-cond17 and tst-cond18.
6543 Add .NOTPARALLEL goal.
6544 * tst-cond16.c: New file. From Jakub.
6545 * tst-cond17.c: New file. From Jakub.
6546 * tst-cond18.c: New file. From Jakub.
6548 2004-05-16 Ulrich Drepper <drepper@redhat.com>
6550 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6553 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6554 Parametrize frame size. Correct some unwind info.
6555 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6557 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6559 * tst-stack3.c: Note testing functionality beyond POSIX.
6561 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6563 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6564 Change conditional from ifdef to if.
6566 2004-04-23 Jakub Jelinek <jakub@redhat.com>
6568 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6569 SYSDEP_CANCEL_ERROR): Define.
6572 2004-05-01 Jakub Jelinek <jakub@redhat.com>
6574 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6576 2004-04-20 Jakub Jelinek <jakub@redhat.com>
6578 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6580 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6582 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6583 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6584 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6585 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6587 2004-04-19 Ulrich Drepper <drepper@redhat.com>
6589 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6590 thread has all signals blocked.
6592 2004-04-18 Andreas Jaeger <aj@suse.de>
6594 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6595 (SEM_VALUE_MAX): Add missing brace.
6597 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6599 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6601 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6602 * sysdeps/pthread/tst-mqueue8x.c: New test.
6603 * tst-cancel4.c: Update comment about message queues.
6605 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6606 return it_value { 0, 0 }.
6607 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6609 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6610 assertion for SIGEV_NONE.
6611 (thread_attr_compare): Compare all attributes, not just a partial
6614 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6616 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6618 2004-04-17 Ulrich Drepper <drepper@redhat.com>
6620 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6621 Just use a plain number.
6622 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6623 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6624 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6625 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6626 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6627 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6628 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6630 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6632 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6634 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6636 2004-04-15 Jakub Jelinek <jakub@redhat.com>
6638 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6639 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6640 of calling sigwaitinfo.
6642 2004-04-16 Ulrich Drepper <drepper@redhat.com>
6644 * allocatestack.c (allocate_stack): Set reported_guardsize
6646 * pthread_getattr_np.c (pthread_getattr_np): Use
6647 reported_guardsize instead of guardsize.
6648 * descr.h (struct pthread): Add reported_guardsize field.
6650 2004-04-13 Jakub Jelinek <jakub@redhat.com>
6652 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6654 2004-04-12 Ulrich Drepper <drepper@redhat.com>
6656 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6658 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6660 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6661 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6662 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6663 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6664 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6666 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6667 (_POSIX_MESSAGE_PASSING): Define.
6668 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6669 (_POSIX_MESSAGE_PASSING): Define.
6670 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6671 (_POSIX_MESSAGE_PASSING): Define.
6673 2004-04-04 Ulrich Drepper <drepper@redhat.com>
6675 * tst-context1.c (fct): Check whether correct stack is used.
6677 2004-04-03 Ulrich Drepper <drepper@redhat.com>
6679 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6680 matching constraints for asm mem parameters.
6682 * tst-clock2.c (tf): Don't define unless needed.
6684 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6686 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6689 2004-03-30 Ulrich Drepper <drepper@redhat.com>
6691 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6692 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6693 * pthreadP.h: Declare __nptl_deallocate_tsd.
6694 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6697 * Makefile (tests): Add tst-tsd5.
6698 * tst-tsd5.c: New file.
6700 2004-03-29 Ulrich Drepper <drepper@redhat.com>
6702 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6703 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6704 is SHLIB_COMPAT check.
6705 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6706 (__pthread_attr_getaffinity_old): Likewise.
6707 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6708 (__pthread_getaffinity_old): Likewise.
6709 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6710 (__pthread_setaffinity_old): Likewise.
6712 2004-03-26 Ulrich Drepper <drepper@redhat.com>
6714 * allocatestack.c (_make_stacks_executable): Call
6715 _dl_make_stack_executable first.
6717 2004-03-24 Roland McGrath <roland@redhat.com>
6719 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6720 constraint instead of "0".
6722 2004-03-24 Ulrich Drepper <drepper@redhat.com>
6724 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6725 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6727 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6728 code to avoid warning.
6730 2004-03-24 Andreas Jaeger <aj@suse.de>
6732 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6733 (__pthread_attr_setaffinity_old): Remove const.
6735 2004-03-23 Ulrich Drepper <drepper@redhat.com>
6737 * sysdeps/unix/sysv/linux/smp.h: New file.
6738 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6739 * init.c: Define __is_smp.
6740 (__pthread_initialize_minimal_internal): Call is_smp_system to
6741 initialize __is_smp.
6742 * pthreadP.h: Declare __is_smp.
6743 Define MAX_ADAPTIVE_COUNT is necessary.
6744 * pthread_mutex_init.c: Add comment regarding __spins field.
6745 * pthread_mutex_lock.c: Implement adaptive mutex type.
6746 * pthread_mutex_timedlock.c: Likewise.
6747 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6748 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6750 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6751 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6752 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6753 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6754 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6755 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6756 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6757 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6758 lll_mutex_cond_trylock.
6759 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6760 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6761 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6762 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6763 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6764 Define BUSY_WAIT_NOP.
6765 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6766 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6768 * tst-mutex5.c: Add support for testing adaptive mutexes.
6769 * tst-mutex7.c: Likewise.
6770 * tst-mutex5a.c: New file.
6771 * tst-mutex7a.c: New file.
6772 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6774 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6775 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6776 vgettimeofday call might destroy the content.
6778 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6781 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6782 No need to restrict type of ret. Make it int. Add comment.
6784 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6785 Remove unnecessary setne instruction.
6787 2004-03-22 Jakub Jelinek <jakub@redhat.com>
6789 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6790 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6791 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6792 If realloc fails, break out of the loop.
6794 2004-03-20 Andreas Jaeger <aj@suse.de>
6796 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6797 (__pthread_setaffinity_old): Fix interface.
6798 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6799 (__pthread_getaffinity_old): Likewise.
6801 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6802 (__pthread_setaffinity_new): Remove duplicate declaration.
6804 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6806 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6807 the return value to a safe register.
6808 (CDISABLE): Set the function argument correctly.
6810 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6812 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6813 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6814 Rewrite so that only one locked memory operation per round is needed.
6815 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6816 (pthread_barrier_wait): After wakeup, release lock only when the
6817 last thread stopped using the barrier object.
6818 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6819 (__pthread_cond_wait): Don't store mutex address if the current
6820 value is ~0l. Add correct cleanup support and unwind info.
6821 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6822 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6823 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6824 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6825 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6826 Add correct cleanup support and unwind info.
6827 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6828 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6829 information for syscall wrappers.
6831 2004-03-18 Ulrich Drepper <drepper@redhat.com>
6833 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6834 cpusetsize field, remove next.
6835 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6836 parameter for size of the CPU set.
6837 (pthread_setaffinity_np): Likewise.
6838 (pthread_attr_getaffinity_np): Likewise.
6839 (pthread_attr_setaffinity_np): Likewise.
6840 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6841 interface change, keep compatibility code.
6842 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6843 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6844 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6845 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6846 __pthread_getaffinity_np.
6847 * Versions: Add version for changed interfaces.
6848 * tst-attr3.c: Adjust test for interface change.
6849 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6850 increasing buffer sizes.
6851 * pthread_attr_destroy.c: Remove unused list handling.
6852 * pthread_attr_init.c: Likewise.
6854 2004-03-17 Roland McGrath <roland@redhat.com>
6856 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6857 first argument to clock_getres so we ever enable kernel timers.
6859 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
6861 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6863 2004-03-12 Richard Henderson <rth@redhat.com>
6865 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6866 oldvalue from CENABLE to CDISABLE.
6868 2004-03-12 Ulrich Drepper <drepper@redhat.com>
6870 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6871 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6872 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6873 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6875 2004-03-11 Richard Henderson <rth@redhat.com>
6877 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6878 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6879 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6881 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6883 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6884 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6885 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6887 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6889 * forward.c (__pthread_cond_broadcast_2_0,
6890 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6891 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6892 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6894 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6896 * sysdeps/sh/tcb-offsets.sym: Add PID.
6897 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6898 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6900 2004-03-10 Ulrich Drepper <drepper@redhat.com>
6902 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6903 include <sysdep-cancel.h>, vfork is no cancellation point.
6904 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6905 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6906 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6908 2004-03-10 Jakub Jelinek <jakub@redhat.com>
6910 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6912 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6913 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6915 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6917 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6918 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6919 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6920 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6921 of DO_CALL_VIA_BREAK. Work around a gas problem.
6923 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6924 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6925 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6926 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6927 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6928 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6930 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6931 a local register for saving old PID. Negate PID in parent upon exit.
6933 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6935 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6936 before syscall, set to the old value in the parent afterwards.
6937 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6938 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6940 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6941 before syscall, set to the old value in the parent afterwards.
6942 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6943 * sysdeps/s390/tcb-offsets.sym: Add PID.
6945 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6946 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6947 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6948 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6949 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6950 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6952 2004-03-10 Andreas Schwab <schwab@suse.de>
6954 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6955 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6956 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6958 2004-03-09 Jakub Jelinek <jakub@redhat.com>
6960 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6961 * tst-cancel21.c (do_one_test): Likewise.
6962 Reported by Gordon Jin <gordon.jin@intel.com>.
6964 2004-02-09 Jakub Jelinek <jakub@redhat.com>
6966 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6967 if non-zero and set to INT_MIN if zero.
6968 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6969 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6970 (SAVE_PID, RESTORE_PID): Define.
6972 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6973 Use relative path to avoid including NPTL i386/vfork.S.
6974 (SAVE_PID, RESTORE_PID): Define.
6975 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6976 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6977 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6979 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6980 * tst-vfork1.c: New test.
6981 * tst-vfork2.c: New test.
6982 * tst-vfork1x.c: New test.
6983 * tst-vfork2x.c: New test.
6985 2004-03-08 Ulrich Drepper <drepper@redhat.com>
6987 * sysdeps/i386/tcb-offsets.sym: Add PID.
6988 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6989 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6990 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6992 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
6994 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6996 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
6998 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7001 2004-03-07 Ulrich Drepper <drepper@redhat.com>
7003 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7006 * tst-once4.c: Remove unnecessary macro definition.
7008 * tst-mutex7.c (do_test): Limit thread stack size.
7009 * tst-once2.c (do_test): Likewise.
7010 * tst-tls3.c (do_test): Likewise.
7011 * tst-tls1.c (do_test): Likewise.
7012 * tst-signal3.c (do_test): Likewise.
7013 * tst-kill6.c (do_test): Likewise.
7014 * tst-key4.c (do_test): Likewise.
7015 * tst-join4.c (do_test): Likewise.
7016 * tst-fork1.c (do_test): Likewise.
7017 * tst-context1.c (do_test): Likewise.
7018 * tst-cond2.c (do_test): Likewise.
7019 * tst-cond10.c (do_test): Likewise.
7020 * tst-clock2.c (do_test): Likewise.
7021 * tst-cancel10.c (do_test): Likewise.
7022 * tst-basic2.c (do_test): Likewise.
7023 * tst-barrier4.c (do_test): Likewise.
7025 2004-03-05 Ulrich Drepper <drepper@redhat.com>
7027 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
7029 2004-03-01 Ulrich Drepper <drepper@redhat.com>
7031 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7032 (__pthread_cond_timedwait): Optimize wakeup test.
7033 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7034 (__pthread_cond_wait): Likewise.
7035 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7036 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7039 2004-02-29 Ulrich Drepper <drepper@redhat.com>
7041 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7042 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
7043 the atomic instruction needed.
7044 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7045 (__lll_mutex_lock_wait): Likewise.
7047 2004-02-28 Ulrich Drepper <drepper@redhat.com>
7049 * Makefile (tests): Add tst-cond14 and tst-cond15.
7050 * tst-cond14.c: New file.
7051 * tst-cond15.c: New file.
7053 2004-02-27 Ulrich Drepper <drepper@redhat.com>
7055 * sysdeps/pthread/createthread.c (create_thread): Remove use of
7056 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
7057 needs to be implemented differently to be useful.
7059 2004-02-26 Ulrich Drepper <drepper@redhat.com>
7061 * pthread_attr_setschedparam.c: Don't test priority against limits
7062 here. Set ATTR_FLAG_SCHED_SET flag.
7063 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7064 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7065 from parent thread to child. If attribute is used and scheduling
7066 parameters are not inherited, copy parameters from attribute or
7067 compute them. Check priority value.
7068 * pthread_getschedparam.c: If the parameters aren't known yet get
7069 them from the kernel.
7070 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7071 ATTR_FLAG_POLICY_SET flag for thread.
7072 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7073 and ATTR_FLAG_POLICY_SET.
7075 * sysdeps/pthread/createthread.c: Use tgkill if possible.
7077 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7078 fail if stack address hasn't been set. Just return 0.
7080 2004-02-25 Ulrich Drepper <drepper@redhat.com>
7082 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
7083 libpthread for the files in this list.
7084 (CFLAGS-tst-unload): Removed.
7085 * tst-unload.c (do_test): Don't use complete path for
7088 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7091 2004-02-22 Ulrich Drepper <drepper@redhat.com>
7093 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7094 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7095 operation per round is needed.
7096 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7097 (__lll_mutex_lock_wait): Likewise.
7099 2004-02-20 Ulrich Drepper <drepper@redhat.com>
7101 * tst-cancel9.c (cleanup): Don't print to stderr.
7103 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7105 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7107 2004-02-20 Jakub Jelinek <jakub@redhat.com>
7109 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7110 (__syscall_error_handler2): Call CDISABLE.
7111 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7112 (__syscall_error_handler2): Call CDISABLE.
7114 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7115 Release lock before the loop, don't reacquire it.
7117 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7119 2004-02-19 Andreas Schwab <schwab@suse.de>
7121 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7124 2004-02-18 Ulrich Drepper <drepper@redhat.com>
7126 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7127 (pthread_barrier_wait): After wakeup, release lock only when the
7128 last thread stopped using the barrier object.
7129 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7130 (pthread_barrier_wait): Likewise.
7131 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7133 * Makefile (tests): Add tst-barrier4.
7134 * tst-barrier4.c: New file.
7136 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7137 (__pthread_cond_timedwait): Perform timeout test while holding
7138 internal lock to prevent wakeup race.
7139 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7140 * sysdeps/pthread/pthread_cond_timedwait.c
7141 (__pthread_cond_timedwait): Likewise.
7142 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7143 (__pthread_cond_timedwait): Likewise.
7145 2004-02-18 Jakub Jelinek <jakub@redhat.com>
7147 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7148 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7149 * Makefile (tests): Add tst-rwlock13.
7150 * tst-rwlock13.c: New test.
7152 2004-02-16 Ulrich Drepper <drepper@redhat.com>
7154 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7155 (__condvar_tw_cleanup): Little optimization.
7156 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7158 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
7160 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7161 libpthread as "lib" parameter to SHLIB_COMPAT.
7162 (__novmx_siglongjmp): Fix typo in function name.
7163 (__novmx_longjmp): Fix typo in function name.
7165 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7167 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7170 * sysdeps/generic/pt-longjmp.c: Moved to...
7171 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
7173 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
7175 * Makefile (libpthread-routines): Add pt-cleanup.
7176 * pt-longjmp.c: Removed.
7177 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7178 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7179 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7180 Version longjmp, siglongjmp for GLIBC_2.3.4.
7181 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7183 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7185 * sysdeps/pthread/pthread_cond_timedwait.c
7186 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
7187 Reuse code. Add __builtin_expects.
7189 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7190 (__pthread_cond_timedwait): Get internal lock in case timeout has
7191 passed before the futex syscall.
7192 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7194 2004-01-20 Ulrich Drepper <drepper@redhat.com>
7196 * allocatestack.c: Pretty printing.
7198 * sysdeps/pthread/createthread.c (create_thread): Don't add
7199 CLONE_DETACHED bit if it is not necessary.
7201 2004-01-16 Ulrich Drepper <drepper@redhat.com>
7203 * pthread_getattr_np.c: Include ldsodefs.h.
7205 2004-01-16 Richard Henderson <rth@redhat.com>
7207 * allocatestack.c: Don't declare __libc_stack_end.
7208 * init.c (__pthread_initialize_minimal_internal): Likewise.
7209 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7211 2004-01-15 Richard Henderson <rth@redhat.com>
7213 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7214 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7215 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7216 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7217 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7218 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7219 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7220 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7222 2004-01-14 Ulrich Drepper <drepper@redhat.com>
7224 * init.c (pthread_functions): Make array const.
7226 2004-01-13 Ulrich Drepper <drepper@redhat.com>
7228 * allocatestack.c (__make_stacks_executable): Change interface.
7229 Check parameters. Pass parameter on to libc counterpart.
7230 * pthreadP.h: Change declaration.
7232 2004-01-13 Richard Henderson <rth@redhat.com>
7234 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7236 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7239 * sysdeps/alpha/Makefile: New file.
7240 * sysdeps/alpha/tcb-offsets.sym: New file.
7241 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7242 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7244 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7247 2004-01-08 Jakub Jelinek <jakub@redhat.com>
7249 * Makefile (tests): Add tst-backtrace1.
7250 * tst-backtrace1.c: New test.
7252 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7254 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7255 register as second parameter to the REGISTER macro.
7256 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7257 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7258 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7259 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7260 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7261 of thread register as second parameter to REGISTER macro in 64 case.
7263 2004-01-03 Ulrich Drepper <drepper@redhat.com>
7265 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7266 (CFLAGS-getpid.o): Defined.
7267 (CFLAGS-getpid.os): Defined.
7269 2003-12-31 Ulrich Drepper <drepper@redhat.com>
7271 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7272 returned for main thread does not overlap with any other VMA.
7273 Patch by Jakub Jelinek.
7275 2003-12-29 Jakub Jelinek <jakub@redhat.com>
7277 * tst-raise1.c: Include stdio.h.
7279 2003-12-23 Jakub Jelinek <jakub@redhat.com>
7281 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7282 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7283 If pid is 0, set it to selftid.
7284 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7285 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7286 != 0, return self->tid without doing a syscall.
7287 * descr.h (struct pthread): Move pid field after tid.
7289 * Makefile (tests): Add tst-raise1.
7290 * tst-raise1.c: New file.
7292 2003-12-23 Roland McGrath <roland@redhat.com>
7294 * tst-oddstacklimit.c: New file.
7295 * Makefile (tests): Add it.
7296 (tst-oddstacklimit-ENV): New variable.
7298 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7299 value up to page size for __default_stacksize.
7301 2003-12-21 Ulrich Drepper <drepper@redhat.com>
7303 * Makefile (tests): Add tst-eintr5.
7304 * tst-eintr5.c: New file.
7306 * eintr.c (eintr_source): Prevent sending signal to self.
7308 * tst-eintr2.c (tf1): Improve error message.
7310 2003-12-20 Ulrich Drepper <drepper@redhat.com>
7312 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7313 * sysdeps/unix/sysv/linux/getpid.c: New file.
7314 * pthread_cancel.c: Add comment explaining use of PID field.
7315 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7316 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7317 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7318 temporarily to signal the field must not be relied on and updated
7320 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7321 temporarily negative.
7322 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7324 2003-12-19 Ulrich Drepper <drepper@redhat.com>
7326 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7327 (eintr_source): If ARG != NULL, use pthread_kill.
7328 * tst-eintr1.c: Adjust for this change.
7329 * tst-eintr2.c: Likewise.
7330 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7331 * tst-eintr3.c: New file.
7332 * tst-eintr4.c: New file.
7334 2003-12-19 Jakub Jelinek <jakub@redhat.com>
7336 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7337 if CANCELSTATE_BITMASK is set.
7338 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7341 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7342 (tests-reverse): Add tst-cancel23.
7343 * tst-cancel22.c: New test.
7344 * tst-cancel23.c: New test.
7346 2003-12-18 Ulrich Drepper <drepper@redhat.com>
7348 * tst-eintr1.c: Better error messages.
7350 * Makefile (tests): Add tst-eintr2.
7351 * tst-eintr2.c: New file.
7353 2003-12-18 Jakub Jelinek <jakub@redhat.com>
7355 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7356 (CFLAGS-tst-cancelx21.c): Set.
7357 * tst-cancel21.c: New test.
7358 * tst-cancelx21.c: New test.
7360 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7362 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7363 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7364 * pt-longjmp.c: Include jmpbuf-unwind.h.
7365 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7366 _JMPBUF_UNWINDS. Adjust compared pointers.
7367 * init.c (__pthread_initialize_minimal_internal): Initialize
7368 pd->stackblock_size.
7369 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7370 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7371 * sysdeps/i386/jmpbuf-unwind.h: New file.
7372 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7373 * sysdeps/s390/jmpbuf-unwind.h: New file.
7374 * sysdeps/sh/jmpbuf-unwind.h: New file.
7375 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7376 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7377 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7378 (_JMPBUF_CFA_UNWINDS): Remove.
7379 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7381 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7383 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7384 (CFLAGS-tst-cancelx20.c): Set.
7385 * tst-cancel20.c: New test.
7386 * tst-cancelx20.c: New test.
7388 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7390 * init.c (__pthread_initialize_minimal_internal): Don't treat
7391 architectures with separate register stack special here when
7392 computing default stack size.
7394 2003-12-17 Roland McGrath <roland@redhat.com>
7396 * Makefile (tst-cancelx7-ARGS): New variable.
7397 Reportd by Greg Schafer <gschafer@zip.com.au>.
7399 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7401 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7402 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7403 (tst-stack3-ENV): Set.
7404 ($(objpfx)tst-stack3-mem): New.
7405 * tst-stack3.c: New test.
7407 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7409 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7410 Add unwind directives. Drop unused .regstk directive.
7411 (_fini_EPILOG_BEGINS): Add unwind directives.
7413 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7415 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7416 Assume parameter is a pointer.
7417 (lll_futex_wake): Likewise.
7418 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7420 (lll_futex_wake): Likewise.
7421 Reported by Boris Hu.
7422 * sysdeps/unix/sysv/linux/unregister-atfork.c
7423 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7425 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7427 2003-12-10 Ulrich Drepper <drepper@redhat.com>
7429 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7430 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7431 __rtld_lock_initialize for ld.so lock.
7432 Patch in part by Adam Li <adam.li@intel.com>.
7434 2003-12-02 David Mosberger <davidm@hpl.hp.com>
7436 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7437 in $(gnulib). Also, remove stale comment.
7439 2003-11-12 David Mosberger <davidm@hpl.hp.com>
7441 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7442 advantage of new syscall stub and optimize accordingly.
7444 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7445 from SYS_futex, to match expectations of
7446 sysdep.h:DO_INLINE_SYSCALL.
7447 (lll_futex_clobbers): Remove.
7448 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7449 (lll_futex_wake): Likewise.
7450 (lll_futex_requeue): Likewise.
7451 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7452 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7454 (__lll_mutex_lock): Likewise.
7455 (__lll_mutex_cond_lock): Likewise.
7456 (__lll_mutex_timed_lock): Likewise.
7457 (__lll_mutex_unlock): Likewise.
7458 (__lll_mutex_unlock_force): Likewise.
7460 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7461 comes before the include of <sysdep.h>.
7462 (THREAD_SELF_SYSINFO): New macro.
7463 (THREAD_SYSINFO): Likewise.
7464 (INIT_SYSINFO): New macro.
7465 (TLS_INIT_TP): Call INIT_SYSINFO.
7467 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7469 * sysdeps/pthread/createthread.c (create_thread): Use
7470 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7471 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7472 THREAD_SELF_SYSINFO instead of open code.
7473 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7474 (THREAD_SYSINFO): Likewise.
7476 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7478 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7480 2003-12-06 Ulrich Drepper <drepper@redhat.com>
7482 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7483 instead of .init. Patch by David Mosberger.
7485 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
7487 * sysdeps/pthread/configure.in: Remove broken declaration in C
7488 cleanup handling check.
7490 2003-11-30 Andreas Jaeger <aj@suse.de>
7492 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7493 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7496 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7498 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7499 * pthread_attr_destroy.c: Include shlib-compat.h.
7500 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7501 is set in iattr->flags.
7502 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7504 2003-11-21 Jakub Jelinek <jakub@redhat.com>
7506 * Makefile (distribute): Add tst-cleanup4aux.c.
7508 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7511 2003-11-21 Ulrich Drepper <drepper@redhat.com>
7513 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7514 pthread_cond_signal.
7516 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7517 store mutex address if the current value is ~0l.
7518 * sysdeps/pthread/pthread_cond_timedwait.c
7519 (__pthread_cond_timedwait): Likewise.
7520 * sysdeps/pthread/pthread_cond_broadcast.c
7521 (__pthread_cond_broadcast): Don't use requeue for pshared
7524 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7525 (__pthread_cond_wait): Don't store mutex address if the current
7527 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7528 (__pthread_cond_timedwait): Likewise.
7529 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7530 (__pthread_cond_broadcast): Don't use requeue for pshared
7533 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7534 element with ~0l for pshared condvars, with NULL otherwise.
7536 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7537 (__pthread_cond_wait): Don't store mutex address if the current
7539 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7540 (__pthread_cond_timedwait): Likewise.
7541 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7542 (__pthread_cond_broadcast): Don't use requeue for pshared
7545 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7546 * tst-cond12.c: New file.
7547 * tst-cond13.c: New file.
7549 2003-11-17 Ulrich Drepper <drepper@redhat.com>
7551 * sysdeps/pthread/configure.in: Make missing forced unwind support
7554 2003-11-11 Ulrich Drepper <drepper@redhat.com>
7556 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7558 2003-11-06 Ulrich Drepper <drepper@redhat.com>
7560 * Makefile: Add magic to clean up correctly.
7562 2003-11-05 Jakub Jelinek <jakub@redhat.com>
7564 * unwind.c (FRAME_LEFT): Define.
7565 (unwind_stop): Handle old style cleanups here.
7566 (__pthread_unwind): Handle old style cleanups only if
7567 !HAVE_FORCED_UNWIND.
7568 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7569 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7570 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7571 ($(objpfx)tst-cleanupx4): Likewise.
7572 * tst-cleanup4.c: New test.
7573 * tst-cleanup4aux.c: New.
7574 * tst-cleanupx4.c: New test.
7576 2003-11-04 Ulrich Drepper <drepper@redhat.com>
7578 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7579 lll_mutex_*lock macros to skip atomic operations on some archs.
7581 2003-11-03 Ulrich Drepper <drepper@redhat.com>
7583 * sysdeps/pthread/tst-timer.c (main): Initialize
7584 sigev2.sigev_value as well.
7586 2003-10-15 Roland McGrath <roland@redhat.com>
7588 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7590 * sysdeps/pthread/configure: Regenerated.
7592 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7594 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7595 locking macros. No distinction between normal and mutex locking
7597 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7598 Merge bits from lowlevelmutex.S we still need.
7599 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7600 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7601 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7602 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7603 new mutex implementation.
7604 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7605 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7606 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7607 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7608 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7609 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7610 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7611 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7612 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7613 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7614 symbol for entry point to avoid cancellation.
7616 2003-10-07 Jakub Jelinek <jakub@redhat.com>
7618 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7620 (SAVE_OLDTYPE_0): Fix a typo.
7622 2003-10-03 Ulrich Drepper <drepper@redhat.com>
7624 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7625 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7627 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7629 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7632 2003-10-02 Jakub Jelinek <jakub@redhat.com>
7634 * Makefile (tests): Add tst-cancel19.
7635 * tst-cancel19.c: New test.
7637 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7639 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7640 restoring of the old cancellation type.
7642 2003-09-30 Jakub Jelinek <jakub@redhat.com>
7644 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7646 2003-09-27 Wolfram Gloger <wg@malloc.de>
7648 * sysdeps/pthread/malloc-machine.h: New file
7650 2003-09-24 Roland McGrath <roland@redhat.com>
7652 * allocatestack.c (__make_stacks_executable): Don't ignore return
7653 value from _dl_make_stack_executable.
7655 2003-09-24 Ulrich Drepper <drepper@redhat.com>
7657 * allocatestack.c (__make_stacks_executable): Also change
7658 permission of the currently unused stacks.
7660 * allocatestack.c (change_stack_perm): Split out from
7661 __make_stacks_executable.
7662 (allocate_stack): If the required permission changed between the time
7663 we started preparing the stack and queueing it, change the permission.
7664 (__make_stacks_executable): Call change_stack_perm.
7666 * Makefile: Build tst-execstack-mod locally.
7667 * tst-execstack-mod.c: New file.
7669 2003-09-23 Jakub Jelinek <jakub@redhat.com>
7671 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7673 2003-09-23 Roland McGrath <roland@redhat.com>
7675 * tst-execstack.c: New file.
7676 * Makefile (tests): Add it.
7677 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7678 (LDFLAGS-tst-execstack): New variable.
7680 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7681 whether to use PROT_EXEC for stack mmap.
7682 (__make_stacks_executable): New function.
7683 * pthreadP.h: Declare it.
7684 * init.c (__pthread_initialize_minimal_internal): Set
7685 GL(dl_make_stack_executable_hook) to that.
7687 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7689 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7690 recommendation from AMD re avoidance of lock prefix.
7692 2003-09-22 Jakub Jelinek <jakub@redhat.com>
7694 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7695 lll_futex_timed_wait instead of lll_futex_wait.
7696 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7697 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7698 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7699 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7700 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7701 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7702 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7703 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7704 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7705 Completely revamp the locking macros. No distinction between
7706 normal and mutex locking anymore.
7707 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7708 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7709 __lll_lock_timedwait): Fix prototypes.
7710 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7711 __lll_lock_timedwait): Likewise.
7712 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7713 macros, add __builtin_expect.
7714 (lll_mutex_timedlock): Likewise. Fix return value.
7715 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7716 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7717 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7718 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7719 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7720 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7721 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7722 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7724 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7726 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7727 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7728 operation if possible.
7730 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7731 like jumping over the lock prefix.
7733 2003-09-21 Ulrich Drepper <drepper@redhat.com>
7735 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7736 locking macros. No distinction between normal and mutex locking
7738 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7739 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7740 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7741 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7742 locking. Merge bits from lowlevelmutex.S we still need.
7743 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7744 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7745 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7746 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7747 * Makefile (routines): Remove libc-lowlevelmutex.
7748 (libpthread-rountines): Remove lowlevelmutex.
7749 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7750 for new mutex implementation.
7751 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7752 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7753 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7754 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7755 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7757 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7759 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7760 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7761 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7762 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7763 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7764 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7765 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7766 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7768 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7770 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7771 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7772 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7774 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7775 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7777 2003-09-20 Ulrich Drepper <drepper@redhat.com>
7779 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7780 in parameters of asm with output parameters.
7782 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7783 type of DECR parameter to int.
7784 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7786 2003-09-18 Jakub Jelinek <jakub@redhat.com>
7788 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7789 guardsize for each thread.
7791 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7793 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7794 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7795 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7797 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7798 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7800 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7801 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7802 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7803 (pthread_getaffinity_np): Add hidden_def.
7805 * Makefile (tests): Add tst-attr3.
7806 * tst-attr3.c: New test.
7808 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7810 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7812 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7813 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7815 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7817 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7818 * tst-align.c: Include tst-stack-align.h.
7819 (tf, do_test): Use TEST_STACK_ALIGN macro.
7821 2003-09-17 Ulrich Drepper <drepper@redhat.com>
7823 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7826 2003-09-16 Ulrich Drepper <drepper@redhat.com>
7828 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7829 stack-related values for the initial thread.
7831 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7833 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7835 2003-09-11 Ulrich Drepper <drepper@redhat.com>
7837 * pthread_mutex_lock.c: Minor code rearrangements.
7839 2003-09-05 Roland McGrath <roland@redhat.com>
7841 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7842 Instead, include ../nptl_db/db_info.c to do its magic.
7843 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7844 (__pthread_pthread_key_2ndlevel_size): Likewise.
7845 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7846 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7847 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7848 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7849 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7850 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7851 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7852 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7853 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7854 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7855 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7856 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7857 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7858 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7859 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7860 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7861 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7863 2003-09-08 Ulrich Drepper <drepper@redhat.com>
7865 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7866 of pthread_t to be compatible with LT.
7867 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7868 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7869 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7870 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7871 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7872 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7873 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7875 2003-09-04 Ulrich Drepper <drepper@redhat.com>
7877 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7879 2003-09-04 Jakub Jelinek <jakub@redhat.com>
7881 * unwind-forcedunwind.c: Move to...
7882 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7883 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7884 * sysdeps/pthread/jmpbuf-unwind.h: New file.
7885 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7886 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7887 * unwind.c: Include jmpbuf-unwind.h.
7888 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7890 2003-09-02 Jakub Jelinek <jakub@redhat.com>
7892 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7893 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7894 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7895 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7896 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7897 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7898 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7899 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7900 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7901 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7902 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7904 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7905 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7906 * Makefile (tests): Add tst-stack2.
7907 * tst-stack2.c: New test.
7908 * tst-stack1.c: Include limits.h and sys/param.h.
7909 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7911 * pthread_condattr_setpshared.c: Include errno.h.
7912 (pthread_condattr_setpshared): Return EINVAL if pshared
7913 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7915 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7916 defined symbol for entry point to avoid cancellation.
7917 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7919 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7921 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7923 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7925 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7927 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7928 __close_nocancel, __read_nocancel, __write_nocancel,
7929 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7930 libpthread.so or librt.so, define to corresponding function
7931 without _nocancel suffix.
7932 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7933 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7934 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7936 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7938 2003-09-02 Ulrich Drepper <drepper@redhat.com>
7940 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7941 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7943 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7944 in subsections has a symbol associated with it.
7946 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7947 defined symbol for entry point to avoid cancellation.
7948 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7950 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7952 * Makefile (tests): Add tst-tls5.
7953 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7954 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7955 ($(objpfx)tst-tls5): New.
7956 ($(objpfx)tst-tls6.out): Likewise.
7957 (tests): Depend on $(objpfx)tst-tls6.out.
7958 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7959 (do_test): Check pthread_self () return value alignment.
7960 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7961 (tf): Check pthread_self () return value alignment.
7962 * tst-tls5.c: New test.
7964 * tst-tls5mod.c: New.
7965 * tst-tls5moda.c: New.
7966 * tst-tls5modb.c: New.
7967 * tst-tls5modc.c: New.
7968 * tst-tls5modd.c: New.
7969 * tst-tls5mode.c: New.
7970 * tst-tls5modf.c: New.
7971 * tst-tls6.sh: New test.
7973 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7974 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7975 * init.c (pthread_functions): Initialize them.
7976 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7977 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7978 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7979 pthread_cond_timedwait@@GLIBC_2.3.2.
7981 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7983 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7984 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7985 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7986 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7987 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7988 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7990 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7992 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7993 _POSIX_THREAD_PRIORITY_SCHEDULING.
7994 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7996 2003-08-31 Ulrich Drepper <drepper@redhat.com>
7998 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7999 nested function, use static inline function from libio.h.
8000 Code by Richard Henderson.
8002 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
8005 2003-08-30 Jakub Jelinek <jakub@redhat.com>
8007 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
8008 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
8009 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
8010 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
8011 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
8012 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
8013 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
8014 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
8015 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
8016 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
8017 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
8018 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
8019 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
8020 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
8021 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
8022 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
8023 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
8024 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
8025 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
8026 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
8027 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
8028 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
8029 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
8030 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
8031 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
8032 * sysdeps/sparc/tls.h: New file.
8033 * sysdeps/sparc/tcb-offsets.sym: New file.
8034 * sysdeps/sparc/Makefile: New file.
8035 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
8036 * init.c [__sparc__] (__NR_set_tid_address): Define.
8038 2003-08-29 Jakub Jelinek <jakub@redhat.com>
8040 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
8041 _IO_release_lock): Define.
8043 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
8045 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
8046 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
8048 2003-08-27 Ulrich Drepper <drepper@redhat.com>
8050 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8051 (__pthread_cleanup_class): Add missing return types of member
8054 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
8056 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8057 (lll_mutex_unlock_force): Add memory barrier between store and futex
8060 2003-08-25 Ulrich Drepper <drepper@redhat.com>
8062 * tst-cancel4.c (do_test): Also unlink tempfname and remove
8063 tempmsg in first loop.
8065 2003-08-18 Ulrich Drepper <drepper@redhat.com>
8067 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8068 _POSIX_THREAD_PRIORITY_SCHEDULING.
8069 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8071 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8073 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8074 (__rtld_lock_default_lock_recursive,
8075 __rtld_lock_default_unlock_recursive): Define.
8076 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8077 __rtld_lock_unlock_recursive): Define using
8078 GL(_dl_rtld_*lock_recursive).
8079 * init.c (__pthread_initialize_minimal_internal): Initialize
8080 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8081 Lock GL(_dl_load_lock) the same number of times as
8082 GL(_dl_load_lock) using non-mt implementation was nested.
8084 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8085 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8087 2003-08-06 Jakub Jelinek <jakub@redhat.com>
8089 * tst-cancel17.c (do_test): Make len2 maximum of page size and
8092 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8094 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8096 2003-08-03 Jakub Jelinek <jakub@redhat.com>
8098 * sysdeps/pthread/createthread.c (do_clone): Move error handling
8099 to first syscall error check. Move syscall error check for tkill
8100 into __ASSUME_CLONE_STOPPED #ifdef.
8102 2003-08-02 Ulrich Drepper <drepper@redhat.com>
8104 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8105 is not defined, do explicit synchronization.
8106 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
8107 is not defined also unlock pd->lock for non-debugging case in case
8109 * pthread_create.c (start_thread): Always get and release pd->lock
8110 if __ASSUME_CLONE_STOPPED is not defined.
8111 (start_thread_debug): Removed. Adjust users.
8112 * allocatestack.c (allocate_stack): Always initialize lock if
8113 __ASSUME_CLONE_STOPPED is not defined.
8114 * Makefile (tests): Add tst-sched1.
8115 * tst-sched1.c: New file.
8117 * sysdeps/pthread/createthread.c (do_clone): Only use
8118 sched_setschduler and pass correct parameters.
8120 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8122 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8123 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8124 PTHREAD_STACK_MIN in comments.
8126 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8128 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8129 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8131 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8132 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8133 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8134 (__pthread_cleanup_upto): Fix prototype.
8135 (_longjmp_unwind): Adjust caller.
8136 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8137 Change second argument to const struct pointer.
8138 * tst-sem8.c (main): Remove unused s2 and s3 variables.
8139 * tst-sem9.c (main): Likewise.
8140 * unwind.c: Include string.h for strlen prototype.
8142 2003-07-31 Ulrich Drepper <drepper@redhat.com>
8144 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8145 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8146 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8148 Patch by Nicholas Miell <nmiell@attbi.com>.
8150 2003-07-30 Jakub Jelinek <jakub@redhat.com>
8152 * init.c (__pthread_initialize_minimal_internal): Initialize
8153 GL(dl_init_static_tls).
8154 * pthreadP.h (__pthread_init_static_tls): New prototype.
8155 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8157 * Makefile (tests): Add tst-tls4.
8158 (modules-names): Add tst-tls4moda and tst-tls4modb.
8159 ($(objpfx)tst-tls4): Link against libdl and libpthread.
8160 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8162 * tst-tls4.c: New file.
8163 * tst-tls4moda.c: New file.
8164 * tst-tls4modb.c: New file.
8166 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
8168 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8169 before __timer_dealloc.
8170 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8171 Don't call list_unlink.
8173 2003-07-29 Roland McGrath <roland@redhat.com>
8175 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8177 2003-07-25 Jakub Jelinek <jakub@redhat.com>
8179 * tst-cancel17.c (do_test): Check if aio_cancel failed.
8180 Don't reuse struct aiocb A if it failed.
8181 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8182 not just one byte, as that does not block.
8184 2003-07-22 Jakub Jelinek <jakub@redhat.com>
8186 * sysdeps/pthread/unwind-resume.c: New file.
8187 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8188 unwind-resume in csu subdir.
8189 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8191 (librt-sysdep_routines, librt-shared-only-routines): Add
8193 * sysdeps/pthread/rt-unwind-resume.c: New file.
8194 * unwind-forcedunwind.c: New file.
8195 * Makefile (libpthread-routines): Add unwind-forcedunwind.
8196 (libpthread-shared-only-routines): Likewise.
8197 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8198 * pthreadP.h (pthread_cancel_init): New prototype.
8199 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8201 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8202 attr argument const struct pthread_attr *.
8204 * res.c (__res_state): Return __resp.
8205 * descr.h: Include resolv.h.
8206 (struct pthread): Add res field.
8207 * pthread_create.c: Include resolv.h.
8208 (start_thread): Initialize __resp.
8209 * Makefile (tests): Add tst-_res1.
8210 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8211 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8212 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8214 * tst-_res1.c: New file.
8215 * tst-_res1mod1.c: New file.
8216 * tst-_res1mod2.c: New file.
8218 2003-07-21 Ulrich Drepper <drepper@redhat.com>
8220 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8222 * Makefile: Define various *-no-z-defs variables for test DSOs
8223 which has undefined symbols.
8225 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8227 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8228 Retry if the stwcx fails to store once_control.
8230 2003-07-20 Ulrich Drepper <drepper@redhat.com>
8232 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8233 pthread_attr_setaffinity.
8234 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8235 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8236 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8237 * pthread_attr_destroy.c: Free cpuset element if allocated.
8238 * pthread_create.c: Pass iattr as additional parameter to
8240 * sysdeps/pthread/createthread.c: If attribute is provided and
8241 a new thread is created with affinity set or scheduling parameters,
8242 start thread with CLONE_STOPPED.
8243 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8244 pthread_attr_setaffinity.
8245 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8248 2003-07-15 Ulrich Drepper <drepper@redhat.com>
8250 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8252 2003-07-14 Ulrich Drepper <drepper@redhat.com>
8254 * sysdeps/pthread/configure.in: Require CFI directives also for
8257 2003-07-15 Jakub Jelinek <jakub@redhat.com>
8259 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8262 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8264 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8266 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8267 registers as variables. Call __pthread_mutex_unlock_usercnt.
8268 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8269 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8270 not self pointer in __writer. Compare with TID to determine
8272 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8273 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8275 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8277 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8278 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8279 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8280 macros also when compiling librt.
8282 2003-07-11 Jakub Jelinek <jakub@redhat.com>
8284 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8285 -fasynchronous-unwind-tables.
8286 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8287 (PSEUDO): Add cfi directives.
8288 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8290 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8293 2003-07-08 Jakub Jelinek <jakub@redhat.com>
8295 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8296 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8297 * unwind.c (__pthread_unwind_next): Add hidden_def.
8298 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8300 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8301 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8302 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8304 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8305 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8307 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8308 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8309 __pthread_unregister_cancel and __pthread_unwind_next.
8311 2003-07-04 Jakub Jelinek <jakub@redhat.com>
8313 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8314 different symbol for the cancellation syscall wrapper and
8315 non-cancellation syscall wrapper.
8316 (PSEUDO_END): Define.
8318 2003-07-05 Richard Henderson <rth@redhat.com>
8320 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8321 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8322 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8323 return actual return value from the syscall, not 0.
8325 2003-07-07 Ulrich Drepper <drepper@redhat.com>
8327 * descr.h (struct pthread): Add pid field.
8328 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8329 (__reclaim_stacks): Likewise.
8330 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8331 also check for PID of the signal source.
8332 (__pthread_initialize_minimal_internal): Also initialize pid field
8333 of initial thread's descriptor.
8334 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8335 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8336 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8337 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8338 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8340 2003-07-05 Ulrich Drepper <drepper@redhat.com>
8342 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8343 Fix use of parameter.
8344 (__libc_cleanup_pop): Likewise.
8346 2003-07-04 Ulrich Drepper <drepper@redhat.com>
8348 * init.c (sigcancel_handler): Change parameters to match handler
8349 for SA_SIGACTION. Check signal number and code to recognize
8350 invalid invocations.
8352 2003-07-03 Roland McGrath <roland@redhat.com>
8354 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8355 Apply sizeof (struct pthread) bias to r13 value.
8357 2003-07-03 Ulrich Drepper <drepper@redhat.com>
8359 * sysdeps/pthread/configure.in: Require CFI directives.
8361 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8363 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8364 libpthread compilation.
8365 * unwind.c (__pthread_unwind): Add hidden_def.
8366 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8368 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8370 * libc-cancellation.c (__libc_cleanup_routine): Define.
8371 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8372 (__pthread_cleanup_pop): Define.
8374 2003-07-01 Richard Henderson <rth@redhat.com>
8376 * sysdeps/alpha/elf/pt-initfini.c: New file.
8377 * sysdeps/alpha/pthread_spin_lock.S: New file.
8378 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8379 * sysdeps/alpha/pthreaddef.h: New file.
8380 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8381 * sysdeps/alpha/tls.h: New file.
8382 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8383 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8384 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8385 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8386 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8387 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8388 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8389 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8390 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8391 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8393 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8395 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8396 cleanup support and unwind info.
8398 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8400 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8401 Use correct cleanup handler registration. Add unwind info.
8402 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8403 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8404 * tst-once3.c: Add cleanup handler and check it is called.
8405 * tst-once4.c: Likewise.
8406 * tst-oncex3.c: New file.
8407 * tst-oncex4.c: New file.
8408 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8410 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8412 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8414 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8416 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8417 (tf_msgsnd): Likewise.
8419 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8420 premature returns a bit more.
8422 2003-06-26 Ulrich Drepper <drepper@redhat.com>
8424 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8425 definition to the front.
8427 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8428 the cleanup functions to make the names unique. Fix dwarf opcode
8430 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8431 functions to make the names unique. Fix CFA offset for two blocks.
8433 2003-06-25 Ulrich Drepper <drepper@redhat.com>
8435 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8436 missing closing braces.
8437 Patch by Christophe Saout <christophe@saout.de>.
8439 2003-06-24 Roland McGrath <roland@redhat.com>
8441 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8443 2003-06-24 Ulrich Drepper <drepper@redhat.com>
8445 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8446 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8448 * pthreadP.h: Declare __find_thread_by_id.
8449 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8450 * pthread_clock_gettime.c: Allow using other thread's clock.
8451 * pthread_clock_settime.c: Likewise.
8452 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8453 * Makefile: Add rules to build and run tst-clock2.
8454 * tst-clock2.c: New file.
8456 2003-06-23 Ulrich Drepper <drepper@redhat.com>
8458 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8459 to use exception-based cleanup handler.
8460 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8462 * tst-cond8.c (ch): Announce that we are done.
8464 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8466 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8467 Also test aio_suspend with timeout value.
8469 2003-06-22 Ulrich Drepper <drepper@redhat.com>
8471 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8472 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8475 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8476 (__pthread_mutex_lock_internal): Likewise.
8477 (__pthread_mutex_unlock_internal): Likewise.
8478 (__pthread_mutex_unlock_usercnt): Declare.
8479 * pthread_mutex_destroy.c: Always fail if used in any way.
8480 * pthread_mutex_init.c: Update comment.
8481 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8482 * pthread_mutex_timedlock.c: Adjust __nusers.
8483 * pthread_mutex_trylock.c: Adjust __nusers.
8484 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8485 and public interfaces are wrapper with pass additional parameter.
8486 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8488 * tst-mutex8.c: New file.
8489 * Makefile (tests): Add tst-mutex8.
8490 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8491 __pthread_mutex_unlock_usercnt.
8492 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8493 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8494 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8495 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8496 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8497 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8498 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8500 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8501 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8502 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8503 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8504 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8506 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8507 * pthread_mutex_timedlock.c: Likewise.
8508 * pthread_mutex_trylock.c: Adjust __nusers.
8509 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8510 * tst-mutex9.c: New file.
8511 * Makefile (tests): Add tst-mutex9.
8512 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8513 * sysdeps/ia64/tls.h: Likewise.
8514 * sysdeps/powerpc/tls.h: Likewise.
8515 * sysdeps/s390/tls.h: Likewise.
8516 * sysdeps/sh/tls.h: Likewise.
8517 * sysdeps/x86_64/tls.h: Likewise.
8518 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8519 Change type of __owner.
8520 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8521 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8522 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8523 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8524 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8526 2003-06-19 Jakub Jelinek <jakub@redhat.com>
8528 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8529 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8531 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8532 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8533 instead of nr to lll_futex_wake. Only set errno and return -1
8536 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8537 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8538 return actual return value from the syscall, not 0.
8540 2003-06-18 Ulrich Drepper <drepper@redhat.com>
8542 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8543 find a random value.
8544 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8547 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8548 compat_timer_settime.
8549 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8550 compat_timer_gettime.
8551 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8552 compat_timer_getoverrun.
8553 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8554 compat_timer_delete.
8556 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8557 error-checking mutex detect busy mutexes.
8559 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8561 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8562 Add ax to clobber list.
8563 (lll_mutex_cond_lock): Likewise.
8564 (lll_mutex_unlock): Likewise.
8565 (lll_lock): Likewise.
8566 (lll_unlock): Likewise.
8568 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8569 * tst-cancel18.c: New file.
8570 * tst-cancelx18.c: New file.
8572 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8575 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8576 * tst-cancel17.c: New file.
8577 * tst-cancelx17.c: New file.
8579 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8580 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8581 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8583 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8585 2003-06-16 Jakub Jelinek <jakub@redhat.com>
8587 * sysdeps/pthread/createthread.c (create_thread): Set
8588 header.multiple_threads unconditionally.
8589 * allocatestack.c (allocate_stack): Likewise.
8590 * descr.h (struct pthread): Add header.multiple_threads
8592 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8593 Define for librt. #error if neither libpthread, libc nor librt.
8594 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8596 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8597 CDISABLE): Likewise.
8598 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8599 CDISABLE): Likewise.
8600 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8601 CDISABLE): Likewise.
8602 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8603 CDISABLE): Likewise. Access header.multiple_threads outside of
8604 libc and libpthread.
8605 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8607 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8608 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8610 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8612 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8613 Also test early cancellation before the thread reaches the cancellation
8616 * Makefile: Compile forward.c with exceptions.
8618 * sysdeps/unix/sysv/linux/sleep.c: New file.
8620 2003-06-16 Ulrich Drepper <drepper@redhat.com>
8622 * Makefile: Add CFLAGS definition to compile function wrappers
8623 duplicated from libc with exceptions.
8624 * tst-cancel4.c: Also check cancellation handlers.
8626 * Makefile: Add rules to build and run tst-cancel16 and
8627 tst-cancelx16. Add missing CFLAGS definitions.
8628 * tst-cancel16.c: New file.
8629 * tst-cancelx16.c: New file.
8631 2003-06-15 Ulrich Drepper <drepper@redhat.com>
8633 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8634 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8635 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8636 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8638 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8639 (LIBC_CANCEL_RESET): Likewise.
8640 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8641 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8643 (CFLAGS-libcrt-cancellation.c): Define.
8644 * sysdeps/pthread/librt-cancellation.c: New file.
8645 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8646 macros also when compiling librt.
8647 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8648 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8649 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8650 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8651 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8652 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8653 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8655 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8656 compat_timer_create.
8658 2003-06-14 Ulrich Drepper <drepper@redhat.com>
8660 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8662 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8664 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8665 Add libc_hidden_def.
8667 2003-06-13 Roland McGrath <roland@redhat.com>
8669 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8670 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8672 2003-06-11 Ulrich Drepper <drepper@redhat.com>
8674 * allocatestack.c (queue_stack): Always inline.
8675 * ptreadhP.h (__do_cancel): Likewise.
8677 2003-06-10 Jakub Jelinek <jakub@redhat.com>
8679 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8682 2003-06-10 Ulrich Drepper <drepper@redhat.com>
8684 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8685 (__pthread_cond_signal): Remove incorrect second addition for
8688 2003-06-09 Ulrich Drepper <drepper@redhat.com>
8690 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8691 (__pthread_cond_signal): Use correct futex pointer in
8692 __lll_mutex_lock_wait call.
8694 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8695 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8697 2003-06-08 Ulrich Drepper <drepper@redhat.com>
8699 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8701 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8704 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8705 hand-written CFI generation code. Since ENTRY/END also initiated
8706 CFI frames this caused two CFI sets to be generated.
8708 2003-06-07 Ulrich Drepper <drepper@redhat.com>
8710 * cleanup_routine.c: New file.
8711 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8712 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8714 * Makefile (libpthread-routines): Add cleanup_routine.
8715 Add more CFLAGS variables to compile with exceptions. Add comments
8716 why which file needs unwind tables.
8717 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8719 * tst-cancelx1.c: New file.
8720 * tst-cancelx2.c: New file.
8721 * tst-cancelx3.c: New file.
8722 * tst-cancelx4.c: New file.
8723 * tst-cancelx5.c: New file.
8724 * tst-cancelx6.c: New file.
8725 * tst-cancelx7.c: New file.
8726 * tst-cancelx8.c: New file.
8727 * tst-cancelx9.c: New file.
8728 * tst-cancelx10.c: New file.
8729 * tst-cancelx11.c: New file.
8730 * tst-cancelx12.c: New file.
8731 * tst-cancelx13.c: New file.
8732 * tst-cancelx14.c: New file.
8733 * tst-cancelx15.c: New file.
8734 * tst-cleanupx0.c: New file.
8735 * tst-cleanupx0.expect: New file.
8736 * tst-cleanupx1.c: New file.
8737 * tst-cleanupx2.c: New file.
8738 * tst-cleanupx3.c: New file.
8740 * tst-cleanup0.c: Make standard compliant.
8741 * tst-cleanup1.c: Likewise.
8743 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8744 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8745 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8746 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8747 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8748 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8749 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8751 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8752 * tst-cancel12.c: New file.
8753 * tst-cancel13.c: New file.
8754 * tst-cancel14.c: New file.
8755 * tst-cancel15.c: New file.
8756 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8759 * tst-cancel1.c: Add some comments.
8761 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8764 2003-06-06 Ulrich Drepper <drepper@redhat.com>
8766 * Makefile (CFLAGS-pthread_cancel.c): Define.
8768 2003-06-05 Ulrich Drepper <drepper@redhat.com>
8770 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8771 Change type of __writer element to int.
8772 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8773 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8774 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8775 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8776 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8777 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8778 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8779 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8780 Compare with TID to determine deadlocks.
8781 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8782 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8783 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8784 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8785 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8786 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8788 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8790 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8791 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8792 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8794 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8796 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8797 * Makefile (tests): Add tst-rwlock12.
8798 * tst-rwlock12.c: New file.
8800 2003-06-05 Jakub Jelinek <jakub@redhat.com>
8802 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8803 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8804 Remove bogus hidden_proto.
8805 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8807 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8808 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8809 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8810 ___lll_mutex_timedlock): Likewise.
8812 2003-06-04 Ulrich Drepper <drepper@redhat.com>
8814 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8815 (__pthread_cond_signal): Add some code to eventually handle
8818 2003-06-01 Ulrich Drepper <drepper@redhat.com>
8820 * Makefile (tests): Add tst-exec4.
8821 (tst-exec4-ARGS): Define.
8822 * tst-exec4.c: New file.
8824 2003-05-31 Ulrich Drepper <drepper@redhat.com>
8826 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8827 Also fail if tv_nsec < 0.
8828 (__lll_timedwait_tid): Likewise.
8829 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8830 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8832 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8834 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8836 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8838 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8840 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8843 * Makefile (tests): Add tst-sem8 and tst-sem9.
8844 * tst-sem8.c: New file.
8845 * tst-sem9.c: New file.
8846 * sem_open.c: Fix creation of in_use record if the file exists but
8849 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8852 * sysdeps/pthread/timer_create.c (timer_create): In case
8853 evp==NULL, assign timer ID to sival_ptr.
8855 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8856 struct pthread_unwind_buf *.
8857 (struct pthread): Likewise for cleanup_jmp_buf element.
8859 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8860 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8861 * unwind.c (__pthread_unwind_next): Likewise.
8863 2003-05-30 Ulrich Drepper <drepper@redhat.com>
8865 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8866 (lll_futex_timed_wait): Use int for futex value parameter.
8867 (lll_futex_wake): Likewise.
8868 (lll_futex_requeue): Likewise.
8870 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8871 Replace one memory operation with one register operation.
8873 * tst-join4.c (do_test): Fix error message.
8875 * tst-rwlock6.c (do_test): Use correct format specifier.
8877 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8878 (__lll_mutex_lock_wait): Replace one memory operation with one
8880 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8881 (__lll_mutex_lock_wait): Likewise.
8883 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8884 (__lll_mutex_cond_lock): Add one to value parameter of
8885 __lll_lock_wait to reflect reality in the futex syscall.
8886 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8887 (lll_mutex_cond_lock): Likewise.
8889 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8891 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8893 (lll_mutex_cond_lock): Define.
8895 2003-05-29 Ulrich Drepper <drepper@redhat.com>
8897 * Makefile (tests): Add tst-signal6.
8898 * tst-signal6.c: New file.
8900 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8901 (__lll_mutex_unlock_force): New function
8902 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8904 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8905 (__lll_mutex_unlock_force): New function.
8906 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8908 * tst-rwlock7.c (do_test): Use correct format specifier.
8910 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8911 Find break parameter in correct asm argument.
8913 2003-05-27 Jakub Jelinek <jakub@redhat.com>
8915 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8917 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8919 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8921 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8922 lll_futex_requeue, lll_mutex_unlock_force): Define.
8924 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8926 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8927 (pthread_cond_t): Add __mutex.
8928 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8929 lll_futex_requeue, lll_mutex_unlock_force): Define.
8931 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8933 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8934 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8936 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8938 (lll_futex_wait, lll_futex_wake): Define.
8939 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8940 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8941 FUTEX_REQUEUE instead of FUTEX_WAIT.
8942 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8943 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8944 mutex which was used in condvar structure. Call
8945 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8946 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8948 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8949 include tcb-offsets.h. Read wakeup value in locked region.
8950 Use the value of gbr register as THREAD_ID.
8951 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8952 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8953 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8955 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8958 2003-05-28 Ulrich Drepper <drepper@redhat.com>
8960 * sysdeps/pthread/pthread_cond_broadcast.c
8961 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8963 2003-05-26 Ulrich Drepper <drepper@redhat.com>
8965 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8966 typo in register name.
8967 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8968 correctly. Actually use requeue. Little optimization.
8969 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8970 mutex address early. Handle cancellation state as 32-bit value.
8971 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8972 Remove unnecessary label.
8974 2003-05-25 Ulrich Drepper <drepper@redhat.com>
8976 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8977 instead of FUTEX_WAIT.
8978 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8979 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8980 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8981 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8982 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8983 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8984 used in condvar structure. Call __pthread_mutex_cond_lock instead
8985 of __pthread_mutex_lock_internal.
8986 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8987 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8988 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8989 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8990 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8991 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8992 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8993 Add pthread_mutex_cond_lock.
8994 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8995 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8996 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8997 lll_mutex_cond_lock.
8998 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8999 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9000 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9002 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9003 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9005 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
9006 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9008 * pthreadP.h: Declare __pthread_mutex_cond_lock.
9009 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
9010 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
9011 macro don't define aliases.
9013 * cancellation.c: Remove __pthread_enable_asynccancel_2.
9014 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
9015 * sysdeps/pthread/pthread_cond_timedwait.c: Use
9016 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
9017 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9018 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9019 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9020 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9021 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9023 2003-05-17 Ulrich Drepper <drepper@redhat.com>
9025 * sem_open.c: Fix one endless loop. Implement correct semantics
9026 wrt opening the same semaphore more then once.
9027 * sem_close.c: Adjust for sem_open change.
9028 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
9029 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
9030 * Makefile (tests): Add tst-sem7.
9031 * tst-sem7.c: New file.
9033 2003-05-16 Roland McGrath <roland@redhat.com>
9035 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
9036 uninitialized variable braino.
9038 2003-05-16 Ulrich Drepper <drepper@redhat.com>
9040 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
9041 test for syscall availability.
9043 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
9044 __no_posix_timers to -1 if the syscalls don't exist.
9046 * pthread_join.c (pthread_join): Set tid field of the joined
9047 thread to -1. This isn't necessary but helps to recognize some
9048 error conditions with almost no cost.
9050 * allocatestack.c (FREE_P): Also negative values indicate an
9053 * unwind.c: Include <unistd.h>.
9055 2003-05-14 Ulrich Drepper <drepper@redhat.com>
9057 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9059 2003-05-14 Jakub Jelinek <jakub@redhat.com>
9061 * Makefile (crti-objs, crtn-objs): New variables.
9062 (omit-deps, extra-objs): Add crtn.
9063 ($(objpfx)libpthread.so): Depend on both crti and crtn
9064 and links to them in multidir.
9065 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9067 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
9069 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9070 (lll_mutex_unlock): Use atomic_exchange_rel.
9072 2003-05-11 Ulrich Drepper <drepper@redhat.com>
9074 * cond-perf.c (cons): Add missing locking around setting of alldone.
9076 2003-05-10 Ulrich Drepper <drepper@redhat.com>
9078 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9080 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9082 2003-05-09 Ulrich Drepper <drepper@redhat.com>
9084 * tst-sem6.c: New file.
9085 * Makefile (tests): Add tst-sem6.
9087 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9088 Use atomic_exchange_rel instead of atomic_exchange.
9089 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9092 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9093 code for lll_futex_wait and lll_futex_wake in static apps. Use
9094 vsyscall is possible.
9096 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9097 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9098 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9099 pthread_setaffinity_np.
9100 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9101 and pthread_setaffinity_np.
9102 * Makefile (libpthread-routines): Add pthread_getaffinity and
9103 pthread_setaffinity.
9105 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9106 use it in case mmap to allocate the stack fails.
9107 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9108 ARCH_MAP_FLAGS here.
9109 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9112 2003-05-08 Ulrich Drepper <drepper@redhat.com>
9114 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9115 handler implementation. It is now lockless in fork().
9116 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9117 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9118 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
9119 declare the __fork_*_lists.
9120 (struct fork_handler): Include pointers to all three functions.
9121 Add next, refcntr and need_signal elements.
9122 (__fork_handlers): New declaration.
9123 (__register_atfork_malloc): Remove declaration.
9124 (HAVE_register_atfork_malloc): Remove definition.
9125 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9126 __pthread_child_handler variable.
9127 (__libc_pthread_init): Use __register_atfork instead of explicitly
9129 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9131 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9133 * unwind.c (unwind_cleanup): Print error message and then abort. This
9134 function must never be reached.
9136 * cond-perf.c: New file.
9138 2003-05-05 Ulrich Drepper <drepper@redhat.com>
9140 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9142 2003-05-04 Roland McGrath <roland@redhat.com>
9144 * Makefile ($(objpfx)../libc.so): New target.
9146 2003-05-02 Ulrich Drepper <drepper@redhat.com>
9148 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9149 (pthread_condattr_t): Size is only an int, don't use long for
9151 (pthread_mutexattr_t): Likewise.
9152 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9153 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9154 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9156 2003-05-01 Ulrich Drepper <drepper@redhat.com>
9158 * sysdeps/i386/tls.h: Define THREAD_ID.
9159 * sysdeps/ia64/tls.h: Likewise.
9160 * sysdeps/powerpc/tls.h: Likewise.
9161 * sysdeps/s390/tls.h: Likewise.
9162 * sysdeps/sh/tls.h: Likewise.
9163 * sysdeps/x86_64/tls.h: Likewise.
9164 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9166 * pthread_mutex_timedlock.c: Likewise.
9167 * pthread_mutex_trylock.c: Likewise.
9168 * pthread_mutex_unlock.c: Likewise.
9169 * pthread_rwlock_trywrlock.c: Likewise.
9170 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9171 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9172 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9173 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9175 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9178 2003-04-29 Jakub Jelinek <jakub@redhat.com>
9180 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9181 (__SIZEOF_PTHREAD_COND_T): Define to 48.
9182 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9183 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9184 Make __align long long instead of long.
9185 (pthread_rwlock_t): Formatting.
9186 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9187 (pthread_rwlock_t): Formatting.
9188 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9189 (pthread_cond_t): Make __align long long instead of long.
9190 (pthread_rwlock_t): Move __flags field to the same position as in
9193 2003-04-30 Ulrich Drepper <drepper@redhat.com>
9195 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9196 * tst-rwlock7.c (do_test): Likewise.
9198 2003-04-26 Roland McGrath <roland@redhat.com>
9200 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9202 2003-04-22 Jakub Jelinek <jakub@redhat.com>
9204 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9205 sizeof (struct pthread).
9206 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9208 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9210 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9212 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9214 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9216 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9218 (NO_TLS_OFFSET): Define.
9219 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9220 add TLS_TCB_SIZE unnecessarily.
9222 2003-04-22 Roland McGrath <roland@redhat.com>
9224 * Makeconfig (shared-thread-library): Reverse link order to work
9227 2003-04-22 Ulrich Drepper <drepper@redhat.com>
9229 * semaphore.h: Fix typo in comment.
9231 2003-04-21 Ulrich Drepper <drepper@redhat.com>
9233 * sysdeps/pthread/sigfillset.c: New file.
9235 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9236 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9237 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9238 * sysdeps/pthread/sigaction.c: Likewise.
9239 * sysdeps/pthread/sigprocmask.c: New file.
9240 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9242 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9243 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9246 2003-04-19 Ulrich Drepper <drepper@redhat.com>
9248 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9249 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9251 * sysdeps/unix/sysv/linux/unregister-atfork.c
9252 (__unregister_atfork): Don't free memory not allocated dynamically.
9254 * semaphore.h: Remove __THROW marker from cancellation points.
9255 * nptl/sysdeps/pthread/pthread.h: Likewise.
9257 2003-04-18 Ulrich Drepper <drepper@redhat.com>
9259 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9260 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9263 2003-04-16 Jakub Jelinek <jakub@redhat.com>
9265 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9267 2003-04-15 Roland McGrath <roland@redhat.com>
9269 * forward.c (__pthread_unwind): Tweak to avoid warning.
9271 2003-04-15 Ulrich Drepper <drepper@redhat.com>
9273 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9275 2003-04-14 Ulrich Drepper <drepper@redhat.com>
9277 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9278 overflow CFA advance instructions.
9279 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9281 2003-04-14 Jakub Jelinek <jakub@redhat.com>
9283 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9284 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9285 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9288 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9289 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9290 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9291 DW_CFA_advance_loc for .Laddl-.Lsubl.
9293 2003-04-13 Ulrich Drepper <drepper@redhat.com>
9295 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9296 position-independent unwind data for static libraries.
9297 Add missing unwind info. Add comments.
9299 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9300 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9301 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9302 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9304 2003-04-12 Ulrich Drepper <drepper@redhat.com>
9306 * Makefile: Make sure all cancellation points are compiled with
9307 exception and asynchronous unwind tables.
9309 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9310 which mishandles loading of global object addresses in PIC.
9311 (THREAD_SETMEM_NC): Likewise.
9313 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9315 * pthread.h: Define new data structure for cleanup buffer. Declare
9316 new cleanup handler interfaces.
9317 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9318 (struct pthread): Add cleanup_jmp_buf pointer. Define
9319 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9320 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9321 it. Declare old cleanup handler installation functions.
9322 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9324 * cleanup_defer.c: Likewise.
9325 * cleanup_compat.c: New file. Old cleanup code.
9326 * cleanup_def_compat.c: New file. Old cleanup code.
9327 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9328 if own thread descriptor.
9329 * unwind.c: New file.
9330 * forward.c: Add __pthread_unwind.
9331 * init.c (pthread_functions): Add __pthread_unwind.
9332 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9333 Add ptr___pthread_unwind.
9334 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9335 and unwind function.
9336 * Makefile (libpthread-routines): Add cleanup_compat,
9337 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9338 table generation if necessary.
9339 * version.c: Record whether unwind support is compiled in.
9340 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9341 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9343 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9344 complication to generate unwind information for syscall wrappers.
9345 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9346 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9347 __cleanup_fct_attribute.
9349 * Makefile: Add rules to build and run tst-cleanup0.
9350 * tst-cleanup0.c: New file.
9351 * tst-cleanup0.expect: New file.
9353 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9354 caller. Optimize to avoid often unecessary local variable.
9356 2003-04-11 Roland McGrath <roland@redhat.com>
9358 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9359 sets variable `multidir'; include that.
9360 (generated): Add it.
9361 ($(objpfx)$(multidir)/crti.o): New target.
9362 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9364 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9366 * tst-attr2.c (do_test): Add cast to avoid warning.
9367 * tst-mutex4.c (do_test): Likewise.
9369 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9371 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9374 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9376 * Makefile (tests): Add tst-detach1.
9377 * tst-detach1.c: New file.
9379 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9381 * sysdeps/pthread/pthread.h: Remove duplicate
9382 pthread_cleanup_{push,pop} definitions.
9384 * tst-barrier2.c: Eliminate warnings.
9385 * tst-cancel4.c: Likewise.
9386 * tst-cond4.c: Likewise.
9387 * tst-cond6.c: Likewise.
9388 * tst-detach1.c: Likewise.
9389 * tst-rwlock4.c: Likewise.
9390 * tst-rwlock6.c: Likewise.
9391 * tst-rwlock7.c: Likewise.
9392 * tst-sem3.c: Likewise.
9393 * tst-spin2.c: Likewise.
9394 * tst-umask1.c: Likewise.
9396 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9398 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9400 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9402 * descr.h (struct pthread): Move cancelhandling member to the front.
9404 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9406 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9407 malloc_parent, and malloc_child statically.
9408 (__register_atfork_malloc): New function.
9409 (free_mem): Don't free any of the malloc_* variables on the list.
9410 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9411 Define HAVE_register_atfork_malloc.
9413 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9415 * sysdeps/pthread/createthread.c (create_thread): Add some more
9416 comments explaining when to set multiple_threads and when not.
9418 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9419 THREAD_ATOMIC_BIT_SET if not already defined.
9420 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9421 THREAD_ATOMIC_BIT_SET:
9422 * sysdeps/x86_64/tls.h: Likewise.
9423 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9424 THREAD_ATOMIC_CMPXCHG_VAL.
9425 (_pthread_cleanup_pop_restore): Likewise.
9426 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9427 (__pthread_enable_asynccancel_2): Likewise.
9428 (__pthread_disable_asynccancel): Likewise.
9429 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9430 (__libc_disable_asynccancel): Likewise.
9431 * init.c (sigcancel_handler): Likewise.
9432 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9433 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9435 2003-04-03 Ulrich Drepper <drepper@redhat.com>
9437 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9438 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9439 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9440 * Makefile (tests): Add tst-cancel11.
9441 * tst-cancel11.c: New file.
9443 2003-04-01 Ulrich Drepper <drepper@redhat.com>
9445 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9446 round, not the first. Use specific_used flag instead of local
9447 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9448 (__free_tcb): Don't call deallocate_tsd here.
9449 (start_thread): Call deallocate_tsd here.
9450 * pthread_setspecific.c: Set specific_used flag really only when
9452 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9453 * tst-tsd3.c: New file.
9454 * tst-tsd4.c: New file.
9456 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9458 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9459 Use atomic_exchange_and_add instead of __lll_add.
9460 (__lll_mutex_timedlock): Likewise.
9461 Patch by Ian Wienand.
9463 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9465 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9466 (SINGLE_THREAD_P): Fix typo.
9467 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9469 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9471 * Makefile (tests): Add tst-align.
9472 * tst-align.c: New file.
9473 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9475 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9478 * tst-tsd2.c: Add casts to avoid warnings.
9480 2003-03-30 Ulrich Drepper <drepper@redhat.com>
9482 * descr.h (struct pthread): Move most often used elements to the front.
9484 2003-03-29 Ulrich Drepper <drepper@redhat.com>
9486 * Makefile (libpthread-routines): Add pthread_atfork.
9487 (libpthread-static-only-routines): Add pthread_atfork.
9489 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9491 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9493 (INSTALL_DTV): Add parens.
9494 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9495 Use passed descr instead of THREAD_SELF.
9496 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9497 (__lll_mutex_timedlock_wait): Correct expected value after
9499 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9500 Release lock before waking up the waiters.
9501 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9502 criteria. Reorderstruct passed to cleanup handler. Fix
9503 handling of cancellation and failung pthread_mutex_unlock call.
9504 Use __pthread_enable_asynccancel_2 instead of
9505 __pthread_enable_asynccancel.
9506 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9507 Return result of lock re-get if it fails.
9508 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9509 for __pthread_cleanup_push.
9510 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9511 completely broken rwlock implementation.
9512 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9513 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9514 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9515 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9516 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9517 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9518 versioned_symbol macro.
9519 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9520 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9522 2003-03-27 Ulrich Drepper <drepper@redhat.com>
9524 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9525 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9527 (struct timer): Remove th and bar field.
9528 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9529 debugging code. Create only one helper thread.
9530 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9532 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9533 Renamed. Define statically. Use thread info from siginfo.
9534 (__helper_once): New variable.
9535 (__helper_tid): New variable.
9536 (__reset_helper_control): New function.
9537 (__start_helper_thread): New function.
9539 * pthread_create.c (start_thread): Don't use setjmp inside
9540 __builtin_expect to work around gcc bug.
9542 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9543 timer_delete syscall fails, but not with ENOSYS, set
9546 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9547 (timer_settime): Fix typo.
9548 * sysdeps/unix/sysv/linux/timer_getoverr.c
9549 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9551 2003-03-27 Jakub Jelinek <jakub@redhat.com>
9553 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9554 offset of cleanupbuf.__prev.
9556 2003-03-26 Jakub Jelinek <jakub@redhat.com>
9558 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9561 2003-03-26 Ulrich Drepper <drepper@redhat.com>
9563 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9564 NULL provide default definition to syscall.
9566 2003-03-25 Roland McGrath <roland@redhat.com>
9568 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9569 (timer_id2ptr): Fix typo.
9571 2003-03-25 Ulrich Drepper <drepper@redhat.com>
9573 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9574 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9575 * sysdeps/ia64/pthreaddef.h: Likewise.
9576 * sysdeps/powerpc/pthreaddef.h: Likewise.
9577 * sysdeps/s390/pthreaddef.h: Likewise.
9578 * sysdeps/sh/pthreaddef.h: Likewise.
9579 * sysdeps/x86_64/pthreaddef.h: Likewise.
9580 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9581 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9583 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9584 SIGTIMER is not unblocked.
9585 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9587 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9589 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9590 pass pointer through as ID.
9591 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9592 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9593 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9594 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9595 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9596 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9597 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9598 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9599 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9600 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9601 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9602 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9603 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9604 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9605 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9606 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9607 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9608 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9609 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9610 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9611 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9612 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9613 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9614 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9615 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9616 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9617 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9618 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9619 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9620 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9621 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9622 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9623 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9625 * pthreadP.h: Remove FRAME_LEFT definition.
9626 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9627 already left frame. Programs which have this problem are not POSIX
9629 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9631 2003-03-24 Ulrich Drepper <drepper@redhat.com>
9633 * sysdeps/pthread/tst-timer.c: Check return values of the
9636 2003-03-23 Roland McGrath <roland@redhat.com>
9638 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9639 * tst-tls3mod.c: Likewise.
9640 * tst-tls1.c: Likewise.
9641 * tst-tls2.c: Likewise.
9643 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9646 * tst-join5.c (tf1, tf2): Add a cast.
9648 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9650 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9651 Don't test anything.
9652 * tst-cond4.c: Likewise.
9653 * tst-cond6.c: Likewise.
9654 * tst-flock2.c: Likewise.
9655 * tst-mutex4.c: Likewise.
9656 * tst-rwlock4.c: Likewise.
9657 * tst-signal1.c: Likewise.
9658 * tst-spin2.c: Likewise.
9659 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9661 * tst-mutex4.c: Use test-skeleton.c.
9662 * tst-spin2.c: Likewise.
9663 * tst-sysconf.c: Likewise.
9664 * tst-barrier2.c: Likewise.
9665 * tst-cond4.c: Likewise.
9666 * tst-cond6.c: Likewise.
9667 * tst-rwlock4.c: Likewise.
9668 * tst-unload.c: Likewise.
9669 * tst-flock2.c (do_test): Use return instead of exit.
9671 2003-03-22 Jakub Jelinek <jakub@redhat.com>
9673 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9675 2003-03-21 Ulrich Drepper <drepper@redhat.com>
9677 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9678 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9679 instead of __lll_compare_and_swap.
9680 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9682 Removed definition if __lll_compare_and_swap.
9684 * cancellation.c: Adjust for new form of compare&exchange macros.
9685 * cleanup_defer.c: Likewise.
9687 * libc-cancellation.c: Likewise.
9688 * old_pthread_cond_broadcast.c: Likewise.
9689 * old_pthread_cond_signal.c: Likewise.
9690 * old_pthread_cond_timedwait.c: Likewise.
9691 * old_pthread_cond_wait.c: Likewise.
9692 * pthread_cancel.c: Likewise.
9693 * pthread_create.c: Likewise.
9694 * pthread_detach.c: Likewise.
9695 * pthread_join.c: Likewise.
9696 * pthread_key_delete.c: Likewise.
9697 * pthread_setcancelstate.c: Likewise.
9698 * pthread_setcanceltype.c: Likewise.
9699 * pthread_timedjoin.c: Likewise.
9700 * pthread_tryjoin.c: Likewise.
9701 * sysdeps/pthread/createthread.c: Likewise.
9703 2003-03-20 Ulrich Drepper <drepper@redhat.com>
9705 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9706 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9707 definitions. Replace uses with calls to atomic_* functions.
9708 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9709 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9710 __lll_test_and_set calls with atomic_exchange_and_add and
9711 atomic_exchange calls respectively.
9712 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9713 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9714 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9715 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9716 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9717 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9718 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9720 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9721 returns the old value.
9723 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9725 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9726 int for variable OLDVAL and correct inline assembler contraint.
9727 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9728 type int for variable OLD.
9730 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9732 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9733 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9734 instead of multiple_threads field in the TCB.
9736 2003-03-19 Ulrich Drepper <drepper@redhat.com>
9738 * sysdeps/i386/i686/bits/atomic.h: Removed.
9739 * sysdeps/i386/i586/bits/atomic.h: Removed.
9740 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9741 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9742 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9743 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9744 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9745 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9746 * atomic.h: Removed. Moved to glibc.
9748 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9749 support for clock selection.
9751 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9754 2003-03-18 Roland McGrath <roland@redhat.com>
9756 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9757 Add __lll_rel_instr first. Add memory clobber.
9758 (lll_mutex_unlock): Use __lll_test_and_set.
9759 From Paul Mackerras <paulus@samba.org>.
9761 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9763 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9764 (SINGLE_THREAD_P): Add `header.' prefix.
9765 From Paul Mackerras <paulus@samba.org>.
9767 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9768 pthread_timedjoin_np to ...
9769 (libpthread: GLIBC_2.3.3): ... here.
9770 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9772 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9773 Avoid shadowing VAL variable.
9775 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9778 2003-03-18 Ulrich Drepper <drepper@redhat.com>
9780 * Makefile (tests): Add tst-cond11.
9781 * tst-cond11.c: New file.
9783 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9784 struct passed to cleanup handler to eliminate one more
9786 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9788 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9789 (pthrad_cond_t): Replace __unused field with __clock.
9791 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9792 waken all waiters in cleanup handler.
9793 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9794 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9796 * pthread_condattr_getclock.c: New file.
9797 * pthread_condattr_setclock.c: New file.
9798 * sysdeps/pthread/pthread.h: Declare these new functions.
9799 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9800 * Makefile (libpthread-routines): Add the new functions.
9801 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9802 Renamed field to value. Document use of the bits.
9803 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9805 * pthread_condattr_setpshared.c: Likewise.
9806 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9807 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9808 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9810 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9811 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9812 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9813 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9814 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9815 Implement clock selection.
9816 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9817 * pthread-errnos.sym: Add ENOSYS.
9818 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9819 _POSIX_CLOCK_SELECTION.
9820 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9822 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9823 invalid .size directive.
9825 2003-03-17 Roland McGrath <roland@redhat.com>
9827 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9830 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9832 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9833 Use __lll_add instead of spelling it out. Use protected symbol names.
9834 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9836 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9837 Renamed from lll_compare_and_swap. Use new name where necessary.
9838 (__lll_add): Defined.
9839 (__lll_dec_if_positive): Defined.
9840 (__lll_test_and_set): Defined.
9841 * sysdeps/ia64/pthread_spin_init.c: Removed.
9842 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9843 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9844 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9845 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9846 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9847 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9848 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9849 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9850 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9851 __sync_lock_release_si.
9852 Patch by Jakub Jelinek.
9854 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9855 Fix timeout handling.
9856 (__lll_timedwait_tid): Likewise.
9857 (lll_unlock_wake_cb): Wake up other waiters if necessary.
9858 Patch by Jakub Jelinek.
9860 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9862 2003-03-17 Roland McGrath <roland@redhat.com>
9864 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9865 * sysdeps/pthread/pthread_spin_init.c: New file.
9866 * sysdeps/pthread/pthread_spin_unlock.c: New file.
9867 * sysdeps/powerpc/Makefile: New file.
9868 * sysdeps/powerpc/pthread_spin_lock.c: New file.
9869 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9870 * sysdeps/powerpc/pthreaddef.h: New file.
9871 * sysdeps/powerpc/tcb-offsets.sym: New file.
9872 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9873 * sysdeps/powerpc/tls.h: New file.
9874 * sysdeps/powerpc/bits/atomic.h: New file.
9875 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9876 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9877 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9879 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9880 * sysdeps/unix/sysv/linux/sem_post.c: New file.
9881 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9882 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9883 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9884 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9885 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9886 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9887 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9888 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9889 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9890 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9891 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9892 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9893 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9895 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9897 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9898 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9899 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9900 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9901 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9903 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9905 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9906 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9907 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9908 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9909 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9911 2003-03-16 Roland McGrath <roland@redhat.com>
9913 * tst-fork4.c: Include <string.h>.
9914 * tst-signal2.c: Likewise.
9915 * tst-mutex5.c (do_test): exit -> return.
9916 * tst-mutex2.c: Include <stdlib.h>.
9918 2003-03-16 Ulrich Drepper <drepper@redhat.com>
9920 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9921 (__lll_mutex_timedlock_wait): Correct expected value after
9922 spurious wakeup. Otherwise we would never wait again.
9924 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9925 zone versus inline asm stupidity. Use correct instructions.
9927 * tst-rwlock6.c: Add some more status output.
9929 2003-03-15 Roland McGrath <roland@redhat.com>
9931 * sysdeps/pthread/configure.in: New file.
9932 * sysdeps/pthread/configure: New file (generated).
9934 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9936 * allocatestack.c (allocate_stack): Store the exact stack size of
9937 user allocated stacks.
9939 2003-03-15 Jakub Jelinek <jakub@redhat.com>
9941 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9942 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9943 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9944 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9945 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9946 Use `header.' prefix.
9947 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9949 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9951 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9952 __builtin_frame_address, use stack pointer.
9954 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9955 instead of __builtin_frame_pointer.
9957 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9959 * tst-basic1.c (do_test): Add cast to avoid warning.
9960 * tst-basic2.c (do_test): Likewise.
9962 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9963 amount of stack correction.
9965 * tst-fork4.c: Use test-skeleton.c.
9967 2003-03-14 Roland McGrath <roland@redhat.com>
9969 * init.c: Fix typo "#eli" for "#else".
9971 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9973 * allocatestack.c (__stack_user): Use hidden_data_def.
9974 * pthread_create.c (__pthread_keys): Likewise.
9976 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9978 2003-03-14 Roland McGrath <roland@redhat.com>
9980 * tst-fork4.c: New file.
9981 * Makefile (tests): Add it.
9983 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9984 we always define the padding space.
9985 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9986 stopped supporting its own extensions fully.
9987 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9988 struct also called `header', so `header.multiple_threads' is the field
9989 name to use on all machines.
9990 * allocatestack.c (allocate_stack): Use `header.' prefix.
9991 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9992 * pthread_create.c (__pthread_create_2_1): Likewise.
9993 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9994 (THREAD_SELF): Likewise.
9995 * sysdeps/x86_64/tls.h: Likewise.
9996 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9997 (SINGLE_THREAD_P): Likewise.
9998 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9999 (SINGLE_THREAD_P): Likewise.
10000 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10001 (SINGLE_THREAD_P): Likewise.
10003 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
10006 2003-03-14 Ulrich Drepper <drepper@redhat.com>
10008 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
10009 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
10011 * pthread_create.c (start_thread): setjmp is expected to return 0.
10013 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
10014 (THREAD_GETMEM_NC): Likewise.
10016 2003-03-13 Ulrich Drepper <drepper@redhat.com>
10018 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
10019 and the size of the stack which must be allocated is a multiple,
10020 allocate one more page.
10021 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
10022 MULTI_PAGE_ALIASING.
10024 2003-03-13 Roland McGrath <roland@redhat.com>
10026 * pthread_create.c (start_thread): Set EXITING_BIT after the
10027 event-reporting (and destructors), not before.
10029 2003-03-13 Jakub Jelinek <jakub@redhat.com>
10031 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
10032 lll_futex_wake): Declare register variables as long int instead of
10033 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
10034 Make syscall arguments clobbered by the syscall.
10035 (lll_futex_wait): Define using lll_futex_timed_wait.
10037 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
10040 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
10041 PPID if [! NDEBUG].
10043 * allocatestack.c (nptl_ncreated): Only declare if
10044 COLORING_INCREMENT != 0.
10046 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10047 (__libc_enable_asynccancel_2): Remove prototype.
10049 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10050 ctid to match kernel.
10052 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10054 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10055 libc_multiple_threads.
10056 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10057 __libc_multiple_threads to...
10058 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
10060 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10062 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10063 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10065 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10066 (__pthread_once_internal): Define.
10068 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10069 macros instead of .symver directly.
10070 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10071 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10073 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10074 * sysdeps/x86_64/tcb-offsets.sym: New file.
10075 * sysdeps/x86_64/Makefile: New file.
10077 * sysdeps/i386/tcb-offsets.sym: Add SELF.
10078 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10079 to access own pthread_t in TCB.
10080 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10082 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10084 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10086 2003-03-12 Roland McGrath <roland@redhat.com>
10088 * pthread-errnos.sym: New file.
10089 * Makefile (gen-as-const-headers): New variable, list that file.
10090 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10091 header <pthread-errnos.h> instead of defining errno values here.
10092 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10093 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10094 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10095 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10096 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10098 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10100 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10101 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10102 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10103 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10104 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10105 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10106 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10107 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10108 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10109 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10110 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10111 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10112 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10113 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10114 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10115 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10116 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10117 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10118 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10119 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10120 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10121 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10122 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10123 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10124 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10125 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10126 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10128 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10129 CLONE_CHILD_SETTID worked.
10131 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10133 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10135 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10138 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10139 (pthread_cond_t): Add padding.
10141 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10142 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10143 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10145 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10146 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10147 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10148 (__pthread_rwlock_timedrdlock): Likewise.
10149 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10150 (__pthread_rwlock_wrlock): Likewise.
10151 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10152 (__pthread_rwlock_rdlock): Likewise.
10154 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10156 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10157 result of lock re-get if it fails.
10159 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10161 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10162 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10163 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10164 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10165 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10166 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10167 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10168 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10169 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10170 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10172 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10173 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10175 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10176 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10177 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10178 (create_thread): Likewise.
10179 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10180 * init.c (__pthread_initialize_minimal_internal): Initialize
10181 __libc_multiple_threads_ptr if necessary.
10182 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
10183 __pthread_multiple_threads and __libc_multiple_threads_ptr.
10184 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10185 __libc_multiple_threads.
10186 (__libc_pthread_init): Return pointer to __libc_pthread_init if
10189 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10190 (THREAD_SETMEM_NC): Likewise.
10192 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10193 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10194 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10195 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10197 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10198 Eliminate one entire instruction.
10200 * cancellation.c (__pthread_enable_asynccancel_2): New function.
10201 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10202 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10203 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10204 instead of __pthread_enable_asynccancel.
10205 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10206 (__pthread_cond_wait): Likewise.
10207 * sysdeps/pthread/pthread_cond_timedwait.c
10208 (__pthread_cond_timedwait): Likewise.
10209 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10211 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10212 (__condvar_cleanup): Wake up all waiters in case we got signaled
10213 after being woken up but before disabling asynchronous
10215 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10216 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10217 (__condvar_cleanup): Likewise.
10219 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10220 Make it an error if architecture has no #if case. Add x86-64.
10222 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10223 pt-initfini.s generation.
10225 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10226 (TLS_INIT_TP): Fix typo.
10228 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10230 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10231 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10233 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10234 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10235 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10236 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10237 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10238 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10239 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10240 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10242 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10244 * sysdeps/pthread/pthread_cond_timedwait.c
10245 (__pthread_cond_timedwait): Return the result of the final
10246 locking. If it succeeds, the regular function return value.
10248 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10249 Return result of the final locking.
10250 * version.c (__nptl_main): Work around problems with the strange
10251 INTERNAL_SYSCALL macro on ppc32.
10252 * init.c (__pthread_initialize_minimal_internal): Unblock
10253 SIGCANCEL in case the parent blocked it.
10254 Reported by Paul Mackerras <paulus@samba.org>.
10256 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10257 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10258 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10260 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10262 * sysdeps/pthread/pthread_cond_timedwait.c
10263 (__pthread_cond_timedwait): Unlock and fail if
10264 __pthread_mutex_unlock_internal failed.
10266 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10267 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10269 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10270 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10271 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10272 ALLOCATE_STACK): New macros.
10273 (TLS_TPADJ): New macro.
10274 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10275 (allocate_stack): Handle TLS_DTV_AT_TP and
10276 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10277 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10278 Don't set PD->self.
10279 * init.c [__ia64__] (__NR_set_tid_address): Define.
10281 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10282 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10283 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10284 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10285 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10286 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10287 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10288 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10289 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10290 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10291 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10292 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10293 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10294 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10295 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10296 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10297 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10298 * sysdeps/ia64/bits/atomic.h: New file.
10299 * sysdeps/ia64/Makefile: New file.
10300 * sysdeps/ia64/pthread_spin_init.c: New file.
10301 * sysdeps/ia64/pthread_spin_lock.c: New file.
10302 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10303 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10304 * sysdeps/ia64/pthreaddef.h: New file.
10305 * sysdeps/ia64/tcb-offsets.sym: New file.
10306 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10307 * sysdeps/ia64/tls.h: New file.
10309 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10310 to syscall instead of no arguments.
10312 2003-03-10 Ulrich Drepper <drepper@redhat.com>
10314 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10315 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10316 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10317 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10319 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10322 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10324 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10325 lowlevelbarrier.sym.
10326 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10327 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10328 Include lowlevelbarrier.h and don't define offsets locally.
10329 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10331 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10332 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10333 (__lll_mutex_timedlock_wait): Likewise.
10334 (lll_mutex_lock): Adjust asm for that.
10335 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10336 (lll_lock): Adjust asm for operand order change.
10337 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10338 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10340 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10341 Reverse order of parameters.
10342 (__lll_timedwait_tid): Remove regparms attribute.
10343 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10344 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10346 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10347 (__lll_timedwait_tid): Remove one unnecessary instruction.
10349 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10350 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10351 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10354 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10355 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10357 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10360 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10361 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10363 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10364 define LOCK here (if UP is not defined). The actual code is in
10367 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10368 LOCK is already defined. Don't define lll_unlock_wake_cb and
10369 __lll_timedwait_tid for libc.so.
10370 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10371 define LOCK here (if UP is not defined). The actual code is in
10374 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10375 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10376 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10377 instead of lowlevelsem.h.
10378 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10379 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10380 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10382 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10383 lowlevelrwlock.sym.
10384 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10385 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10386 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10388 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10390 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10391 last changed. D'oh.
10393 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10395 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10396 of __libc_locking_needed.
10397 (lll_trylock): Initialize %eax to zero.
10399 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10400 pthread_cond_t definition.
10402 2003-03-10 Roland McGrath <roland@redhat.com>
10404 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10405 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10406 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10407 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10408 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10410 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10411 Instead of setting PD->multiple_threads, set globals
10412 __pthread_multiple_threads and __libc_multiple_threads.
10413 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10414 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10415 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10417 * descr.h (struct pthread): Conditionalize first member on
10418 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10419 containing an anonymous tcbhead_t. Move `list' member out.
10420 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10421 * allocatestack.c: Remove use of `header.data.' prefix.
10422 * pthread_create.c: Likewise.
10423 * init.c (__pthread_initialize_minimal_internal): Likewise.
10424 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10425 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10426 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10427 * sysdeps/x86_64/tls.h: Likewise.
10428 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10429 (SINGLE_THREAD_P): Likewise.
10430 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10431 (SINGLE_THREAD_P): Likewise.
10432 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10433 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10435 2003-03-09 Ulrich Drepper <drepper@redhat.com>
10437 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10439 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10440 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10442 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10443 leftovers from the ia32 code.
10445 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10447 (clear_once_control): Don't load %esi.
10449 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10452 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10454 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10455 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10457 * Makefile (tests): Add tst-cond10.
10458 * tst-cond10.c: New file.
10460 2003-03-08 Ulrich Drepper <drepper@redhat.com>
10462 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10463 * tst-signal3.c (do_test): Likewise.
10464 * tst-sem5.c (do_test): Likewise.
10465 * tst-kill6.c (do_test): Likewise.
10466 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10468 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10470 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10471 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10472 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10473 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10474 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10475 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10476 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10478 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10480 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10481 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10482 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10483 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10484 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10485 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10486 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10487 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10489 * allocatestack.c (allocate_stack): If mprotect() fails free the
10492 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10494 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10496 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10497 lll_wake_tid. This was used only to work around kernel limits in
10499 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10500 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10501 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10502 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10504 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10505 (__pthread_initialize_minimal_internal): Change initialization of
10506 __static_tls_align_m1 appropriately.
10507 * pthreadP.h (__static_tls_align_m1): Renamed from
10508 __static_tls_align.
10509 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10510 instead of __static_tls_align-1.
10512 2003-03-04 Ulrich Drepper <drepper@redhat.com>
10514 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10516 * pthread_create.c: Define __pthread_keys using nocommon
10517 attribute, not by placing it explicitly in bss.
10518 Remove DEFINE_DEALLOC definition. Not needed anymore.
10520 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10521 Use it in mmap call to allocate stacks.
10523 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10525 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10526 result of the thread function.
10528 2003-03-03 Ulrich Drepper <drepper@redhat.com>
10530 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10531 version is just fine.
10533 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10534 (__pthread_child_handler): Renamed from pthread_child_handler,
10535 exported, and marked hidden. Change all users.
10536 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10537 free __pthread_child_handler from child list.
10539 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10541 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10543 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10544 Fix handling of cancellation and failing pthread_mutex_unlock call.
10545 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10546 (__pthread_cond_wait): Likewise.
10548 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10549 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10550 lll_futex_timed_wait call.
10551 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10552 (pthread_rwlock_timedwrlock): Likewise.
10554 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10555 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10556 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10558 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10559 check of lll_futex_wake return value.
10561 2003-03-03 Roland McGrath <roland@redhat.com>
10563 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10565 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10566 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10567 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10569 2003-03-02 Ulrich Drepper <drepper@redhat.com>
10571 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10572 error for CPU clocks.
10574 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10575 _POSIX_MONOTONIC_CLOCK.
10576 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10578 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10581 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10583 * descr.h (struct pthread): Move cleanup field to the front.
10585 2003-03-01 Roland McGrath <roland@redhat.com>
10587 * sem_open.c (sem_open): Braino fix.
10589 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10591 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10592 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10593 __pthread_cleanup_pop functionality.
10594 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10596 * descr.h (struct pthread): Move tid field to the front now that
10599 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10600 (__lll_mutex_timedlock_wait): Remove.
10601 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10602 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10603 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10604 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10605 (lll_unlock_wake_cb): Don't save and restore %esi.
10606 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10608 (__lll_timedwait_tid): Add alignment.
10609 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10610 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10612 (__lll_timedwait_tid): Removed.
10613 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10614 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10615 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10616 (pthread_barrier_wait): Don't save, load, and restore %esi for
10618 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10619 (__pthread_cond_signal): Don't save, load, and restore %esi.
10620 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10621 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10622 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10623 Don't save, load, and restore %esi.
10625 2003-02-27 Ulrich Drepper <drepper@redhat.com>
10627 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10628 Release lock before waking up the waiters.
10630 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10632 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10633 (reader_thread): Likewise.
10635 * sysdeps/pthread/pthread_rwlock_unlock.c
10636 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10637 to wake up readers if there are none.
10639 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10640 Release internal lock before wake threads.
10642 2003-02-26 Ulrich Drepper <drepper@redhat.com>
10644 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10645 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10647 * tst-rwlock9.c: Likewise.
10648 * tst-rwlock10.c: New file.
10649 * tst-rwlock11.c: New file.
10651 * Makefile (tests): Add tst-dlsym1.
10652 * tst-dlsym1.c: New file.
10654 * init.c (__pthread_initialize_minimal_internal): Set
10655 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10656 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10658 2003-02-24 Ulrich Drepper <drepper@redhat.com>
10660 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10662 * tst-cond2.c: Fix sychronization with child.
10664 * tst-rwlock8.c (reader_thread): Remove unused variable.
10666 * Makefile: Add rules to build and run tst-tls3.
10667 * tst-tls3.c: New file.
10668 * tst-tls3mod.c: New file.
10670 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10671 * tst-rwlock8.c: New file.
10672 * tst-rwlock9.c: New file.
10673 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10674 complete broken rwlock implementation.
10675 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10677 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10679 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10680 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10681 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10682 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10683 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10684 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10685 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10687 2003-02-23 Roland McGrath <roland@redhat.com>
10689 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10691 2003-02-23 Ulrich Drepper <drepper@redhat.com>
10693 * Makefile (tests): Add tst-context1.
10694 * tst-context1.c: New file.
10696 * Makefile (tests): Add tst-tls1 and tst-tls2.
10697 * tst-tls1.c: New file.
10698 * tst-tls2.c: New file.
10700 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10701 for failed cmpxchg.
10703 * pthread_create.c (start_thread): Set EXITING_BIT early.
10705 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10706 (THREAD_GETMEM_NC): Likewise.
10708 2003-02-22 Ulrich Drepper <drepper@redhat.com>
10710 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10711 off 3 more bytes by using offset-less instructions when possible.
10713 * Makefile: Add dependency for $(objpfx)version.d.
10715 * eintr.c (eintr_source): Add unnecessary return but the compiler
10718 * tst-kill3.c: Include <unistd.h>.
10720 2003-02-21 Roland McGrath <roland@redhat.com>
10722 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10724 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10726 * Makefile (tests): Add tst-eintr1.
10727 (distribute): Add eintr.c.
10728 * tst-eintr1.c: New file.
10729 * eintr.c: New file.
10731 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10733 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10734 Disallow sending SIGCANCEL.
10736 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
10737 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10738 * tst-kill1.c: New file.
10739 * tst-kill2.c: New file.
10740 * tst-kill3.c: New file.
10741 * tst-kill5.c: New file.
10742 * tst-kill6.c: New file.
10743 * tst-basic7.c: Renamed to...
10744 * tst-kill4.c: ...this.
10746 2003-02-21 Roland McGrath <roland@redhat.com>
10748 * Makefile (install-lib-ldscripts): New variable.
10750 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10752 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10753 * pthread_cancel.c: Use INVALID_TD_P.
10754 * pthread_detach.c: Likewise.
10755 * pthread_getschedparam.c: Likewise.
10756 * pthread_setschedparam.c: Likewise.
10757 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10758 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10759 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10760 * pthread_timedjoin.c: Likewise.
10762 * tst-basic7.c: Include <signal.h>.
10764 * pthread_join.c (pthread_join): Limited checking for invalid
10766 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10768 2003-02-20 Ulrich Drepper <drepper@redhat.com>
10770 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10771 beginning of the loop. Clear the entire first block of TSD.
10772 * Makefile (tests): Add tst-key4.
10773 * tst-key4.c: New file.
10775 2003-02-18 Ulrich Drepper <drepper@redhat.com>
10777 * Makefile (tests): Add tst-basic7.
10778 * tst-basic7.c: New file.
10780 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10781 Add some more __builtin_expect.
10783 * pthreadP.h: Define dummy version of DEBUGGING_P.
10785 2003-02-17 Ulrich Drepper <drepper@redhat.com>
10787 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10788 _POSIX_THREAD_PRIORITY_SCHEDULING.
10789 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10790 _XOPEN_REALTIME_THREADS.
10791 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10793 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10794 kernel returns EINVAL for PID <= 0, work around it.
10796 * Makefile (tests): Add tst-signal5.
10797 * tst-signal5.c: New file.
10799 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10800 and LOGIN_NAME_MAX.
10802 * tst-cancel1.c (tf): Block all signals.
10804 * Makefile (tests): Add tst-basic6.
10805 * tst-basic6.c: New file.
10807 * tst-basic1.c: Add test for process ID.
10809 * Makefile (tests): Add tst-cancel10.
10810 * tst-cancel10.c: New file.
10812 * Makefile (tests): Add tst-signal4.
10813 * tst-signal4.c: New file.
10815 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10816 __sigismember instead of sigismember. Add __builtin_expect.
10818 2003-02-16 Ulrich Drepper <drepper@redhat.com>
10820 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10821 pthread_setcancelstate, and pthread_rwlock_setpshared.
10823 * tst-cancel7.c (do_test): Make sure the pid file exists before
10824 canceling the thread.
10826 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10827 pthread_rwlock_timedrdlock tests.
10828 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10829 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10830 Check for invalid tv_nsec field.
10831 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10834 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10835 recursive mutex of overflow.
10837 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10839 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10840 going into an endless loop.
10841 * Makefile (tests): Add tst-cancel9.
10842 * tst-cancel9.c: New file.
10844 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10846 2003-02-15 Ulrich Drepper <drepper@redhat.com>
10848 * tst-mutex5.c (do_test): Add more timedlock tests.
10850 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10851 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10853 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10854 use INLINE_SYSCALL. Error number is returned, not -1.
10856 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10857 and __deallocate_stack with internal_function.
10858 * pthread_create.c: Adjust definitions appropriately.
10859 * allocatestack.c: Likewise.
10861 * pthread_join.c: Add one more __builtin_expect.
10862 * pthread_timedjoin.c: Likewise.
10864 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10865 not data of sequence number does not match.
10866 Add one __builtin_expect.
10868 * Makefile (tests): Add tst-clock1.
10869 * tst-clock1.c: New file.
10871 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10872 negative arguments.
10873 * Makefile (tests): Add tst-basic5.
10874 * tst-basic5.c: New file.
10876 2003-02-14 Ulrich Drepper <drepper@redhat.com>
10878 * Makefile (tests): Add tst-basic4.
10879 * tst-basic4.c: New file.
10881 * pthreadP.h: Add declaraction for __nptl_nthreads.
10882 * pthread_create.c: Define __nptl_nthreads
10883 (start_thread): Increment __nptl_nthreads at beginning. Decrement
10884 after thread is done. If then zero, call exit(0).
10885 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10886 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
10887 * init.c (pthread_functions): Initialize ptr_nthreads.
10888 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10889 (__reclaim_stacks): Decrement __nptl_nthreads.
10890 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10892 * Makefile (tests): Add tst-basic3.
10893 * tst-basic3.c: New file.
10895 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
10896 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
10897 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10898 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
10899 if asynchronous canceling is enabled.
10900 * pthread_join.c (pthread_join): When recognizing circular joins,
10901 take into account the other thread might be already canceled.
10902 * Makefile (tests): Add tst-join5.
10903 * tst-join5.c: New file.
10905 * Makefile (tests): Add tst-join4.
10906 * tst-join4.c: New file.
10908 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10910 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10912 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
10914 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10915 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10916 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10918 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10920 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10921 error if lll_futex_wake failed.
10923 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10925 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10926 handling of cancellation and failung pthread_mutex_unlock call.
10927 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10928 * Makefile (tests): Add tst-cond8 and tst-cond9.
10929 * tst-cond8.c: New file.
10930 * tst-cond9.c: New file.
10932 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10934 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10935 non-standard initializers with __USE_GNU.
10937 * Makefile (tests): Add tst-cleanup3.
10938 * tst-cleanup3.c: New file.
10940 2003-02-12 Ulrich Drepper <drepper@redhat.com>
10942 * Makefile (tests): Add tst-attr1 and tst-attr2.
10943 * tst-attr1.c: New file.
10944 * tst-attr2.c: New file.
10946 * Makefile: Add rules to build and run tst-atfork2 test.
10947 * tst-atfork2.c: New file.
10948 * tst-atfork2mod.c: New file.
10950 * sysdeps/unix/sysv/linux/unregister-atfork.c
10951 (__unregister_atfork): Free the memory allocated for the handlers
10952 after removing them from the lists.
10954 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10957 * tst-atfork1.c (do_test): Wait for the child we forked.
10958 Report error in child.
10960 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10962 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10964 2003-02-10 Ulrich Drepper <drepper@redhat.com>
10966 * Makefile (tests): Add tst-cancel8.
10967 * tst-cancel8.c: New file.
10969 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10970 clearing of control variable.
10971 * Makefile (tests): Add tst-once3 and tst-once4.
10972 * tst-once3.c: New file.
10973 * tst-once4.c: New file.
10975 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10977 * sysdeps/sh/Makefile: New file.
10978 * sysdeps/sh/bits/atomic.h: New file.
10979 * sysdeps/sh/pthread_spin_init.c: New file.
10980 * sysdeps/sh/pthread_spin_lock.c: New file.
10981 * sysdeps/sh/pthread_spin_trylock.S: New file.
10982 * sysdeps/sh/pthread_spin_unlock.S: New file.
10983 * sysdeps/sh/pthreaddef.h: New file.
10984 * sysdeps/sh/tcb-offsets.sym: New file.
10985 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10986 * sysdeps/sh/tls.h: New file.
10987 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10988 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10989 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10990 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10991 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10992 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10993 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10994 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10995 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10996 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10997 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10998 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10999 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
11000 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
11001 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
11002 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
11003 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
11004 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
11005 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
11006 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
11007 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
11008 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
11009 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
11010 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
11011 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
11012 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
11013 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
11014 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
11015 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
11016 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
11018 2003-02-08 Ulrich Drepper <drepper@redhat.com>
11020 * tst-cond2.c: Rearrange code to not rely on behavior undefined
11021 according to POSIX.
11023 * tst-basic2.c (do_test): Lock mutex before creating the thread.
11025 2003-02-07 Ulrich Drepper <drepper@redhat.com>
11027 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
11028 (TLS_GET_FS): New #define.
11029 (TLS_SET_FS): New #define.
11030 Correct value of __NR_set_thread_area.
11032 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
11034 2003-02-06 Ulrich Drepper <drepper@redhat.com>
11036 * Makefile (tests): Add tst-popen1.
11037 * tst-popen1.c: New file.
11039 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
11040 but inactive generalization.
11041 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11042 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11043 Minor optimization, remove one instruction.
11044 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11046 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
11048 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11050 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
11052 * init.c (__NR_set_tid_address): Add #ifdef for s390.
11053 * sysdeps/pthread/pthread_barrier_wait.c: New file.
11054 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11055 * sysdeps/pthread/pthread_cond_signal.c: New file.
11056 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11057 * sysdeps/pthread/pthread_cond_wait.c: New file.
11058 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11059 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11060 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11061 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11062 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11063 * sysdeps/s390/Makefile: New file.
11064 * sysdeps/s390/bits/atomic.h: New file.
11065 * sysdeps/s390/pthread_spin_init.c: New file.
11066 * sysdeps/s390/pthread_spin_lock.c: New file.
11067 * sysdeps/s390/pthread_spin_trylock.c: New file.
11068 * sysdeps/s390/pthread_spin_unlock.c: New file.
11069 * sysdeps/s390/pthreaddef.h: New file.
11070 * sysdeps/s390/tcb-offsets.sym: New file.
11071 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11072 * sysdeps/s390/tls.h: New file.
11073 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11074 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11075 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11076 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11077 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11078 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11079 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11080 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11081 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11082 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11083 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11084 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11085 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11086 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11087 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11088 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11089 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11090 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11091 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11092 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11093 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11094 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11095 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11097 2003-02-04 Ulrich Drepper <drepper@redhat.com>
11099 * atomic.h: Add a couple more default implementations.
11100 (atomic_compare_and_exchange_acq): Use
11101 __arch_compare_and_exchange_32_acq in return value definition. It
11103 (atomic_bit_set): Renamed from atomic_set_bit.
11104 Add missing atomic_ prefixes.
11106 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11107 thread library is available, use correct value to mark initialized
11110 2003-02-03 Ulrich Drepper <drepper@redhat.com>
11112 * allocatestack.c (allocate_stack): Use __getpagesize instead of
11113 __sysconf to determine pagesize.
11115 * pthread_create.c: Include <atomic.h>.
11116 * allocatestack.c (allocate_stack): Implement coloring of the
11117 allocated stack memory. Rename pagesize to pagesize_m1. It's the
11118 size minus one. Adjust users.
11119 * sysdeps/i386/i686/Makefile: New file.
11121 2003-02-02 Ulrich Drepper <drepper@redhat.com>
11123 * allocatestack.c: Improve comment throughout the file.
11125 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11126 (__lll_lock_wait): Add branch prediction.
11127 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11128 (__lll_lock_wait): Likewise.
11129 (lll_unlock_wake_cb): Removed.
11131 2003-01-31 Ulrich Drepper <drepper@redhat.com>
11133 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11134 _POSIX_THREAD_PRIORITY_SCHEDULING.
11136 2003-01-30 Jakub Jelinek <jakub@redhat.com>
11138 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11139 Fix return type of ptr___pthread_getspecific.
11141 2003-01-29 Ulrich Drepper <drepper@redhat.com>
11143 * Makefile (tests): Add tst-umask1.
11144 (tst-umask1-ARGS): Define.
11145 * tst-umask1.c: New file.
11147 2003-01-28 Ulrich Drepper <drepper@redhat.com>
11149 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
11150 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11151 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11152 pthread_rwlock_unlock.
11153 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11154 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11155 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11156 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11157 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11159 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11160 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11162 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11163 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11164 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11166 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11167 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11169 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11170 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11171 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11173 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11174 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11176 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11178 * Makefile (libpthread-routines): Remove lowlevelcond and
11179 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11180 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11181 and pthread_cond_broadcast.
11182 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11183 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11184 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11185 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11186 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11187 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11188 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11189 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11190 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11191 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11192 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11193 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11195 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11196 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11197 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11198 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11199 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11200 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11201 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11202 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11203 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11204 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11205 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11206 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11207 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11208 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11209 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11210 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11211 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11212 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11214 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11215 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11216 of the code is moved to ...
11217 * sysdeps/pthread/createthread.c: ...here. New file.
11219 2003-01-27 Ulrich Drepper <drepper@redhat.com>
11221 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11222 (__new_sem_post): Clear %eax before returning.
11223 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11225 * Makefile (tests): Add tst-cleanup2.
11226 * tst-cleanup2.c: New file.
11228 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11229 Interpret first parameter correctly.
11231 2003-01-17 Ulrich Drepper <drepper@redhat.com>
11233 * Makefile (headers): Add bits/semaphore.h.
11235 2003-01-16 Jakub Jelinek <jakub@redhat.com>
11237 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11240 2003-01-14 Ulrich Drepper <drepper@redhat.com>
11242 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11243 must be used and mapping failed.
11244 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11246 * Makefile (CFLAGS-pthread_self.os): Define this, not
11247 CFLAGS-pthread_self.c.
11249 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11251 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11252 lll_unlock_wake_cb.
11254 * Makefile (libpthread-routines): Add version. Add rules to build
11255 version.os and banner.h.
11256 * version.c: New file.
11258 2003-01-13 Jakub Jelinek <jakub@redhat.com>
11260 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11261 the alias unconditional.
11262 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11264 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11266 * Makefile (CFLAGS-pthread_self.c): New definition.
11268 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11270 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11271 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11272 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11273 * init.c (__pthread_initialize_minimal_internal): Likewise.
11275 2003-01-07 Jakub Jelinek <jakub@redhat.com>
11277 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11279 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11280 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11281 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11282 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11283 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11284 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11286 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11288 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11289 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11290 * tst-cancel-wrappers.sh: Remove all exceptions.
11292 2003-01-05 Ulrich Drepper <drepper@redhat.com>
11294 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11295 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11297 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11298 Use __libc_pthread_functions array if SHARED.
11300 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11301 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11303 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11304 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11305 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11306 __libc_ptf_call instead of __libc_maybe_call.
11307 (PTF): New #define.
11308 (__libc_cleanup_region_start): Wrap function name with PTF call.
11309 (__libc_cleanup_region_end): Likewise.
11310 (__libc_cleanup_end): Likewise.
11312 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11313 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11314 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11315 * pthreadP.h: Add prototypes.
11317 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11318 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11319 __pthread_rwlock_unlock aliases.
11320 * pthreadP.h: Add prototypes for new aliases.
11322 * pthreadP.h (struct pthead_functions): Moved to...
11323 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11324 * init.c (pthread_functions): Add initializers for new elements.
11326 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11327 __pthread_cleanup_pop_restore aliases.
11328 * pthreadP.h: Add prototypes.
11330 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11331 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11332 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11333 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11334 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11335 * pthreadP.h: Adjust prototypes and callers.
11337 2003-01-04 Ulrich Drepper <drepper@redhat.com>
11339 * Makefile (tests): Add tst-cancel7.
11340 (tst-cancel7-ARGS): New variable.
11341 * tst-cancel7.c: New file.
11343 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11344 around gcc defficiencies.
11345 * old_pthread_cond_signal.c: Likewise.
11346 * old_pthread_cond_timedwait.c: Likewise.
11347 * old_pthread_cond_wait.c: Likewise.
11349 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11351 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11353 * Makefile (tests): Add tst-cond7.
11354 * tst-cond7.c: New file.
11356 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11357 (condvar_cleanup): Get condvar address from the right place.
11359 * atomic.h: Correct definitions of atomic_full_barrier,
11360 atomic_read_barrier, atomic_write_barrier.
11362 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11364 * old_pthread_cond_signal.c: Likewise.
11365 * old_pthread_cond_timedwait.c: Likewise.
11366 * old_pthread_cond_wait.c: Likewise.
11368 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11370 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11372 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11374 * pthreadP.h (pthread_cond_2_0_t): New type.
11375 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11376 Use new type for the 2.0 condvar function prototypes.
11377 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11378 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11380 * old_pthread_cond_destroy.c: Likewise.
11381 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11382 * old_pthread_cond_signal.c: Likewise.
11383 * old_pthread_cond_timedwait.c: Likewise.
11384 * old_pthread_cond_wait.c: Likewise.
11386 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11387 (__pthread_cond_wait): Don't save cancellation mode and seq value
11390 * herrno.c (__h_errno_location): Don't define as weak.
11392 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11394 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11395 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11396 and pthread_cond_wait.
11397 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11399 (__pthread_cond_broadcast_2_0): ... this.
11400 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11402 (__pthread_cond_destroy_2_0): ... this.
11403 * old_pthread_cond_init.c (__old_pthread_cond_init):
11405 (__pthread_cond_init_2_0): ... this.
11406 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11408 (__pthread_cond_signal_2_0): ... this.
11409 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11411 (__pthread_cond_wait_2_0): ... this.
11412 * pthread_cond_destroy.c: Include shlib-compat.h.
11413 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11414 * pthread_cond_init.c: Include shlib-compat.h.
11415 (pthread_cond_init): Change strong_alias into versioned_symbol.
11416 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11417 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11419 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11420 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11421 __pthread_cond_wait_2_0): New prototypes.
11422 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11423 __old_pthread_cond_init, __old_pthread_cond_signal,
11424 __old_pthread_cond_wait): Removed.
11425 * init.c: Include shlib-compat.h.
11426 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11427 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11428 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11429 ptr___pthread_cond_*_2_0 fields.
11430 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11431 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11433 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11434 LIBC_SIGACTION was not yet defined.
11435 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11436 [!defined LIBC_SIGACTION] (__sigaction): New function and
11438 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11439 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11441 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11443 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11445 2003-01-02 Ulrich Drepper <drepper@redhat.com>
11447 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11448 New, larger type definition.
11449 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11451 * Versions [libpthread]: Add definitions for new pthread_cond_*
11452 interfaces for version GLIBC_2.3.2.
11453 * pthread_cond_init.c: Update initialization for new type definition.
11454 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11455 pthread_cond_timedwait, pthread_cond_signal, and
11456 pthread_cond_broadcast. Add old_pthread_cond_init,
11457 old_pthread_cond_destroy, old_pthread_cond_wait,
11458 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11459 old_pthread_cond_broadcast.
11460 * old_pthread_cond_broadcast.c: New file.
11461 * old_pthread_cond_destroy.c: New file.
11462 * old_pthread_cond_init.c: New file.
11463 * old_pthread_cond_signal.c: New file.
11464 * old_pthread_cond_timedwait.c: New file.
11465 * old_pthread_cond_wait.c: New file.
11466 * pthreadP.h: Add prototypes for the compatibility interfaces.
11468 * pthread_cond_destroy.c: Don't include <errno.h>.
11470 2003-01-01 Ulrich Drepper <drepper@redhat.com>
11472 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11473 unnecessary zero offset when addressing MUTEX.
11475 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11477 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11479 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11480 for __register_atfork.
11482 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11484 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11485 instead of ASSEMBLER test macro.
11487 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11488 __libc_current_sigrtmax): Add libc_hidden_def.
11490 * sysdeps/pthread/list.h: Remove assert.h include.
11492 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11494 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11495 __pthread_initialize_minimal_internal not
11496 __pthread_initialize_minimal.
11498 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11500 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11501 __pthread_initialize_minimal as hidden.
11503 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11506 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11508 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11509 $(common-objpfx)format.lds, include that into the output script.
11511 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11513 2002-12-28 Andreas Jaeger <aj@suse.de>
11515 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11516 nsec resolution changes.
11517 (xstat64_conv): Likewise.
11518 (xstat32_conv): Likewise.
11519 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11520 struct kernel_stat.
11521 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11522 structs stat and stat64.
11523 * time/time.h (__timespec_defined): Define for __USE_MISC.
11524 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11526 2002-12-30 Jakub Jelinek <jakub@redhat.com>
11528 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11530 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11531 (pthread_exit): Use strong_alias to avoid warnings.
11532 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11533 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11534 ptr___pthread_attr_init_2_*.
11535 * init.c (pthread_functions): Adjust.
11537 2002-12-29 Ulrich Drepper <drepper@redhat.com>
11539 * forward.c: Make all functions available by default again. It
11540 caused too much trouble.
11542 * pt-siglongjmp.c: Removed.
11544 2002-12-28 Jakub Jelinek <jakub@redhat.com>
11546 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11547 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11548 * sysdeps/i386/Makefile: New file.
11549 * sysdeps/i386/tcb-offsets.sym: New file.
11550 * sysdeps/pthread/tcb-offsets.h: New file.
11551 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11552 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11554 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11555 __register_atfork...
11556 (GLIBC_2.3.2): ...here.
11558 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11560 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11561 pthread_attr_setstackaddr with __attribute_deprecated__.
11563 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11565 * pt-system.c (system): Remove cancellation handling.
11566 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11567 cancellation routines.
11569 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11571 * descr.h: Include <dl-sysdep.h>.
11572 (struct pthread): Move header.data.list to the back of the struct.
11573 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11574 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11575 (SYSINFO_OFFSEET): Likewise.
11577 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11579 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11581 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11582 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11583 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11584 (USE_DL_SYSINFO): Undef.
11586 2002-12-22 Jakub Jelinek <jakub@redhat.com>
11588 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11589 $(common-objpfx)libc.so.
11590 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11591 it is bigger than pipe buffer size even on arches with bigger
11593 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11595 2002-12-25 Ulrich Drepper <drepper@redhat.com>
11597 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11598 correct errno access for case that USE___THREAD is not defined.
11600 2002-12-24 Ulrich Drepper <drepper@redhat.com>
11602 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11603 Patch by Marijn Ros <marijn@mad.scientist.com>.
11605 2002-12-22 Roland McGrath <roland@redhat.com>
11607 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11609 2002-12-20 Ulrich Drepper <drepper@redhat.com>
11611 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11613 2002-12-19 Ulrich Drepper <drepper@redhat.com>
11615 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11616 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11617 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11619 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11621 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11622 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11623 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11624 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11625 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11626 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11627 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11628 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11630 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11632 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11634 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11636 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11638 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11639 that sysinfo is properly initialized.
11640 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11641 to 1 only for ld.so.
11643 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11644 RTLD_CORRECT_DYNAMIC_WEAK.
11646 2002-12-19 Jakub Jelinek <jakub@redhat.com>
11648 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11649 Use return 0 as 6th argument to FORWARD4.
11650 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11652 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11654 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11655 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11656 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11657 (INIT_SYSINFO): New #define.
11658 (TLS_TP_INIT): Use INIT_SYSINFO.
11659 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11660 At test to make sure SYSINFO_OFFSET value is correct.
11661 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11663 2002-12-18 Jakub Jelinek <jakub@redhat.com>
11665 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11666 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11667 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11668 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11669 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11670 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11671 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11673 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11675 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11676 macro instead of using int $0x80 directly.
11678 * sysdeps/pthread/bits/stdio-lock.h: New file.
11679 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11680 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11681 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11682 * Makefile (routines): Add libc-lowlevelmutex.
11684 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11685 __i686.get_pc_thunk.dx.
11687 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11689 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11690 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11691 ($(objpfx)tst-cancel-wrappers.out): New rule.
11692 * tst-cancel-wrappers.sh: New test.
11693 * tst-locale1.c: Include signal.h.
11694 (uselocale): Test static linking of __libc_current_sigrt*.
11696 2002-12-17 Ulrich Drepper <drepper@redhat.com>
11698 * Makefile (tests): Add tst-cancel6.
11699 * tst-cancel6.c: New file
11701 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11703 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11704 Define meaningfully for assembler as well.
11705 * pthreadP.h (struct pthread_functions): Remove
11706 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11707 and ptr_pthread_attr_init_2_1 fields.
11708 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11709 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11710 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11711 (FORWARD3): Define using FORWARD4.
11712 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11714 * pt-system.c: Remove duplicate stdlib.h include.
11716 2002-12-16 Ulrich Drepper <drepper@redhat.com>
11718 * sem_init.c: Define sem_init@GLIBC_2.0.
11719 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11720 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11722 * flockfile.c: Moved to...
11723 * sysdeps/pthread/flockfile.c: ...here. New file.
11724 * funlockfile.c: Moved to...
11725 * sysdeps/pthread/funlockfile.c: ...here. New file.
11726 * ftrylockfile.c: Moved to...
11727 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11729 2002-12-16 Jakub Jelinek <jakub@redhat.com>
11731 * libc-cancellation.c: Guard both function with
11732 #if !defined NOT_IN_libc.
11733 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11734 automatically provided pthread wrappers.
11735 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11736 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11738 * pt-open.c: Removed.
11739 * pt-fcntl.c: Removed.
11740 * pt-fsync.c: Removed.
11741 * pt-lseek.c: Removed.
11742 * pt-msgrcv.c: Removed.
11743 * pt-msgsnd.c: Removed.
11744 * pt-msync.c: Removed.
11745 * pt-nanosleep.c: Removed.
11746 * pt-open64.c: Removed.
11747 * pt-pause.c: Removed.
11748 * pt-pread.c: Removed.
11749 * pt-pread64.c: Removed.
11750 * pt-pwrite.c: Removed.
11751 * pt-pwrite64.c: Removed.
11752 * pt-read.c: Removed.
11753 * pt-recv.c: Removed.
11754 * pt-recvfrom.c: Removed.
11755 * pt-recvmsg.c: Removed.
11756 * pt-send.c: Removed.
11757 * pt-sendto.c: Removed.
11758 * pt-sigtimedwait.c: Removed.
11759 * pt-sigwait.c: Removed.
11760 * pt-wait.c: Removed.
11761 * pt-waitpid.c: Removed.
11762 * pt-write.c: Removed.
11763 * pt-accept.c: Removed.
11764 * pt-close.c: Removed.
11765 * pt-connect.c: Removed.
11766 * pt-lseek64.c: Removed.
11767 * pt-sendmsg.c: Removed.
11768 * pt-tcdrain.c: Removed.
11770 2002-12-15 Ulrich Drepper <drepper@redhat.com>
11772 * init.c (__pthread_initialize_minimal_internal): Renamed from
11773 __pthread_initialize_minimal. Make old name an alias. This
11774 converts a normal relocation into a relative relocation.
11776 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11778 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11779 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11780 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11781 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11782 pt-sigwaitinfo, pt-waitid, and pt-writev.
11783 * pt-creat.c: Removed.
11784 * pt-poll.c: Removed.
11785 * pt-pselect.c: Removed.
11786 * pt-readv.c: Removed.
11787 * pt-select.c: Removed.
11788 * pt-sigpause.c: Removed.
11789 * pt-sigsuspend.c: Removed.
11790 * pt-sigwaitinfo.c: Removed.
11791 * pt-waitid.c: Removed.
11792 * pt-writev.c: Removed.
11794 * init.c (pthread_functions): New variable.
11795 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11796 (or NULL) to __libc_pthread_init.
11797 * forward.c: Rewrite to use __libc:pthread_functions array to get
11798 function addresses.
11799 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11801 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11802 Take new parameter. Copy content of variable pointed to by it
11803 to __libc_pthread_init.
11805 * pthreadP.h (struct pthread_functions): New type.
11806 (__libc_pthread_init): Declare.
11808 * pthread_attr_destroy.c: Add namespace protected alias.
11809 * pthread_attr_getdetachstate.c: Likewise.
11810 * pthread_attr_getinheritsched.c: Likewise.
11811 * pthread_attr_getschedparam.c: Likewise.
11812 * pthread_attr_getschedpolicy.c: Likewise.
11813 * pthread_attr_getscope.c: Likewise.
11814 * pthread_attr_setdetachstate.c: Likewise.
11815 * pthread_attr_setinheritsched.c: Likewise.
11816 * pthread_attr_setschedparam.c: Likewise.
11817 * pthread_attr_setschedpolicy.c: Likewise.
11818 * pthread_attr_setscope.c: Likewise.
11819 * pthread_cond_broadcast.c: Likewise.
11820 * pthread_cond_destroy.c: Likewise.
11821 * pthread_cond_init.c: Likewise.
11822 * pthread_cond_signal.c: Likewise.
11823 * pthread_cond_wait.c: Likewise.
11824 * pthread_condattr_destroy.c: Likewise.
11825 * pthread_condattr_init.c: Likewise.
11826 * pthread_equal.c: Likewise.
11827 * pthread_exit.c: Likewise.
11828 * pthread_getschedparam.c: Likewise.
11829 * pthread_self.c: Likewise.
11830 * pthread_setcancelstate.c: Likewise.
11831 * pthread_setschedparam.c: Likewise.
11832 * pthread_mutex_destroy.c: Likewise.
11833 * pthread_mutex_init.c: Likewise.
11834 * pthreadP.h: Add prototypes for the aliases.
11836 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11837 multiple_threads member in correct TCB to 1.
11839 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11840 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11841 member of thread decriptor, otherwise return unconditionally 1.
11843 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11845 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11846 regular Linux version. Remove file.
11847 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11848 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11849 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11850 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11851 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11852 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11853 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11854 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11855 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11856 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
11857 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
11858 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
11859 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
11860 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
11861 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
11862 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
11863 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
11864 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
11865 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
11866 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
11867 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
11868 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
11869 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
11870 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
11871 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
11872 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
11873 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
11874 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
11875 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
11876 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
11878 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11880 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11881 * sysdeps/unix/sysv/linux/open.c: Removed.
11882 * sysdeps/unix/sysv/linux/fsync.c: Removed.
11883 * sysdeps/unix/sysv/linux/lseek.c: Removed.
11884 * sysdeps/unix/sysv/linux/msync.c: Removed.
11885 * sysdeps/unix/sysv/linux/read.c: Removed.
11886 * sysdeps/unix/sysv/linux/close.c: Removed.
11887 * sysdeps/unix/sysv/linux/creat.c: Removed.
11888 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11889 * sysdeps/unix/sysv/linux/pause.c: Removed.
11890 * sysdeps/unix/sysv/linux/select.c: Removed.
11891 * sysdeps/unix/sysv/linux/write.c: Removed.
11893 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11895 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11896 element in TCB to see whether locking is needed.
11898 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11899 MULTIPLE_THREADS_OFFSET value is correct.
11901 * sysdeps/unix/sysv/linux/close.c: New file.
11902 * sysdeps/unix/sysv/linux/connect.S: New file.
11903 * sysdeps/unix/sysv/linux/creat.c: New file.
11904 * sysdeps/unix/sysv/linux/fsync.c: New file.
11905 * sysdeps/unix/sysv/linux/llseek.c: New file.
11906 * sysdeps/unix/sysv/linux/lseek.c: New file.
11907 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11908 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11909 * sysdeps/unix/sysv/linux/msync.c: New file.
11910 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11911 * sysdeps/unix/sysv/linux/open.c: New file.
11912 * sysdeps/unix/sysv/linux/open64.c: New file.
11913 * sysdeps/unix/sysv/linux/pause.c: New file.
11914 * sysdeps/unix/sysv/linux/poll.c: New file.
11915 * sysdeps/unix/sysv/linux/pread.c: New file.
11916 * sysdeps/unix/sysv/linux/pread64.c: New file.
11917 * sysdeps/unix/sysv/linux/pselect.c: New file.
11918 * sysdeps/unix/sysv/linux/pwrite.c: New file.
11919 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11920 * sysdeps/unix/sysv/linux/readv.c: New file.
11921 * sysdeps/unix/sysv/linux/recv.S: New file.
11922 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11923 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11924 * sysdeps/unix/sysv/linux/select.c: New file.
11925 * sysdeps/unix/sysv/linux/send.S: New file.
11926 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11927 * sysdeps/unix/sysv/linux/sendto.S: New file.
11928 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11929 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11930 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11931 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11932 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11933 * sysdeps/unix/sysv/linux/system.c: New file.
11934 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11935 * sysdeps/unix/sysv/linux/wait.c: New file.
11936 * sysdeps/unix/sysv/linux/waitid.c: New file.
11937 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11938 * sysdeps/unix/sysv/linux/writev.c: New file.
11939 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11941 * pt-readv.c: Fix comment.
11943 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11945 * tst-cleanup1.c: Include stdlib.h.
11947 * tst-cancel5.c: New test.
11948 * Makefile (tests): Add tst-cancel5.
11949 (tst-cancel5): Link against libc.so libpthread.so in that order.
11951 2002-12-13 Ulrich Drepper <drepper@redhat.com>
11953 * forward.c (test_loaded): Prevent recursive calls.
11955 * Makefile (routines): Add libc-cancellation.
11956 * libc-cancellation.c: New file.
11957 * descr.h (struct pthread): Add multiple_threads field.
11958 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11959 new thread descriptor to 1.
11960 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11961 Initialize multiple_thread field after successful thread creation.
11962 * cancellation.c (__do_cancel): Move to pthreadP.h.
11963 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11964 (__pthread_disable_asynccancel): Add internal_function attribute.
11965 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11966 * pthread_setcancelstate.c: Likewise.
11967 * pthread_setcanceltype.c: Likewise.
11968 * pthread_exit.c: Likewise.
11969 * pthreadP.h (CANCELLATION_P): Likewise.
11970 (__do_cancel): Define as static inline.
11971 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11972 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11974 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11975 fields. Define MULTIPLE_THREADS_OFFSET.
11976 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11978 * sysdeps/unix/sysv/linux/accept.S: New file.
11979 * sysdeps/unix/sysv/linux/read.c: New file.
11980 * sysdeps/unix/sysv/linux/write.c: New file.
11981 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11982 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11983 initialization of __libc_locking_needed.
11984 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11985 __libc_locking_needed, use multiple_threads field in TCB.
11986 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11988 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11990 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11992 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11994 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11995 access to __libc_locking_needed for PIC.
11997 2002-12-12 Jakub Jelinek <jakub@redhat.com>
11999 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
12000 declare for libc.so.
12001 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
12003 (__libc_lock_lock): Put into statement expression.
12004 (__libc_lock_unlock): Remove trailing semicolon.
12005 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
12007 2002-12-12 Roland McGrath <roland@redhat.com>
12009 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
12010 "m" constraint to refer to __libc_locking_needed. Declare it here.
12012 2002-12-12 Ulrich Drepper <drepper@redhat.com>
12014 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
12015 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
12016 Initialize __libc_locking_needed.
12017 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
12018 instead of __register_pthread_fork_handler.
12019 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
12020 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
12021 fork-gen with libc_pthread_init.
12022 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
12023 of __register_pthread_fork_handler.
12024 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
12025 of __register_pthread_fork_handler.
12026 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
12027 __libc_locking_needed to determine whether lock prefix can be avoided.
12028 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12030 2002-12-11 Ulrich Drepper <drepper@redhat.com>
12032 * Makefile (tests): Add tst-cleanup1.
12033 * tst-cleanup1.c: New file.
12034 * cancellation.c (__cleanup_thread): Removed.
12035 (__do_cancel): Remove call to __cleanup_thread.
12036 * pthreadP.h: Remove __cleanup_thread prorotype.
12038 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
12039 Remember function and argument even if cancellation handler
12040 function is not available.
12041 (__libc_cleanup_region_end): Execute registered function directly if
12042 pthread functions are not available.
12043 (__libc_cleanup_end): Likewise.
12045 * init.c (__pthread_initialize_minimal): Fix initialization in
12046 static lib by preventing gcc from being too clever.
12048 2002-12-10 Ulrich Drepper <drepper@redhat.com>
12050 * init.c (__pthread_initialize_minimal): Remove unneccesary
12053 * Makefile (tests): We can run tst-locale2 now.
12055 2002-12-09 Ulrich Drepper <drepper@redhat.com>
12057 * Versions: Remove duplicated sigwait entry.
12059 2002-12-08 Ulrich Drepper <drepper@redhat.com>
12061 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12064 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12066 * pthreadP.h: Declare __pthread_enable_asynccancel and
12067 __pthread_disable_asynccancel.
12068 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12069 (CANCEL_RESET): Use __pthread_disable_asynccancel.
12070 * cancellation.c (__pthread_enable_asynccancel): New function.
12071 (__pthread_disable_asynccancel): New function.
12072 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12073 * pt-close.c: Likewise.
12074 * pt-connect.c: Likewise.
12075 * pt-creat.c: Likewise.
12076 * pt-fcntl.c: Likewise.
12077 * pt-fsync.c: Likewise.
12078 * pt-lseek.c: Likewise.
12079 * pt-lseek64.c: Likewise.
12080 * pt-msgrcv.c: Likewise.
12081 * pt-msgsnd.c: Likewise.
12082 * pt-msync.c: Likewise.
12083 * pt-nanosleep.c: Likewise.
12084 * pt-open.c: Likewise.
12085 * pt-open64.c: Likewise.
12086 * pt-pause.c: Likewise.
12087 * pt-poll.c: Likewise.
12088 * pt-pread.c: Likewise.
12089 * pt-pread64.c: Likewise.
12090 * pt-pselect.c: Likewise.
12091 * pt-pwrite.c: Likewise.
12092 * pt-pwrite64.c: Likewise.
12093 * pt-read.c: Likewise.
12094 * pt-readv.c: Likewise.
12095 * pt-recv.c: Likewise.
12096 * pt-recvfrom.c: Likewise.
12097 * pt-recvmsg.c: Likewise.
12098 * pt-select.c: Likewise.
12099 * pt-send.c: Likewise.
12100 * pt-sendmsg.c: Likewise.
12101 * pt-sendto.c: Likewise.
12102 * pt-sigpause.c: Likewise.
12103 * pt-sigsuspend.c: Likewise.
12104 * pt-sigtimedwait.c: Likewise.
12105 * pt-sigwait.c: Likewise.
12106 * pt-sigwaitinfo.c: Likewise.
12107 * pt-system.c: Likewise.
12108 * pt-tcdrain.c: Likewise.
12109 * pt-wait.c: Likewise.
12110 * pt-waitid.c: Likewise.
12111 * pt-waitpid.c: Likewise.
12112 * pt-write.c: Likewise.
12113 * pt-writev.c: Likewise.
12114 * pthread_join.c: Likewise.
12115 * pthread_timedjoin.c: Likewise.
12117 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12118 (__xpg_sigpause): New function.
12119 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12121 2002-12-07 Ulrich Drepper <drepper@redhat.com>
12123 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12125 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12126 _GI_pthread_cleanup_pop to pthreadP.h.
12128 * ftrylockfile.c: Use _IO_lock_trylock instead of
12129 pthread_mutex_trylock.
12131 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12132 (CANCEL_RESET): Likewise.
12133 (__pthread_setcanceltype_): Declare.
12134 (__pthread_mutex_lock_internal): Declare.
12135 (__pthread_mutex_unlock_internal): Declare.
12136 (__pthread_once_internal): Declare.
12137 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12138 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12140 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12141 and pthread_mutex_unlock.
12142 * pthread_cond_wait.c: Likewise.
12143 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12144 * pthread_mutex_unlock.c: Likewise.
12146 * pthread_setcanceltype.c: Add additional alias
12147 __pthread_setcanceltype.
12149 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12150 * sem_open.c (sem_open): Likewise.
12151 Use __libc_open, __libc_write, and __libc_close instead of
12152 open, write, and close respectively.
12154 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12155 Rewrite as statement expression since it must return a value.
12157 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12158 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12161 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12162 alias __pthread_once_internal.
12164 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12166 2002-12-06 Ulrich Drepper <drepper@redhat.com>
12168 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12169 * tst-stdio1.c: New file.
12170 * tst-stdio2.c: New file.
12172 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12174 * Makefile (tests): Comment out tst-locale2 for now.
12175 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12177 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12179 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12180 Use _IO_lock_init instead of explicit assignment.
12182 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12183 Define __libc_lock_* and __libc_lock_recursive macros with
12184 lowlevellock macros, not pthread mutexes.
12186 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
12187 of pthread_mutex_lock.
12188 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
12189 instead of pthread_mutex_unlock.
12191 2002-12-06 Roland McGrath <roland@redhat.com>
12193 * allocatestack.c (__stack_user): Use uninitialized defn.
12194 * init.c (__pthread_initialize_minimal): Initialize it here.
12196 2002-12-05 Roland McGrath <roland@redhat.com>
12198 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12200 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12202 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12203 missing & here too.
12205 2002-12-05 Ulrich Drepper <drepper@redhat.com>
12207 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12209 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12210 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12211 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12212 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12213 for __libc_lock_* macros.
12214 * Makefile (routines): Add libc-lowlevellock.
12216 2002-10-09 Roland McGrath <roland@redhat.com>
12218 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12219 Under [__PIC__], call the function via the pointer fetched for
12220 comparison rather than a call by name that uses the PLT.
12221 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12222 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12223 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12224 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12225 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12227 2002-12-04 Roland McGrath <roland@redhat.com>
12229 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12231 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12232 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12234 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12236 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12238 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12239 a completely opaque, non-integer type.
12240 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12242 2002-12-05 Jakub Jelinek <jakub@redhat.com>
12244 * sysdeps/i386/tls.h: Include stdlib.h.
12245 * sysdeps/x86_64/tls.h: Likewise.
12247 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12249 * Makefile (tests): Add tst-locale2.
12250 (tests-static): Likewise.
12251 * tst-locale2.c: New file.
12253 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12254 volatile and add memory clobbers to lock operations.
12256 2002-12-03 Ulrich Drepper <drepper@redhat.com>
12258 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12259 * sysdeps/i386/i486/bits/atomic.h: New file.
12260 * sysdeps/i386/i586/bits/atomic.h: New file.
12261 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12262 include i486 version.
12263 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12264 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12265 Patch by Marijn Ros <marijn@mad.scientist.com>.
12267 * allocatestack.c (get_cached_stack): Don't crash if we first
12268 found a stack with a larger size then needed.
12269 Reported by Hui Huang <hui.huang@sun.com>.
12271 * Makefile (tests): Add tst-sysconf.
12272 * tst-sysconf.c: New file.
12274 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12275 PTHREAD_THREADS_MAX.
12277 2002-12-02 Roland McGrath <roland@redhat.com>
12279 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12280 Declare using hidden_proto instead of attribute_hidden, so there are
12281 non-.hidden static symbols for gdb to find.
12282 (__pthread_keys): Likewise.
12283 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12284 * allocatestack.c (__stack_user): Likewise.
12285 * pthread_create.c (__pthread_keys): Likewise.
12286 (__nptl_threads_events, __nptl_last_event): Make these static instead
12288 * pthread_key_create.c (__pthread_pthread_keys_max,
12289 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12291 2002-12-02 Ulrich Drepper <drepper@redhat.com>
12293 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12295 * tst-locale1.c: New file.
12297 * pthread_cond_timedwait.c: Include <stdlib.h>.
12299 * Makefile (tests): Add tst-fork2 and tst-fork3.
12300 * tst-fork2.c: New file.
12301 * tst-fork3.c: New file.
12303 2002-11-28 Ulrich Drepper <drepper@redhat.com>
12305 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12307 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12308 require it to 200112L.
12310 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12311 instruction only if HAVE_CMOV is defined.
12312 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12314 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12316 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12318 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12320 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12322 2002-11-27 Ulrich Drepper <drepper@redhat.com>
12324 * sysdeps/x86_64/bits/atomic.h: New file.
12326 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12329 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12330 possible since gettid cannot fail.
12332 * sysdeps/x86_64/pthreaddef.h: New file.
12334 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12336 * sysdeps/x86_64/pthread_spin_init.c: New file.
12337 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12338 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12339 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12341 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12342 Add missing lock prefix. Minute optimization.
12344 * tst-spin2.c (main): Also check successful trylock call.
12346 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12347 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12349 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12350 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12352 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12353 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12354 value in case of an error. Add support for INTERNAL_SYSCALL.
12356 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12357 value in case of an error.
12359 * sysdeps/x86_64/tls.h: New file.
12361 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12363 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12364 takes the array member name and the index as parameters.
12365 (THREAD_SETMEM_NC): Likewise.
12366 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12367 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12370 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12371 to decide which code to use.
12372 (THREAD_SETMEM_NC): Likewise.
12374 * allocatestack.c (queue_stack): Don't remove stack from list here.
12375 Do it in the caller. Correct condition to prematurely terminate
12376 loop to free stacks.
12377 (__deallocate_stack): Remove stack from list here.
12379 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12381 * Makefile (tests): Add tst-stack1.
12382 * tst-stack1.c: New file.
12384 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12387 * pthread_attr_getstack.c: Return bottom of the thread area.
12389 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12391 * Makefile (libpthread-routines): Add pt-allocrtsig and
12392 pthread_kill_other_threads.
12393 * pt-allocrtsig.c: New file.
12394 * pthread_kill_other_threads.c: New file.
12395 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12396 all three functions.
12397 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12399 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12400 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12401 and __libc_allocate_rtsig_private.
12402 * Versions (libpthread): Export pthread_kill_other_threads_np,
12403 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12405 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12407 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12408 the end of the stack. Adjust computations.
12409 When mprotect call fails dequeue stack and free it.
12410 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12412 * pthread_getattr_np.c: Likewise.
12414 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12417 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12419 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12420 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12422 2002-11-22 Ulrich Drepper <drepper@redhat.com>
12424 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12425 * pthread_setspecific.c: Likewise.
12427 2002-11-21 Ulrich Drepper <drepper@redhat.com>
12429 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12430 definitions. Get them from the official place.
12431 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12433 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12434 Use new CLONE_ flags in clone() calls.
12436 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12437 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12439 * Versions: Add pthread_* functions for libc.
12440 * forward.c: New file.
12442 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12444 * herrno.c: New file.
12447 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12448 sem_trywait, and sem_timedwait. Add herrno and res.
12449 * sem_init.c: Don't initialize lock and waiters members.
12450 * sem_open.c: Likewise.
12451 * sem_post.c: Removed.
12452 * sem_wait.c: Removed.
12453 * sem_trywait.c: Removed.
12454 * sem_timedwait.c: Removed.
12455 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12456 Includes full implementations of sem_post, sem_wait, sem_trywait,
12458 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12459 for new implementation.
12460 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12461 and waiters fields.
12463 * tst-sem3.c: Improve error message.
12464 * tst-signal3.c: Likewise.
12466 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12467 to tell the kernel about the termination futex and to initialize tid
12468 member. Don't initialize main_thread.
12469 * descr.h (struct pthread): Remove main_thread member.
12470 * cancelllation.c (__do_cancel): Remove code handling main thread.
12471 The main thread is not special anymore.
12473 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12474 size of the stacks to stack_cache_actsize.
12476 * pt-readv.c: Add missing "defined".
12477 * pt-sigwait.c: Likewise.
12478 * pt-writev.c: Likewise.
12480 2002-11-09 Ulrich Drepper <drepper@redhat.com>
12482 * Versions: Export __connect from libpthread.
12483 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12485 * Makefile (libpthread-routines): Add pt-raise.
12486 * sysdeps/unix/sysv/linux/raise.c: New file.
12487 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12488 * sysdeps/generic/pt-raise.c: New file.
12490 * pthread_cond_init.c: Initialize all data elements of the condvar
12491 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12493 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12494 * pthread_create.c: Likewise.
12496 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12497 * tst-key1.c: New file.
12498 * tst-key2.c: New file.
12499 * tst-key3.c: New file.
12501 * Versions: Export pthread_detach for version GLIBC_2.0.
12502 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12504 2002-11-08 Ulrich Drepper <drepper@redhat.com>
12506 * pthread_key_create.c: Terminate search after an unused key was found.
12507 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12509 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12510 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12512 2002-10-10 Ulrich Drepper <drepper@redhat.com>
12514 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12515 dynamic lookup for errno in PIC.
12517 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12518 release the stack lock as soon as possible.
12519 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12520 the static TLS block.
12521 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12523 * cancellation.c: Renamed from cancelation.c.
12524 * Makefile: Adjust accordingly.
12525 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12526 * cleanup_defer.c: Use CANCELLATION_P.
12527 * pthread_testcancel.c: Likewise.
12528 * descr.h: Fix spelling in comments.
12529 * init.c: Likewise.
12530 * pthread_getattr_np.c: Likewise.
12531 * pthread_getschedparam.c: Likewise.
12532 * pthread_setschedparam.c: Likewise.
12533 * Versions: Likewise.
12535 * pt-pselect.c: New file.
12536 * Makefile (libpthread-routines): Add pt-pselect.
12537 * Versions: Add pselect.
12539 * tst-cancel4.c: New file.
12540 * Makefile (tests): Add tst-cancel4.
12542 2002-10-09 Ulrich Drepper <drepper@redhat.com>
12544 * pthread_mutex_lock.c: Always record lock ownership.
12545 * pthread_mutex_timedlock.c: Likewise.
12546 * pthread_mutex_trylock.c: Likewise.
12548 * pt-readv.c: New file.
12549 * pt-writev.c: New file.
12550 * pt-creat.c: New file.
12551 * pt-msgrcv.c: New file.
12552 * pt-msgsnd.c: New file.
12553 * pt-poll.c: New file.
12554 * pt-select.c: New file.
12555 * pt-sigpause.c: New file.
12556 * pt-sigsuspend.c: New file.
12557 * pt-sigwait.c: New file.
12558 * pt-sigwaitinfo.c: New file.
12559 * pt-waitid.c: New file.
12560 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12561 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12562 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12563 * Versions: Add all the new functions.
12565 * tst-exit1.c: New file.
12566 * Makefile (tests): Add tst-exit1.
12568 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12570 2002-10-08 Ulrich Drepper <drepper@redhat.com>
12572 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12574 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12575 call. pthread_join is an official cancellation point.
12576 * pthread_timedjoin.c: Likewise.
12578 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12579 and the condvar's mutex are retrieved.
12580 * pthread_cond_timedwait.c: Likewise.
12581 Reported by dice@saros.East.Sun.COM.
12583 2002-10-07 Ulrich Drepper <drepper@redhat.com>
12585 * pthreadP.h: Cut out all type definitions and move them...
12586 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12587 * pthreadP.h: Include <internaltypes.h>.
12589 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12590 performance tweaks.
12592 * sem_trywait.c: Shuffle #includes around to get right order.
12593 * sem_timedwait.c: Likewise.
12594 * sem_post.c: Likewise.
12595 * sem_wait.c: Likewise.
12597 * nptl 0.3 released.
12599 * Makefile (tests): Add tst-signal3.
12600 * tst-signal3.c: New file.
12602 2002-10-05 Ulrich Drepper <drepper@redhat.com>
12604 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12605 the asms modify the sem object.
12606 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12608 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12609 the actual members.
12610 * pthreadP.h (struct sem): New type. Actual semaphore type.
12611 * semaphoreP.h: Include pthreadP.h.
12612 * sem_getvalue.c: Adjust to sem_t change.
12613 * sem_init.c: Likewise.
12614 * sem_open.c: Likewise.
12615 * sem_post.c: Likewise.
12616 * sem_timedwait.c: Likewise.
12617 * sem_trywait.c: Likewise.
12618 * sem_wait.c: Likewise.
12620 2002-10-04 Ulrich Drepper <drepper@redhat.com>
12622 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12623 * tst-basic2.c: New file.
12624 * tst-exec1.c: New file.
12625 * tst-exec2.c: New file.
12626 * tst-exec3.c: New file.
12628 * tst-fork1.c: Remove extra */.
12630 * nptl 0.2 released. The API for IA-32 is complete.