1 2012-11-06 Chris Metcalf <cmetcalf@tilera.com>
3 * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
4 * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
6 2012-11-05 Siddhesh Poyarekar <siddhesh@redhat.com>
8 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
9 if absolute timeout is negative.
10 [__ASSUME_FUTEX_CLOCK_REALTIME &&
11 lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
12 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
14 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
16 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
17 (__lll_robust_timedlock_wait): Likewise.
18 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
19 (lll_futex_timed_wait_bitset): New macro.
20 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
21 (lll_futex_timed_wait_bitset): Likewise.
23 2012-11-03 David S. Miller <davem@davemloft.net>
25 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
27 (__cpu_relax): Likewise.
29 2012-11-02 H.J. Lu <hongjiu.lu@intel.com>
31 * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
32 (__128bits): New struct typedef.
33 (tcbhead_t): Replace __m128 with __128bits.
35 2012-10-30 Aurelien Jarno <aurelien@aurel32.net>
36 Joseph Myers <joseph@codesourcery.com>
38 * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
40 2012-10-28 David S. Miller <davem@davemloft.net>
42 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
43 Define when we have v9 instructions available.
44 * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
45 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
47 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
49 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
50 to libpthread-routines.
52 2012-10-25 Roland McGrath <roland@hack.frob.com>
54 * tst-cond-except.c (TEST_FUNCTION): New macro.
56 2012-10-25 Joseph Myers <joseph@codesourcery.com>
58 * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
60 * tst-tls6.sh: Use /bin/bash not /bin/sh.
62 2012-10-25 Roland McGrath <roland@hack.frob.com>
64 * tst-basic2.c (do_test): Return RESULT, not always zero.
66 * tst-cond25.c: Include <stdint.h>
67 (waiter): Add casts to uintptr_t between casting integer<->pointer.
68 (timed_waiter): Likewise.
69 (do_test_wait): Likewise.
70 * tst-cond-except.c (thr): Likewise.
71 (do_test): Use prototype definition.
73 2012-10-24 Joseph Myers <joseph@codesourcery.com>
74 Jim Blandy <jimb@codesourcery.com>
76 * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
78 * tst-tls6.sh (test_wrapper_env): New variable. Use it to run
79 programs with LD_PRELOAD set.
81 2012-10-24 Roland McGrath <roland@hack.frob.com>
83 * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
84 ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
85 ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
86 ($(objpfx)tst-rwlock14): Likewise.
88 2012-10-24 Joseph Myers <joseph@codesourcery.com>
90 * Makefile (tests): Remove tst-oddstacklimit.
91 (test-srcs): New variable.
92 (tst-oddstacklimit-ENV): Remove.
93 [$(run-built-tests) = yes] (tests): Depend on
94 $(objpfx)tst-oddstacklimit.out.
95 [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
97 * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
98 setrlimit before executing tst-basic1 test passed to --command.
100 2012-10-23 Joseph Myers <joseph@codesourcery.com>
102 * Makefile [$(cross-compiling) = no]: Change condition to
103 [$(run-built-tests) = yes].
105 2012-10-23 Jim Blandy <jimb@codesourcery.com>
106 Joseph Myers <joseph@codesourcery.com>
108 * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
109 (tst-exec4-ARGS): Likewise.
110 (tst-stackguard1-ARGS): Likewise.
112 2012-10-21 Jim Blandy <jimb@codesourcery.com>
113 Joseph Myers <joseph@codesourcery.com>
115 * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
116 tst-cancel-wrappers.sh.
117 * tst-cancel-wrappers.sh: Use nm program given as first argument,
120 2012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
122 * tst-cond25.c (do_test_wait): Don't check for return value from
125 2012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
128 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
129 (__condvar_tw_cleanup): Adjust the mutex data structure if it
130 was locked by FUTEX_WAIT_REQUEUE_PI.
131 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
132 (__condvar_w_cleanup): Likewise.
133 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
134 (__condvar_cleanup2): Likewise.
135 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
136 (__condvar_cleanup1): Likewise.
138 2012-10-10 Carlos O'Donell <carlos@systemhalted.org>
140 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
141 defined __EXCEPTIONS) && defined __USE_GNU]
142 (pthread_cleanup_push_defer_np): Fix formatting.
144 2012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
147 * Makefile (tests): New test case tst-cond25.
148 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
149 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
150 (__condvar_tw_cleanup): Lock mutex only if we don't already
152 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
153 (__condvar_w_cleanup): Likewise.
154 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
155 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
156 (__condvar_cleanup2): Lock mutex only if we don't already
158 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
159 (__condvar_cleanup1): Likewise.
160 * tst-cond25.c: New test case.
162 2012-10-09 Roland McGrath <roland@hack.frob.com>
164 * sysdeps/pthread/configure: Regenerated.
165 * sysdeps/x86_64/configure: Regenerated.
167 2012-10-05 David S. Miller <davem@davemloft.net>
170 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
171 (DB_THREAD_SELF): Use constants for the register offsets. Correct
172 the case of a 64-bit debugger with a 32-bit inferior.
174 2012-10-05 H.J. Lu <hongjiu.lu@intel.com>
177 * Makefile (tests-static): Add tst-cancel24-static,
178 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
179 tst-sem11-static and tst-sem12-static.
181 (LDLIBS-tst-cancel24-static): New macro.
182 * tst-cancel24-static.cc: New file.
183 * tst-cond8-static.c: Likewise.
184 * tst-mutex8-static.c: Likewise.
185 * tst-mutexpi8-static.c: Likewise.
186 * tst-sem11-static.c: Likewise.
187 * tst-sem12-static.c: Likewise.
189 2012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
192 * Makefile (tests): New test case tst-cond24.
193 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
195 (__pthread_cond_timedwait): Unlock mutex before going back to
197 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
198 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
199 return from futex_wait.
200 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
201 (__pthread_cond_timedwait): Unlock mutex before going back to
202 wait in PI case. Set requeue_pi flag only if wait returned 0.
203 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
204 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
205 return from futex_wait.
206 * tst-cond24.c: New test case.
208 2012-10-04 Roland McGrath <roland@hack.frob.com>
210 * pthread_create.c (start_thread): Use __madvise, not madvise.
212 2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
214 * sysdeps/i386/tls.h: Update copyright years.
216 2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
218 * pthread_create.c (start_thread): Fix clone flag name in
219 comment to CLONE_CHILD_CLEARTID.
220 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
221 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
222 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
223 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
224 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
225 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
227 2012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
230 * Makefile (tests): Add tst-cond-except.
231 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
232 (__pthread_cond_timedwait): Mark instructions where %ebx is
233 incremented in PI case.
234 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
235 for the marked PI case instructions.
236 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
237 (__pthread_cond_wait): Mark instructions where %ebx is
238 incremented in PI case.
239 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
240 for the marked PI case instructions.
241 * tst-cond-except.c: New test case.
243 2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
245 * tst-tls6.sh: Add "set -e".
246 * Makefile: Do not specify -e option when running testsuite
249 * tst-tls6.sh: Add copyright header.
251 2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
253 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
254 to uint64_t for 64-bit store.
255 (THREAD_SETMEM_NC): Likewise.
257 2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
259 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
261 (THREAD_SETMEM_NC): Likewise.
263 2012-09-14 Jeff Law <law@redhat.com>
266 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
268 2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
271 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
274 2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
276 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
277 (LDLIBS-tst-cancel24): This.
279 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
282 * Makefile (tests-static): Add tst-cancel21-static.
284 * tst-cancel21-static.c: New file.
286 2012-09-01 Joseph Myers <joseph@codesourcery.com>
288 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
289 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
290 [__NR_clock_getres]: Make code unconditional.
291 (pthread_getcpuclockid): Remove code left unreachable by removal
294 2012-08-31 Joseph Myers <joseph@codesourcery.com>
297 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
298 atomic_compare_and_exchange_bool_rel.
299 * tst-sem14.c: New file.
300 * Makefile (tests): Add tst-sem14.
302 2012-08-15 Roland McGrath <roland@hack.frob.com>
304 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
306 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
307 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
309 2012-08-16 Joseph Myers <joseph@codesourcery.com>
311 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
312 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
313 * pthread_condattr_setclock.c (pthread_condattr_setclock)
314 [!__ASSUME_POSIX_TIMERS]: Likewise.
315 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
316 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
317 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
318 [!__ASSUME_POSIX_TIMERS]: Likewise.
319 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
320 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
321 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
323 [!__NR-timer_create]: Remove conditional code.
324 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
325 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
327 [!__NR_timer_delete]: Remove conditional code.
328 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
329 * sysdeps/unix/sysv/linux/timer_getoverr.c
330 [__NR_timer_getoverrun]: Make code unconditional.
331 [!__NR_timer_getoverrun]: Remove conditional code.
332 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
333 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
334 Make code unconditional.
335 [!__NR_timer_gettime]: Remove conditional code.
336 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
337 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
338 Make code unconditional.
339 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
340 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
341 Make code unconditional.
342 [!__NR_timer_settime]: Remove conditional code.
343 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
344 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
345 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
348 2012-08-15 Tom de Vries <vries@codesourcery.com>
349 Maxim Kuvyrkov <maxim@codesourcery.com>
351 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
352 (__libc_lock_trylock): Allow pre-existing definitions.
354 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
356 * pthread_spin_lock.c: New file.
357 * pthread_spin_trylock.c: New file.
359 2012-08-08 Joseph Myers <joseph@codesourcery.com>
361 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
363 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
364 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
366 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
367 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
368 Make code unconditional.
369 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
370 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
371 __NR_tgkill]: Make code unconditional.
372 (raise) [__ASSUME_TGKILL]: Likewise.
373 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
374 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
375 [__ASSUME_TGKILL]: Make code unconditional.
376 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
377 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
378 __NR_tgkill]: Make code unconditional.
379 (raise) [__ASSUME_TGKILL]: Likewise.
380 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
382 2012-08-07 Joseph Myers <joseph@codesourcery.com>
384 * sysdeps/pthread/createthread.c (create_thread)
385 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
387 2012-08-03 Joseph Myers <joseph@codesourcery.com>
389 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
391 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
393 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
395 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
396 (pagesize): New static variable.
397 (allocate_and_test): Return MEM. Rename parameter to TARGET.
398 (check_stack_top): New local variables MEM and PAGEMASK. Cap
399 stack size to MAX_STACK_SIZE. Call allocate_and_test for
400 halfway up the stack top page. Verify that the top page was
402 (do_test): Get pagesize using sysconf.
404 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
406 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
408 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
409 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
412 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
414 * tst-pthread-getattr.c: Revert last change.
416 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
418 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
421 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
423 (check_stack_top): Read valued written into STACKADDR in
424 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
426 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
428 * nptl-init.c (sighandler_setxid): Fix the comment that
431 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
433 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
434 (__lll_robust_timedlock_wait): Simplify CFI directives.
436 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
439 * Makefile (tests): Add test case.
440 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
441 the __libc_stack_end page from stacksize. Truncate stacksize to
442 make it page aligned when it is computed from RLIMIT_STACK.
443 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
446 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
449 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
452 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
453 Jakub Jelinek <jakub@redhat.com>
456 * sysdeps/pthread/pthread.h
457 [!(defined __GNUC__ && defined __EXCEPTIONS)]
458 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
459 __libc_unlikely instead of __builtin_expect.
461 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
464 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
465 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
466 * sysdeps/unix/sysv/linux/i386/Implies: New file.
467 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
468 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
470 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
471 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
473 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
475 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
478 * nptl-init.c (pthread_functions): Remove use of INTUSE and
480 (__pthread_initialize_minimal_internal): Likewise.
481 * sem_open.c: Likewise.
482 * sem_unlink.c: Likewise.
483 * pthreadP.h: Replace _internal aliases by hidden_proto
485 * pthread_getspecific.c: Replace _internal alias by hidden_def.
486 * pthread_key_create.c: Likewise.
487 * pthread_mutex_destroy.c: Likewise.
488 * pthread_mutex_init.c: Likewise.
489 * pthread_mutex_lock.c: Likewise.
490 * pthread_mutex_unlock.c: Likewise.
491 * pthread_once.c: Likewise.
492 * pthread_rwlock_rdlock.c: Likewise.
493 * pthread_rwlock_unlock.c: Likewise.
494 * pthread_rwlock_wrlock.c: Likewise.
495 * pthread_setspecific.c: Likewise.
496 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
498 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
500 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
502 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
503 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
504 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
505 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
506 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
507 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
508 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
509 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
510 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
511 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
513 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
515 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
518 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
520 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
521 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
523 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
524 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
526 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
527 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
528 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
529 (pthread_barrier_wait): Likewise.
530 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
531 (__pthread_cond_broadcast): Likewise.
532 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
533 (__pthread_cond_signal): Likewise.
534 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
535 (__pthread_cond_timedwait): Likewise.
536 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
538 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
539 (__pthread_rwlock_rdlock): Likewise.
540 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
541 (pthread_rwlock_timedrdlock): Likewise.
542 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
543 (pthread_rwlock_timedwrlock): Likewise.
544 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
545 (__pthread_rwlock_unlock): Likewise.
546 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
547 (__pthread_rwlock_wrlock): Likewise.
548 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
549 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
550 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
552 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
554 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
557 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
558 __libc_stack_end rounded to the end of containing page as the
561 2012-05-25 Rayson Ho <rho@redhat.com>
563 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
565 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
566 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
567 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
568 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
569 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
570 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
571 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
572 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
574 2012-05-25 Rayson Ho <rho@redhat.com>
575 Roland McGrath <roland@hack.frob.com>
577 * DESIGN-systemtap-probes.txt: New file.
578 * pthread_cond_broadcast.c: SystemTap probes.
579 * pthread_cond_init.c: Likewise.
580 * pthread_cond_signal.c: Likewise.
581 * pthread_cond_wait.c: Likewise.
582 * pthread_cond_destroy.c: Likewise.
583 * pthread_create.c: Likewise.
584 * pthread_join.c: Likewise.
585 * pthread_mutex_destroy.c: Likewise.
586 * pthread_mutex_init.c: Likewise.
587 * pthread_mutex_lock.c: Likewise.
588 * pthread_mutex_timedlock.c: Likewise.
589 * pthread_mutex_unlock.c: Likewise.
590 * pthread_rwlock_destroy.c: Likewise.
591 * pthread_rwlock_rdlock.c: Likewise.
592 * pthread_rwlock_unlock.c: Likewise.
593 * pthread_rwlock_wrlock.c: Likewise.
594 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
595 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
596 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
597 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
598 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
599 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
600 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
601 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
603 2012-05-24 Roland McGrath <roland@hack.frob.com>
605 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
607 2012-05-17 Andreas Jaeger <aj@suse.de>
609 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
610 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
611 only for older kernels.
613 2012-05-15 Joseph Myers <joseph@codesourcery.com>
615 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
618 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
620 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
621 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
622 (lll_robust_lock): Likewise.
623 (lll_cond_lock): Likewise.
624 (lll_robust_cond_lock): Likewise.
625 (lll_timedlock): Likewise.
626 (lll_robust_timedlock): Likewise.
627 (lll_unlock): Likewise.
628 (lll_robust_unlock): Likewise.
630 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
632 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
633 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
635 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
637 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
639 (__gcc_personality_v0): Replace 8-byte data alignment with
640 LP_SIZE alignment and .quad with ASM_ADDR.
642 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
644 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
646 (__gcc_personality_v0): Replace 8-byte data alignment with
647 LP_SIZE alignment and .quad with ASM_ADDR.
649 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
651 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
652 NWAITERS, which is unsigned long int.
654 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
656 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
657 (__gcc_personality_v0): Replace 8-byte data alignment with
658 LP_SIZE alignment and .quad with ASM_ADDR.
660 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
662 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
663 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
664 __vdso_clock_gettime pointer into RAX_LP.
665 (__gcc_personality_v0): Replace 8-byte data alignment with
666 LP_SIZE alignment and .quad with ASM_ADDR.
668 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
670 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
671 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
672 __vdso_clock_gettime pointer into RAX_LP.
673 (__gcc_personality_v0): Replace 8-byte data alignment with
674 LP_SIZE alignment and .quad with ASM_ADDR.
676 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
678 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
679 LP_OP(cmp) and R8_LP on dep_mutex pointer.
681 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
683 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
684 to update pointer in memory. Load pointer into RDI_LP.
686 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
688 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
689 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
691 (LLL_STUB_UNWIND_INFO_END): Likewise.
692 (lll_timedlock): Load timeout pointer into RDX_LP.
693 (lll_robust_timedlock): Likewise.
695 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
696 Jakub Jelinek <jakub@redhat.com>
699 * Makefile (tests): Add test cases.
700 * descr.h (struct pthread): Add a comment describing multiple_threads.
701 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
703 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
704 before setting cancelstate of the thread.
705 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
706 (__libc_multiple_threads): Add explanatory comment.
707 * tst-cancel-self-cancelstate.c: New test case.
708 * tst-cancel-self-canceltype.c: Likewise.
709 * tst-cancel-self-cleanup.c: Supporting file for test cases.
710 * tst-cancel-self-testcancel.c: New test case.
711 * tst-cancel-self.c: Likewise.
712 * vars.c: Expand comment to include single-process case.
714 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
716 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
717 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
720 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
722 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
724 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
725 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
727 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
729 * shlib-versions: Move x86_64-.*-linux.* entry to ...
730 * sysdeps/x86_64/64/shlib-versions: Here. New file.
731 * sysdeps/x86_64/x32/shlib-versions: New file.
733 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
735 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
736 __SIZEOF_PTHREAD_XXX_T.
737 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
738 (pthread_mutex_t): Likewise.
739 (pthread_rwlock_t): Likewise.
740 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
743 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
745 * sysdeps/x86_64/x32/tls.h: New file.
747 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
749 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
751 (THREAD_SETMEM_NC): Likewise.
753 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
755 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
758 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
760 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
761 (__cleanup_fct_attribute): Check __x86_64__ instead of
764 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
766 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
767 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
768 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
769 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
770 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
772 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
774 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
775 instead of __WORDSIZE.
777 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
780 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
782 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
784 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
785 (__pthread_cond_timedwait): Use CFI directives.
786 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
787 (__pthread_cond_wait): Likewise.
788 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
789 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
791 2012-05-03 David S. Miller <davem@davemloft.net>
793 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
794 always have to return 0, especially for the pthread_spin_init
796 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
798 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
799 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
801 2012-05-02 David S. Miller <davem@davemloft.net>
803 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
804 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
805 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
806 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
807 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
808 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
809 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
810 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
811 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
812 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
813 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
814 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
815 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
816 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
817 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
818 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
819 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
820 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
822 2012-05-02 Allan McRae <allan@archlinux.org>
824 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
825 (LDFLAGS-tst-cancel24): Likewise.
827 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
829 * sysdeps/i386/pthread_spin_lock.S: New.
830 * sysdeps/i386/pthread_spin_lock.c: Delete.
831 * sysdeps/x86_64/pthread_spin_lock.S: New.
832 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
834 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
836 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
837 run when cross-compiling.
839 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
841 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
842 instead of libgcc_s.h.
844 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
846 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
848 2012-03-27 David S. Miller <davem@davemloft.net>
850 * tst-cond16.c (do_test): Use a thread stack size which is either
851 PTHREAD_STACK_MIN or the page size, whichever is larger.
852 * tst-cond18.c (do_test): Likewise.
854 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
856 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
857 register char * __asm__("rsp") to get stack frame.
859 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
861 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
864 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
866 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
869 2012-03-16 David S. Miller <davem@davemloft.net>
872 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
874 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
877 2012-03-15 David S. Miller <davem@davemloft.net>
880 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
882 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
885 * pt-crti.S: Replace FSF snail mail address with URL.
887 2012-03-09 Joseph Myers <joseph@codesourcery.com>
889 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
890 Do not define before including <time.h>.
892 2012-03-08 David S. Miller <davem@davemloft.net>
894 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
896 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
898 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
899 Check for timestamp before the Epoch.
901 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
904 * tst-sem13.c (do_test): Add another test case.
905 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
906 Fix updating nwaiters.
908 2012-03-07 Joseph Myers <joseph@codesourcery.com>
911 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
912 link test to a compile test.
913 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
915 * sysdeps/pthread/configure: Regenerated.
917 2012-03-07 Ulrich Drepper <drepper@gmail.com>
919 * Makefile (distribute): Remove variable.
921 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
923 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
924 superfluous assignment.
925 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
927 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
928 (sem_timedwait): Likewise.
930 2012-03-06 Ulrich Drepper <drepper@gmail.com>
932 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
933 installed headers to...
934 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
936 2012-03-06 David S. Miller <davem@davemloft.net>
938 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
939 atomic_increment and remove unused local variable.
940 (__old_sem_post): Likewise.
942 2012-02-27 David S. Miller <davem@davemloft.net>
944 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
945 non-existing __pthread_attr.
946 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
947 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
948 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
949 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
950 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
952 2012-02-26 Ulrich Drepper <drepper@gmail.com>
954 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
956 * sysdeps/pthread/pthread.h: Define __need_timespec before including
958 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
960 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
961 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
962 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
963 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
964 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
966 2012-02-21 Joseph Myers <joseph@codesourcery.com>
969 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
971 [crti.S not in sysdirs] (omit-deps): Do not append.
972 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
973 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
974 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
975 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
976 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
977 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
978 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
979 [crti.S in sysdirs] (extra-objs): Append unconditionally.
980 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
982 * sysdeps/pthread/pt-initfini.c: Remove file.
984 2012-02-16 Richard Henderson <rth@twiddle.net>
986 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
987 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
989 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
991 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
993 2012-02-16 David S. Miller <davem@davemloft.net>
995 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
997 2012-02-15 Marek Polacek <polacek@redhat.com>
999 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1001 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
1003 Replace FSF snail mail address with URLs, as per GNU coding standards.
1005 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
1007 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1009 2012-02-08 Joseph Myers <joseph@codesourcery.com>
1011 Support crti.S and crtn.S provided directly by architectures.
1012 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1013 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1014 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1015 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1016 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1017 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1018 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1019 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1020 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1021 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1022 * pt-crti.S: New file.
1023 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1025 2012-02-03 Joseph Myers <joseph@codesourcery.com>
1027 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1028 macros for PIC register setup.
1029 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1030 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1031 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1032 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1033 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1035 2012-01-11 Marek Polacek <polacek@redhat.com>
1037 * forward.c (FORWARD_NORETURN): Define macro.
1038 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1039 (__pthread_exit): Likewise.
1041 2012-01-10 Ulrich Drepper <drepper@gmail.com>
1043 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1045 * pthreadP.h: Add noreturn to __pthread_exit.
1046 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1048 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
1050 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1051 Call pthread_attr_setstacksize() with result of
1052 __pthread_get_minstack() to account for application TLS usage.
1054 2012-01-08 Marek Polacek <polacek@redhat.com>
1056 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1058 2012-01-07 Ulrich Drepper <drepper@gmail.com>
1061 * pthreadP.h: Use const instead of __const.
1062 * semaphore.h: Likewise.
1063 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1064 * sysdeps/pthread/bits/sigthread.h: Likewise.
1065 * sysdeps/pthread/pthread.h: Likewise.
1067 * Makefile: Remove elf=yes test, only ELF is supported.
1069 * shlib-versions: Remove entries for ports architectures.
1071 In case anyone cares, the IA-64 architecture could move to ports.
1072 * sysdeps/ia64/*: Removed.
1073 * sysdeps/unix/sysv/linux/ia64/*: Removed.
1075 2011-12-22 Ulrich Drepper <drepper@gmail.com>
1077 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1078 __pthread_get_minstack.
1079 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1082 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1083 through __pthread_get_minstack.
1084 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1085 directly from _rtld_global_ro.
1086 (__pthread_get_minstack): New function.
1087 * pthreadP.h: Declare __pthread_get_minstack.
1088 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1090 2011-12-21 Ulrich Drepper <drepper@gmail.com>
1093 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1094 Correct reading name from file.
1096 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
1098 * allocatestack.c (allocate_stack): Return errno on failure.
1100 2011-12-14 Jeff Law <law@redhat.com>
1103 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1105 2011-11-28 Andreas Schwab <schwab@redhat.com>
1107 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1108 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1109 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1111 2011-11-15 Ulrich Drepper <drepper@gmail.com>
1113 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1116 2011-10-29 Ulrich Drepper <drepper@gmail.com>
1119 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1120 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1121 path for kernels with FUTEX_CLOCK_REALTIME.
1122 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1124 2011-10-27 Andreas Schwab <schwab@redhat.com>
1127 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1128 for memory synchronization functions.
1129 * semaphore.h: Likewise.
1131 2011-10-24 Ulrich Drepper <drepper@gmail.com>
1133 * tst-cancel7.c: Avoid warning.
1134 * tst-mutex6.c: Likewise.
1135 * tst-mutex9.c: Likewise.
1136 * tst-mutexpi6.c: Likewise.
1138 2011-10-23 Ulrich Drepper <drepper@gmail.com>
1140 * sysdeps/i386/tls.h: Remove #include <list.h>.
1142 2011-10-15 Ulrich Drepper <drepper@gmail.com>
1144 * pthread_create.c (start_thread): Call __ctype_init.
1146 2011-09-15 Andreas Schwab <schwab@redhat.com>
1148 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1150 (list_add): Add atomic_write_barrier.
1151 * descr.h: Define __need_list_t before including <list.h>.
1152 * nptl-init.c: Include <list.h>
1153 * allocatestack.c: Likewise.
1155 2011-09-11 Ulrich Drepper <drepper@gmail.com>
1157 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1158 * sysdeps/ia64/tls.h: Likewise.
1159 * sysdeps/powerpc/tls.h: Likewise.
1160 * sysdeps/s390/tls.h: Likewise.
1161 * sysdeps/sh/tls.h: Likewise.
1162 * sysdeps/sparc/tls.h: Likewise.
1163 * sysdeps/x86_64/tls.h: Likewise.
1165 2011-09-10 Ulrich Drepper <drepper@gmail.com>
1167 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1169 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1171 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1172 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1173 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1174 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1175 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1176 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1177 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1178 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1179 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1180 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1181 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1182 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1184 * tst-tls1.c: Support for __thread is now mandatory.
1185 * tst-tls2.c: Likewise.
1186 * tst-tls3.c: Likewise.
1187 * tst-tls3mod.c: Likewise.
1188 * tst-tls4.c: Likewise.
1189 * tst-tls4moda.c: Likewise.
1190 * tst-tls4modb.c: Likewise.
1191 * tst-tls5.h: Likewise.
1193 2011-09-08 Ulrich Drepper <drepper@gmail.com>
1196 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1197 (pthread_rwlock_timedwrlock): Use correct macro in test.
1198 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1200 2011-09-06 Ulrich Drepper <drepper@gmail.com>
1202 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1203 use gettimeofday vsyscall, just call gettimeofday.
1204 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1205 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1206 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1208 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1210 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1211 Simplify __vdso_clock_gettime use.
1213 2011-09-05 David S. Miller <davem@davemloft.net>
1215 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1217 (sem_timedwait): Call it to force an exception region around
1218 the async cancel enable and the futex operation.
1219 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1220 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1221 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1222 (__new_sem_wait): Call it to force an exception region around
1223 the async cancel enable and the futex operation.
1224 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1225 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1227 2011-08-31 Andreas Schwab <schwab@redhat.com>
1229 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1232 2011-08-20 David S. Miller <davem@davemloft.net>
1234 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1236 2011-08-14 Roland McGrath <roland@hack.frob.com>
1238 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1239 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1241 2011-08-08 Andreas Schwab <schwab@redhat.com>
1243 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1245 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1246 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1248 2011-07-22 Ulrich Drepper <drepper@gmail.com>
1250 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1252 (__gcc_personality_v0): Likewise.
1253 (_Unwind_ForcedUnwind): Likewise.
1254 (_Unwind_GetCFA): Likewise.
1256 2011-07-14 Roland McGrath <roland@hack.frob.com>
1258 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1261 2011-06-30 Ulrich Drepper <drepper@gmail.com>
1263 * nptl-init.c (__nptl_set_robust): New function.
1264 (pthread_functions): Add reference.
1265 * npthreadP.h: Declare __nptl_set_robust.
1266 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1267 ptr_set_robust member.
1268 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1269 child if threads are used.
1271 2011-06-14 Andreas Jaeger <aj@suse.de>
1273 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1275 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1278 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1280 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1283 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1285 Patch partly by Robert Rex <robert.rex@exasol.com>.
1287 2011-01-19 Roland McGrath <roland@redhat.com>
1289 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1290 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1291 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1292 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1293 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1294 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1296 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1298 * Makefile (test-extras): Add tst-cleanup4aux.
1300 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1303 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1304 (__SETXID_2): Likewise.
1305 (__SETXID_3): Likewise.
1307 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1310 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1311 * alloca_cutoff.c: Add libc_hidden_def.
1313 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1316 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1317 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1318 of "struct pthread".
1320 2010-09-21 Andreas Schwab <schwab@redhat.com>
1322 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1323 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1324 (pthread_cleanup_push_defer_np): Likewise.
1326 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1328 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1331 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1332 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1334 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1335 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1337 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1339 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1341 2010-05-01 Alan Modra <amodra@gmail.com>
1343 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1344 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1345 to save temps. Correct cfi for possible later frame manipulation.
1346 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1347 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1348 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1349 (DOCARGS_6, UNDOCARGS_6): Likewise.
1350 (CENABLE, CDISABLE): Add nops for non-shared calls.
1352 2010-07-06 Andreas Schwab <schwab@redhat.com>
1354 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1357 2010-07-03 Ulrich Drepper <drepper@redhat.com>
1359 * tst-abstime.c (do_test): Some more cleanups
1361 2010-07-02 Ulrich Drepper <drepper@redhat.com>
1363 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1365 2010-07-01 Andreas Schwab <schwab@redhat.com>
1366 Ulrich Drepper <drepper@redhat.com>
1368 * Makefile (tests): Add tst-abstime.
1369 * tst-abstime.c: New file.
1370 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1371 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1372 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1373 (__lll_timedlock_wait): Likewise.
1374 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1375 (__lll_robust_timedlock_wait): Likewise.
1376 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1377 (__pthread_cond_timedwait): Likewise.
1378 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1379 (pthread_rwlock_timedrdlock): Likewise.
1380 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1381 (pthread_rwlock_timedwrlock): Likewise.
1382 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1385 2010-07-01 Ulrich Drepper <drepper@redhat.com>
1387 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1389 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1391 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1392 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1394 2010-04-09 Ulrich Drepper <drepper@redhat.com>
1397 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1398 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1399 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1401 * Makefile (libpthread-routines): Add pthread_getname and
1403 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1405 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1407 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1408 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1409 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1410 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1412 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1414 * pthread_cond_timedwait.c: Add check for
1415 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1416 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1419 2010-03-09 Ulrich Drepper <drepper@redhat.com>
1421 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1422 and the call fails wake eventually waiting setxid threads. Don't free
1423 stack here if we try starting a thread.
1424 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1425 if the clone call failed.
1427 2010-03-08 Andreas Schwab <schwab@redhat.com>
1429 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1430 * allocatestack.c (get_cached_stack): Set setxid_futex.
1431 (allocate_stack): Likewise.
1433 2010-03-05 Andreas Schwab <schwab@redhat.com>
1434 Ulrich Drepper <drepper@redhat.com>
1436 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1437 it is creating a thread or it is just being created.
1438 * pthread_create.c (start_thread): Wake setxid thread if it is
1440 (__pthread_create_2_1): Initialize setxid_futex.
1441 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1444 2010-01-15 Ulrich Drepper <drepper@redhat.com>
1446 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1448 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1450 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
1452 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1453 Fix pthread_cond_timedwait with requeue-PI.
1454 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1455 Fix pthread_cond_wait with requeue-PI.
1457 2010-01-14 Ulrich Drepper <drepper@redhat.com>
1459 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1460 and pthread_mutexattr_setrobust for GLIBC_2.12.
1461 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1462 * pthread_mutexattr_getrobust.c: Define alias
1463 pthread_mutexattr_getrobust.
1464 * pthread_mutexattr_setrobust.c: Define alias
1465 pthread_mutexattr_setrobust.
1467 2010-01-12 Ulrich Drepper <drepper@redhat.com>
1469 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1471 2010-01-08 Ulrich Drepper <drepper@redhat.com>
1473 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1475 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1477 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1478 call __gmon_start__.
1479 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1481 2009-12-17 Ulrich Drepper <drepper@redhat.com>
1483 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1486 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1488 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1489 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1490 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1491 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1492 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1493 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1494 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1495 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1497 2009-12-12 Ulrich Drepper <drepper@redhat.com>
1499 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1500 Don't update nwaiters after invalid timeout is recognized.
1502 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1504 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1507 2009-11-27 Andreas Schwab <schwab@redhat.com>
1509 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1510 THREAD_SELF->cancelhandling after returning from futex call.
1512 2009-11-24 Ulrich Drepper <drepper@redhat.com>
1514 * tst-sem13.c: New file.
1515 * Makefile (tests): Add tst-sem13.
1517 2009-11-22 Roland McGrath <roland@redhat.com>
1519 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1520 instead of recapitulating its contents.
1522 2009-11-18 Ulrich Drepper <drepper@redhat.com>
1524 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1525 optimizations and cleanups.
1527 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1529 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1530 Remove redundant code. Fix cfi offsets.
1531 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1534 2009-11-17 Ulrich Drepper <drepper@redhat.com>
1536 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1537 reduce size of unwind info.
1539 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1541 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1542 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1544 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1547 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1549 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1551 2009-10-30 Ulrich Drepper <drepper@redhat.com>
1553 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1556 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1557 steps to avoid races with creation and terminations.
1558 * nptl-init.c (sighandler_setxid): Adjust.
1559 Patch by Daniel Jacobowitz.
1561 2009-09-07 Andreas Schwab <schwab@redhat.com>
1563 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1565 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
1566 Joseph Myers <joseph@codesourcery.com>
1569 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1570 Initialize the sigev_notify field for newly created timer to make sure
1571 the timer gets deleted from the active timer's list upon timer_delete.
1573 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
1575 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1576 Correct a logic error.
1578 2009-08-25 Ulrich Drepper <drepper@redhat.com>
1580 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1581 of the field in local variables.
1582 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1583 variable and don't unconditionally clear it.
1585 2009-08-24 Ulrich Drepper <drepper@redhat.com>
1587 * pthread_create.c (start_thread): Hint to the kernel that memory for
1588 the stack can be reused. We do not mark all the memory. The part
1589 still in use and some reserve are kept.
1591 2009-08-23 Ulrich Drepper <drepper@redhat.com>
1593 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1595 2009-08-11 Ulrich Drepper <drepper@redhat.com>
1597 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1600 2009-08-10 Ulrich Drepper <drepper@redhat.com>
1602 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1604 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1606 2009-08-10 Andreas Schwab <schwab@redhat.com>
1608 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1609 (__pthread_cond_signal): Don't clobber register used for syscall
1612 2009-08-08 Ulrich Drepper <drepper@redhat.com>
1614 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1615 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1617 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1618 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1621 2009-08-07 Ulrich Drepper <drepper@redhat.com>
1623 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1624 enabled by the special *_asynccancel functions.
1625 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1626 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1628 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1630 2009-08-04 Ulrich Drepper <drepper@redhat.com>
1632 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1633 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1634 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1635 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1636 since we can assume the special __*_{en,dis}able_asynccancel
1638 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1639 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1640 and PTHREAD_CANCELED.
1642 2009-07-31 Ulrich Drepper <drepper@redhat.com>
1644 * descr.h: Better definition of *_BITMASK macros for cancellation.
1646 2009-07-29 Ulrich Drepper <drepper@redhat.com>
1648 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1650 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1651 dynamic linker might have to save.
1652 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1653 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1656 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1658 2009-07-28 Ulrich Drepper <drepper@redhat.com>
1660 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1662 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1663 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1664 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1665 requeue_pi for robust mutexes.
1666 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1667 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1668 Don't only skip __pthread_mutex_cond_lock. Call instead
1669 __pthread_mutex_cond_lock_adjust.
1670 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1672 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1673 optimization of PI mutex handling.
1675 2009-07-27 Ulrich Drepper <drepper@redhat.com>
1678 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1679 instead of of _acq variants of cmpxchg.
1681 2009-07-23 Ulrich Drepper <drepper@redhat.com>
1683 * sysdeps/x86_64/configure.in: New file.
1685 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1686 path when not using absolute timeout futex.
1688 2009-07-20 Ulrich Drepper <drepper@redhat.com>
1690 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1691 optimizations of last changes.
1692 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1694 2009-07-19 Ulrich Drepper <drepper@redhat.com>
1696 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1697 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1698 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1699 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1700 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1701 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1702 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1703 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1705 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1706 (__pthread_cond_timedwait): Make more robust.
1708 2009-07-18 Ulrich Drepper <drepper@redhat.com>
1710 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1711 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1712 directly use absolute timeout.
1714 * tst-sem5.c (do_test): Add test for premature timeout.
1715 * Makefile: Linu tst-sem5 with librt.
1717 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1718 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1719 directly use absolute timeout.
1720 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1721 (pthread_rwlock_timedrdlock): Likewise.
1723 * tst-cond11.c (run_test): Add test to check that the timeout is
1726 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1727 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1728 directly use absolute timeout.
1730 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1731 (__pthread_cond_wait): Convert to using exception handler instead of
1732 registered unwind buffer.
1733 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1734 (__pthread_cond_timedwait): Likewise.
1736 2009-07-17 Ulrich Drepper <drepper@redhat.com>
1738 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1739 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1740 use absolute timeout.
1742 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1743 handling of uncontested semaphore.
1745 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1746 (__condvar_cleanup): Rewrite to use cfi directives instead of
1747 hand-coded unwind tables.
1748 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1750 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1751 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1754 2009-06-12 Ulrich Drepper <drepper@redhat.com>
1756 * Makefile (libpthread-routines): Add pthread_sigqueue.
1757 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1758 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1759 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1761 2009-06-11 Ulrich Drepper <drepper@redhat.com>
1764 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1765 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1767 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1769 2009-05-16 Ulrich Drepper <drepper@redhat.com>
1771 * libc-cancellation.c: Move __libc_cleanup_routine to...
1772 * libc-cleanup.c: ...here. New file.
1773 * Makefile (routines): Add libc-cleanup.
1775 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1777 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1778 * sysdeps/pthread/librt-cancellation.c: Likewise.
1781 * nptl-init.c: Renamed from init.c.
1782 * Makefile: Change all occurences of init.c to nptl-init.c.
1784 2009-05-15 Ulrich Drepper <drepper@redhat.com>
1786 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1787 to test when deciding on the delay.
1788 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1789 * pthread_cancel.c: Close race between deciding on sending a signal
1790 and setting the CANCELING_BIT bit.
1792 * cancellation.c (__pthread_disable_asynccancel): Don't return if
1794 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1796 2009-04-27 Ulrich Drepper <drepper@redhat.com>
1798 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1800 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1801 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1802 * sysdeps/i386/tls.h: Likewise.
1803 (tcbhead_t): Add __private_tm member.
1805 2009-04-26 Ulrich Drepper <drepper@redhat.com>
1807 * sem_open.c (sem_open): Rewrite initialization of initsem to
1810 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1811 Avoid warning by using may_alias attribute on ptrhack.
1813 2009-04-22 Ulrich Drepper <drepper@redhat.com>
1816 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1817 Check policy and priority for validity.
1818 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1820 2009-03-15 Ulrich Drepper <drepper@redhat.com>
1822 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1823 (__pthread_cond_timedwait): Change to use cfi directives instead of
1824 hand-coded unwind sections.
1826 2009-03-10 Ulrich Drepper <drepper@redhat.com>
1828 * init.c (nptl_freeres): Compile only for SHARED.
1830 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1832 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1833 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1834 FUTEX_BITSET_MATCH_ANY.
1836 2009-02-27 Roland McGrath <roland@redhat.com>
1838 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1839 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1841 2009-02-26 Ulrich Drepper <drepper@redhat.com>
1843 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1844 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1845 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1848 2009-02-25 Ulrich Drepper <drepper@redhat.com>
1850 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1853 2009-02-24 Ulrich Drepper <drepper@redhat.com>
1855 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1856 Unify name of include protector macro.
1858 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1860 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1861 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1863 2009-01-29 Ulrich Drepper <drepper@redhat.com>
1865 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1868 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1869 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1870 * init.c (nptl_freeres): New function.
1871 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1872 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1873 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1875 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1876 load DSO. Assign last.
1877 (__unwind_freeres): New function.
1879 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1880 for better debugging. No need to use stack_list_add here.
1882 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1884 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1885 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1886 instead of computing relative timeout.
1887 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1888 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1890 2009-01-25 Ulrich Drepper <drepper@redhat.com>
1892 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1894 2009-01-08 Ulrich Drepper <drepper@redhat.com>
1896 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1897 (list_add_tail): Removed.
1899 2009-01-07 Ulrich Drepper <drepper@redhat.com>
1901 * (in_flight_stack): New variable.
1902 (stack_list_del): New function. Use instead of list_del.
1903 (stack_list_add): New function. Use instead of list_add when adding to
1904 stack_cache and stack_used lists.
1905 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1906 when the fork call interrupted another thread.
1908 2009-01-04 Ulrich Drepper <drepper@redhat.com>
1910 * init.c (__pthread_initialize_minimal_internal): Optimize test
1911 FUTEX_CLOCK_REALTIME a bit.
1913 2009-01-03 Ulrich Drepper <drepper@redhat.com>
1915 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1916 only passing five parameters to FUTEX_WAIT_BITSET call.
1918 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1919 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1920 instead of computing relative timeout.
1922 2009-01-02 Ulrich Drepper <drepper@redhat.com>
1924 * init.c (__pthread_initialize_minimal_internal): Check for
1925 FUTEX_CLOCK_REALTIME flag.
1926 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1927 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1930 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1931 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1932 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1933 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1934 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1935 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1937 2008-12-09 Ulrich Drepper <drepper@redhat.com>
1939 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1940 loop body instead of ; to avoid gcc warnings.
1941 (pthread_cleanup_pop_restore_np): Likewise.
1942 Patch by Caolán McNamara <caolanm@redhat.com>.
1944 2008-12-09 Jakub Jelinek <jakub@redhat.com>
1946 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1947 fast path here, for robust/PI/PP mutexes call
1948 __pthread_mutex_lock_full. Don't use switch, instead use a series
1949 of ifs according to their probability.
1950 (__pthread_mutex_lock_full): New function.
1951 * pthread_mutex_unlock.c: Include assert.h.
1952 (__pthread_mutex_unlock_usercnt): Handle only the
1953 fast path here, for robust/PI/PP mutexes call
1954 __pthread_mutex_unlock_full. Don't use switch, instead use a series
1955 of ifs according to their probability.
1956 (__pthread_mutex_unlock_full): New function.
1957 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1958 (__pthread_mutex_lock_full): Define.
1960 2008-12-08 Ulrich Drepper <drepper@redhat.com>
1962 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1963 implementation. Add necessary padding and.
1964 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1967 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1969 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1970 and FUTEX_WAKE_BITSET.
1972 2008-12-02 Ulrich Drepper <drepper@redhat.com>
1974 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1975 and FUTEX_WAKE_BITSET.
1976 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1977 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1978 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1979 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1981 2008-11-25 Roland McGrath <roland@redhat.com>
1983 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1984 Subdirectories moved to ports repository as
1985 sysdeps/.../nptl subdirectories.
1987 2008-11-12 Jakub Jelinek <jakub@redhat.com>
1990 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1992 * pthread_cond_init.c (__pthread_cond_init): Fix
1993 cond->__data.__nwaiters initialization.
1994 * Makefile (tests): Add tst-cond23.
1995 * tst-cond23.c: New test.
1997 2008-11-07 Jakub Jelinek <jakub@redhat.com>
1999 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2001 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2004 2008-11-01 Ulrich Drepper <drepper@redhat.com>
2007 * pthread_mutex_lock.c: Add support for private PI mutexes.
2008 * pthread_mutex_timedlock.c: Likewise.
2009 * pthread_mutex_trylock.c: Likewise.
2010 * pthread_mutex_unlock.c: Likewise.
2011 Patch mostly by Ben Jackson <ben@ben.com>.
2013 2008-10-31 Ulrich Drepper <drepper@redhat.com>
2016 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2017 Increase stack size for helper thread.
2019 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2021 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2022 assembly with a clobber list for access registers a0 and a1.
2024 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
2026 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2027 to force runp->refcntr to be read from memory.
2029 2008-09-08 Richard Guenther <rguenther@suse.de>
2031 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2032 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2033 lll_timedlock, lll_robust_timedlock, lll_unlock,
2034 lll_robust_unlock): Promote private to int.
2036 2008-08-15 Ulrich Drepper <drepper@redhat.com>
2038 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2039 ARCH_RETRY_MMAP definitions.
2040 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2041 Define MAP_STACK when not defined.
2042 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
2043 handling of ARCH_RETRY_MMAP.
2045 2008-07-30 Ulrich Drepper <drepper@redhat.com>
2047 * tst-align2.c (f): Print message that f is reached.
2049 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
2052 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2053 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2055 2008-07-25 Ulrich Drepper <drepper@redhat.com>
2057 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2058 SOCK_CLOEXEC if possible.
2060 2008-05-29 Ulrich Drepper <drepper@redhat.com>
2062 * Makefile (tests): Add tst-rwlock2a.
2063 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2064 * tst-rwlock2a.c: New file.
2066 2008-06-12 Ulrich Drepper <drepper@redhat.com>
2068 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2070 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
2072 * sysdeps/pthread/pthread.h: Fix typo in comment.
2074 2008-05-28 Ulrich Drepper <drepper@redhat.com>
2076 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2077 of CPU set to the kernel.
2079 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2081 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2083 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2084 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2085 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2086 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2087 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2088 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2090 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
2092 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2094 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2096 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2098 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2101 2008-05-26 Ulrich Drepper <drepper@redhat.com>
2103 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2105 2008-05-20 Jakub Jelinek <jakub@redhat.com>
2107 David S. Miller <davem@davemloft.net>
2109 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2111 2008-05-10 Ulrich Drepper <drepper@redhat.com>
2113 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2114 __pshared correctly.
2115 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2117 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2119 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2121 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2123 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2125 2008-04-14 David S. Miller <davem@davemloft.net>
2127 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2128 (__old_sem_wait): Fix argument to lll_futex_wait().
2130 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2132 * pthread_create.c: Require pthread_mutex_trylock and
2133 pthread_key_delete for libgcc.
2135 2008-04-08 Jakub Jelinek <jakub@redhat.com>
2138 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2139 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2140 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2142 2008-03-27 Ulrich Drepper <drepper@redhat.com>
2144 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2145 <linux/limits.h> has defined it.
2146 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2147 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2148 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2149 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2151 2008-03-18 Jakub Jelinek <jakub@redhat.com>
2153 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2155 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2156 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2158 2008-03-14 Ulrich Drepper <drepper@redhat.com>
2160 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2161 HAVE_DL_DISCOVER_OSVERSION.
2162 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2163 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2165 2008-03-07 Ulrich Drepper <drepper@redhat.com>
2168 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2169 _POSIX_CHOWN_RESTRICTED value to zero.
2171 2008-01-31 Roland McGrath <roland@redhat.com>
2173 * Makefile (omit-deps): Variable removed.
2175 2008-01-30 Ulrich Drepper <drepper@redhat.com>
2177 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2178 unnecessary addr32 prefix.
2180 2008-01-29 Roland McGrath <roland@redhat.com>
2182 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2184 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2186 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2188 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2190 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2192 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2193 (__lll_lock_wait_private): Fix typo.
2194 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2195 (pthread_barrier_wait): Likewise. Adjust XADD use.
2196 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2198 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2199 (pthread_rwlock_timedrdlock): Return correct return value.
2200 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2201 (pthread_rwlock_timedwrlock): Likewise.
2203 2008-01-15 Ulrich Drepper <drepper@redhat.com>
2205 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2206 thread returns the program exits with an error code.
2208 2008-01-10 Ulrich Drepper <drepper@redhat.com>
2210 * pthread-errnos.sym: Add EOVERFLOW.
2211 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2212 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2213 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2214 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2216 2007-12-14 Ulrich Drepper <drepper@redhat.com>
2218 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2219 parameter. Passed it as permission to mmap.
2220 * allocatestack.c (allocate_stack): Pass prot as second parameter
2223 2007-12-12 Ulrich Drepper <drepper@redhat.com>
2225 * tst-basic7.c: Allocate memory for the stack.
2228 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2229 (__pthread_cond_timedwait): Don't use VDSO.
2230 Patch by Michal Januszewski.
2232 2007-12-07 Ulrich Drepper <drepper@redhat.com>
2235 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2236 Allow label before pthread_cleanup_pop.
2237 (pthread_cleanup_pop_restore_np): Likewise.
2239 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2241 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2242 Store 2 before returning ETIMEDOUT.
2244 2007-11-23 Ulrich Drepper <drepper@redhat.com>
2246 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2247 Store 2 before returning ETIMEDOUT.
2248 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2249 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2250 (__lll_lock_wait_private): Optimize.
2251 (__lll_lock_wait): Likewise.
2253 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2255 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2256 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2257 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2259 2007-11-08 Ulrich Drepper <drepper@redhat.com>
2262 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2263 If we time out, try one last time to lock the futex to avoid
2264 losing a wakeup signal.
2265 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2266 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2269 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2272 2007-11-07 Ulrich Drepper <drepper@redhat.com>
2275 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2276 mmap failed to EAGAIN.
2277 * Makefile (tests): Add tst-basic7.
2278 * tst-basic7.c: New file.
2280 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2282 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2283 Use __linkin_atfork.
2285 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2287 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2288 missing line continuations.
2289 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2290 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2292 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2295 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2296 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2297 (struct timer): Add next element.
2298 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2299 enqueue timer structure into __active_timer_sigev_thread list.
2300 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2301 remove timer struct from __active_timer_sigev_thread.
2302 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2303 Before using timer structure make sure it is still on the
2304 __active_timer_sigev_thread list. Keep lock until done.
2305 Define __active_timer_sigev_thread and
2306 __active_timer_sigev_thread_lock.
2308 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2310 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2311 Redefine thread_atfork for use of ATFORK_MEM.
2312 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2313 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2315 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2316 Use atomic operation when removing first element of list.
2318 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2320 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2321 routine instead of an alias to __new_sem_post.
2323 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2325 * init.c (__pthread_initialize_minimal): Initialize word to appease
2328 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2330 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2331 libc.so just clear NAME.
2332 (__libc_rwlock_fini): Nop inside of libc.so.
2333 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2336 2007-09-02 Ulrich Drepper <drepper@redhat.com>
2338 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2339 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2341 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2343 2007-08-21 Ulrich Drepper <drepper@redhat.com>
2346 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2347 reclaimed stack if necessary.
2348 * Makefile (tests): Add tst-tsd6.
2349 * tst-tsd6.c: New file.
2351 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2353 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2354 Add private argument.
2356 2007-08-20 Ulrich Drepper <drepper@redhat.com>
2358 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2359 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2361 2007-08-16 Jakub Jelinek <jakub@redhat.com>
2363 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2364 (__lll_robust_timedlock): Pass private as last argument to
2365 __lll_robust_timedlock_wait.
2366 (__lll_unlock): Fix a pasto.
2368 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2370 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2371 sparc_old_sem): New structs.
2372 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2373 (__sem_wait_cleanup): New function.
2374 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2375 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2376 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2378 (__old_sem_wait): New function.
2379 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2380 nptl/sysdeps/unix/sysv/linux/sparc version.
2381 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2383 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2384 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2385 (__new_sem_trywait): Use sparc_old_sem structure.
2386 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2387 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2388 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2389 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2390 lll_futex_timed_wait.
2391 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2392 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2393 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2395 (__old_sem_post): New function.
2396 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2397 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2398 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2399 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2400 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2401 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2403 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2405 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2406 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2407 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2408 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2409 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2410 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2411 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2413 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2414 kernel-features.h and tcb-offsets.h.
2415 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2416 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2418 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2420 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2421 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2423 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2424 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2425 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2426 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2427 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2428 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2429 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2431 2007-08-14 Jakub Jelinek <jakub@redhat.com>
2433 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2434 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2435 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2436 lll_futex_timed_wait.
2438 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2439 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2440 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2441 __lll_robust_unlock, __lll_wait_tid): Likewise.
2443 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2445 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2447 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2448 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2449 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2450 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2451 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2452 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2453 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2454 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2456 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2457 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2458 process private. Switch DW_CFA_advance_loc1 and some
2459 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2460 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2461 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2462 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2463 process private. Switch DW_CFA_advance_loc{1,2} and some
2464 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2465 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2466 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2467 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2469 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2470 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2471 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2473 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2474 (__pthread_cond_broadcast): Compare %r8 instead of
2475 dep_mutex-cond_*(%rdi) with $-1.
2476 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2477 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2480 2007-08-13 Ulrich Drepper <drepper@redhat.com>
2482 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2484 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2486 * allocatestack.c: Include kernel-features.h.
2487 * pthread_create.c: Likewise.
2488 * pthread_mutex_init.c: Likewise.
2490 * pthread_cond_timedwait.c: Likewise.
2491 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2492 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2493 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2494 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2495 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2496 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2497 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2499 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2501 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2502 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2503 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2504 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2506 2007-08-12 Jakub Jelinek <jakub@redhat.com>
2508 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2509 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2510 byte elements. One of them is the new __shared element.
2511 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2512 adjust names of other padding elements.
2513 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2514 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2515 byte elements. One of them is the new __shared element.
2516 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2517 adjust names of other padding elements.
2518 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2519 Renamed __pad1 element to __shared, adjust names of other padding
2521 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2522 (pthread_rwlock_t): Likewise.
2523 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2526 2007-08-09 Anton Blanchard <anton@samba.org>
2528 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2530 2007-08-12 Ulrich Drepper <drepper@redhat.com>
2532 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2533 <kernel-features.h>.
2534 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2536 2007-08-11 Ulrich Drepper <drepper@redhat.com>
2538 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2539 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2540 dealing with robust mutexes.
2541 * pthread_mutex_timedlock.c: Likewise.
2542 * pthread_mutex_trylock.c: Likewise.
2543 * pthread_mutex_unlock.c: Likewise.
2544 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2546 2007-08-06 Jakub Jelinek <jakub@redhat.com>
2548 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2549 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2550 (PTHREAD_MUTEX_PSHARED): Define.
2551 * pthread_mutex_init.c (__pthread_mutex_init): Set
2552 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2554 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2555 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2556 as second argument to lll_lock.
2557 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2558 instead of its __data.__lock field.
2559 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2560 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2562 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2563 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2564 instead of mutex->__data.__kind directly, pass
2565 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2566 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2567 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2568 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2569 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2570 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2571 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2572 of mutex->__data.__kind directly.
2573 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2574 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2575 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2576 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2577 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2578 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2580 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2581 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2582 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2584 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2585 Take mutex as argument instead of its __data.__lock field, pass
2586 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2587 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2588 __data.__lock field.
2589 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2590 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2591 to lll_robust_cond_lock.
2592 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2593 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2594 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2595 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2596 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2597 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2599 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2600 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2602 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2603 pshared variable, pass it to lll_lock, lll_unlock,
2604 lll_futex_timedwait and lll_futex_wake.
2605 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2606 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2608 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2609 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2611 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2612 lll_futex_wake_unlock): Likewise.
2613 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2615 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2616 lll_futex_wake_unlock): Likewise.
2617 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2619 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2620 lll_futex_wake_unlock): Likewise.
2621 (lll_futex_wake): Fix a typo.
2622 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2623 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2624 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2625 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2626 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2627 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2628 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2629 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2630 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2631 (__pthread_cond_timedwait): Likewise.
2632 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2633 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2635 2007-08-05 Jakub Jelinek <jakub@redhat.com>
2637 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2638 Don't use CGOTSETUP and CGOTRESTORE macros.
2639 (CGOTSETUP, CGOTRESTORE): Remove.
2640 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2643 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2645 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2646 definitions for private futexes.
2647 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2648 kernel-features.h and lowlevellock.h. Use private futexes if
2650 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2651 (__lll_mutex_lock_wait): Rename to
2652 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2653 (__lll_mutex_timedlock_wait): Rename to ...
2654 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2655 Don't compile in for libc.so.
2656 (__lll_mutex_unlock_wake): Rename to ...
2657 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2658 (__lll_timedwait_tid): Use __NR_gettimeofday.
2659 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2660 the header from assembler. Renamed all lll_mutex_* resp.
2661 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2662 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2663 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2665 (__lll_lock_wait_private): Add prototype.
2666 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2667 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2668 __lll_unlock_wake): Likewise.
2669 (lll_lock): Add private argument. Call __lll_lock_wait_private
2670 if private is constant LLL_PRIVATE.
2671 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2672 lll_timedlock, lll_robust_timedlock): Add private argument.
2673 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2674 if private is constant LLL_PRIVATE.
2675 (lll_robust_unlock, lll_robust_dead): Add private argument.
2676 (lll_lock_t): Remove.
2677 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2678 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2679 lll_cond_wake, lll_cond_broadcast): Remove.
2680 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2681 kernel-features.h and lowlevellock.h.
2682 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2683 (LOAD_FUTEX_WAIT): Define.
2684 (__lll_robust_mutex_lock_wait): Rename to ...
2685 (__lll_robust_lock_wait): ... this. Add private argument.
2686 Use LOAD_FUTEX_WAIT macro.
2687 (__lll_robust_mutex_timedlock_wait): Rename to ...
2688 (__lll_robust_timedlock_wait): ... this. Add private argument.
2689 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2690 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2692 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2693 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2694 __lll_mutex_{lock,unlock}_*.
2695 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2696 lowlevellock.h and pthread-errnos.h.
2697 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2698 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2699 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2700 __lll_mutex_{lock,unlock}_*.
2701 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2702 lowlevellock.h and pthread-errnos.h.
2703 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2704 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2705 __lll_mutex_{lock,unlock}_*.
2706 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2708 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2709 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2710 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2711 (__condvar_tw_cleanup): Likewise.
2712 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2714 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2715 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2716 __lll_mutex_{lock,unlock}_*.
2717 ( __condvar_w_cleanup): Likewise.
2718 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2719 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2720 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2722 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2723 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2724 __lll_mutex_{lock,unlock}_*.
2725 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2727 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2728 FUTEX_PRIVATE_FLAG): Remove.
2729 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2730 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2731 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2733 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2734 FUTEX_PRIVATE_FLAG): Remove.
2735 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2736 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2737 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2739 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2740 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2741 __lll_mutex_{lock,unlock}_*.
2742 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2744 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2745 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2746 __lll_mutex_{lock,unlock}_*.
2747 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2748 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2749 (__new_sem_post): Use standard initial exec code sequences.
2750 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2752 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2753 FUTEX_PRIVATE_FLAG): Remove.
2754 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2755 exec code sequences.
2756 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2757 (__new_sem_trywait): Use standard initial exec code sequences.
2758 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2759 (__new_sem_wait): Use standard initial exec code sequences.
2761 2007-07-31 Anton Blanchard <anton@samba.org>
2763 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2764 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2765 atomic_full_barrier.
2767 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2769 * allocatestack.c (stack_cache_lock): Change type to int.
2770 (get_cached_stack, allocate_stack, __deallocate_stack,
2771 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2772 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2773 as second argument to lll_lock and lll_unlock macros on
2775 * pthread_create.c (__find_in_stack_list): Likewise.
2776 (start_thread): Similarly with pd->lock. Use lll_robust_dead
2777 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2779 * descr.h (struct pthread): Change lock and setxid_futex field
2781 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2782 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2783 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2784 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2786 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2787 * pthread_cond_init.c (__pthread_cond_init): Likewise.
2788 * pthreadP.h (__attr_list_lock): Change type to int.
2789 * pthread_attr_init.c (__attr_list_lock): Likewise.
2790 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2791 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2793 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2794 also for lll_futex_{wake,wait}.
2795 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2797 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2798 LLL_SHARED as second argument to lll_{,un}lock.
2799 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2800 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2801 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2802 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2804 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2805 as second argument to lll_{,un}lock macros on pd->lock.
2806 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2807 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2808 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2809 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2811 * sysdeps/pthread/createthread.c (do_clone, create_thread):
2813 * pthread_once.c (once_lock): Change type to int.
2814 (__pthread_once): Pass LLL_PRIVATE as second argument to
2815 lll_{,un}lock macros on once_lock.
2816 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2817 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2818 rwlock->__data.__shared as second argument to them and similarly
2820 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2822 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2824 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2825 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2826 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2827 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2828 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2829 to lll_{,un}lock macros on __sem_mappings_lock.
2830 * sem_open.c (check_add_mapping): Likewise.
2831 (__sem_mappings_lock): Change type to int.
2832 * semaphoreP.h (__sem_mappings_lock): Likewise.
2833 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2834 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2835 instead of lll_*mutex_*, pass LLL_SHARED as last
2837 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2838 pass LLL_SHARED as last argument.
2839 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2840 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2841 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2842 pass LLL_SHARED as last argument.
2843 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2844 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2845 LLL_SHARED as last argument.
2846 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2847 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2849 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2850 __libc_lock_lock_recursive, __libc_lock_unlock,
2851 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2852 argument to lll_{,un}lock.
2853 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2854 _IO_lock_unlock): Likewise.
2855 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2857 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2858 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2860 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2861 free_mem): Likewise.
2862 (__fork_lock): Change type to int.
2863 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2864 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2865 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2867 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2868 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2869 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2871 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2872 pass it through to lll_futex_*wait, only compile in when
2874 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2875 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2876 argument and pass it through to lll_futex_*wait.
2877 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2878 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2879 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2880 inline functions to __lll_* resp. __lll_robust_*.
2881 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2882 (lll_mutex_dead): Add private argument.
2883 (__lll_lock_wait_private): New prototype.
2884 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2885 __lll_robust_lock_timedwait): Add private argument to prototypes.
2886 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2887 call __lll_lock_wait_private, otherwise pass private to
2889 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2890 __lll_robust_timedlock): Add private argument, pass it to
2891 __lll_*wait functions.
2892 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2893 call __lll_unlock_wake_private, otherwise pass private to
2895 (__lll_robust_unlock): Add private argument, pass it to
2896 __lll_robust_unlock_wake.
2897 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2898 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2899 argument, pass it through to __lll_* inline function.
2900 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2901 (lll_lock_t): Remove.
2902 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2903 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2904 lll_cond_wake, lll_cond_broadcast): Remove.
2905 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2906 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2907 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2908 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2909 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2910 the header from assembler. Renamed all lll_mutex_* resp.
2911 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2912 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2913 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2914 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2915 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2916 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2917 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2919 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2920 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2921 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2922 (lll_trylock): Likewise, use __lll_trylock_asm, pass
2923 MULTIPLE_THREADS_OFFSET as another asm operand.
2924 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2925 MULTIPLE_THREADS_OFFSET as last asm operand, call
2926 __lll_lock_wait_private if private is constant LLL_PRIVATE,
2927 otherwise pass private as another argument to __lll_lock_wait.
2928 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2929 lll_timedlock, lll_robust_timedlock): Add private argument, pass
2930 private as another argument to __lll_*lock_wait call.
2931 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2932 MULTIPLE_THREADS_OFFSET as another asm operand, call
2933 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2934 otherwise pass private as another argument to __lll_unlock_wake.
2935 (lll_robust_unlock): Add private argument, pass private as another
2936 argument to __lll_unlock_wake.
2937 (lll_robust_dead): Add private argument, use __lll_private_flag
2939 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2940 LLL_MUTEX_LOCK_INITIALIZER.
2941 (lll_lock_t): Remove.
2942 (LLL_LOCK_INITIALIZER_WAITERS): Define.
2943 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2944 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2945 lll_cond_wake, lll_cond_broadcast): Remove.
2946 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2947 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2948 2007-05-2{3,9} changes.
2949 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2950 kernel-features.h and lowlevellock.h.
2951 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2952 (LOAD_FUTEX_WAIT): Rewritten.
2953 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2955 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2956 (__lll_mutex_lock_wait): Rename to ...
2957 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
2958 %ecx, %ecx is now private argument. Don't compile in for libc.so.
2959 (__lll_mutex_timedlock_wait): Rename to ...
2960 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
2961 contains private argument. Don't compile in for libc.so.
2962 (__lll_mutex_unlock_wake): Rename to ...
2963 (__lll_unlock_wake): ... this. %ecx contains private argument.
2964 Don't compile in for libc.so.
2965 (__lll_timedwait_tid): Use __NR_gettimeofday.
2966 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2967 kernel-features.h and lowlevellock.h.
2968 (LOAD_FUTEX_WAIT): Define.
2969 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2971 (__lll_robust_mutex_lock_wait): Rename to ...
2972 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
2973 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
2975 (__lll_robust_mutex_timedlock_wait): Rename to ...
2976 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
2977 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2978 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2980 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2981 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2982 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2983 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2984 to __lll_lock_wait in %edx.
2985 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2986 Include lowlevellock.h and pthread-errnos.h.
2987 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2988 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2989 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2990 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2991 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2993 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2994 Include lowlevellock.h and pthread-errnos.h.
2995 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2996 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2997 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2998 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2999 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3001 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3002 Include lowlevellock.h.
3003 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3005 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3006 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3007 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3008 __lll_unlock_wake. Use __NR_gettimeofday.
3009 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3010 Include lowlevellock.h.
3011 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3012 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3013 to __lll_*, pass cond_lock address in %edx rather than %ecx to
3014 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3015 and __lll_unlock_wake.
3016 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3017 Include lowlevellock.h.
3018 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3019 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3020 MUTEX(%ebx) address in %edx rather than %ecx to
3021 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3022 and __lll_unlock_wake. Move return value from %ecx to %edx
3024 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3025 Include lowlevellock.h.
3026 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3028 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3029 MUTEX(%ebp) address in %edx rather than %ecx to
3030 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3031 and __lll_unlock_wake. Move return value from %ecx to %edx
3032 register. Use __NR_gettimeofday.
3033 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3034 Include lowlevellock.h.
3035 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3037 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3038 MUTEX(%ebp) address in %edx rather than %ecx to
3039 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3040 and __lll_unlock_wake. Move return value from %ecx to %edx
3041 register. Use __NR_gettimeofday.
3042 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3043 Include lowlevellock.h.
3044 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3045 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3046 MUTEX(%edi) address in %edx rather than %ecx to
3047 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3048 and __lll_unlock_wake.
3049 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3050 Include lowlevellock.h.
3051 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3052 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3053 MUTEX(%ebx) address in %edx rather than %ecx to
3054 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3055 and __lll_unlock_wake. Move return value from %ecx to %edx
3057 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3059 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3061 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3062 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3063 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3065 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3066 (sem_timedwait): Use __NR_gettimeofday.
3067 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3069 (LOCK): Don't define.
3070 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3072 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3073 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3075 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3076 2007-05-2{3,9} changes.
3077 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3078 kernel-features.h and lowlevellock.h.
3079 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3080 (LOAD_FUTEX_WAIT): Rewritten.
3081 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3082 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3083 (__lll_mutex_lock_wait): Rename to ...
3084 (__lll_lock_wait): ... this. %esi is now private argument.
3085 Don't compile in for libc.so.
3086 (__lll_mutex_timedlock_wait): Rename to ...
3087 (__lll_timedlock_wait): ... this. %esi contains private argument.
3088 Don't compile in for libc.so.
3089 (__lll_mutex_unlock_wake): Rename to ...
3090 (__lll_unlock_wake): ... this. %esi contains private argument.
3091 Don't compile in for libc.so.
3092 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3093 kernel-features.h and lowlevellock.h.
3094 (LOAD_FUTEX_WAIT): Define.
3095 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3096 (__lll_robust_mutex_lock_wait): Rename to ...
3097 (__lll_robust_lock_wait): ... this. %esi argument contains private.
3098 Use LOAD_FUTEX_WAIT macro.
3099 (__lll_robust_mutex_timedlock_wait): Rename to ...
3100 (__lll_robust_timedlock_wait): ... this. %esi argument contains
3101 private, use LOAD_FUTEX_WAIT macro.
3102 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3104 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3105 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3106 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3107 __lll_lock_wait and __lll_unlock_wake.
3108 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3109 Include lowlevellock.h and pthread-errnos.h.
3110 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3111 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3112 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3113 pass LLL_SHARED in %esi to both __lll_lock_wait and
3115 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3116 Include lowlevellock.h and pthread-errnos.h.
3117 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3118 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3119 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3120 pass LLL_SHARED in %esi to both __lll_lock_wait and
3122 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3123 Include lowlevellock.h.
3124 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3125 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3126 pass LLL_SHARED in %esi to both __lll_lock_wait and
3128 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3129 Include lowlevellock.h.
3130 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3131 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3132 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3133 and __lll_unlock_wake.
3134 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3135 Include lowlevellock.h.
3136 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3138 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3139 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3140 and __lll_unlock_wake.
3141 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3142 Include lowlevellock.h.
3143 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3145 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3146 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3147 and __lll_unlock_wake.
3148 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3149 Include lowlevellock.h.
3150 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3152 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3153 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3154 and __lll_unlock_wake.
3155 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3156 Include lowlevellock.h.
3157 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3159 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3160 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3161 and __lll_unlock_wake.
3162 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3163 Include lowlevellock.h.
3164 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3166 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3167 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3168 and __lll_unlock_wake.
3169 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3171 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3173 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3174 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3175 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3177 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3178 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3180 (LOCK): Don't define.
3181 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3183 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3184 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3185 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3186 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3187 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3188 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3189 (__lll_lock_wait_private): New function.
3190 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3191 it to lll_futex_*wait. Don't compile in for libc.so.
3192 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3194 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3195 (struct sparc_pthread_barrier): Remove.
3196 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3197 struct sparc_pthread_barrier. Pass
3198 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3199 and lll_futex_wait macros.
3200 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3202 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3203 Include sparc pthread_barrier_wait.c instead of generic one.
3205 2007-07-30 Jakub Jelinek <jakub@redhat.com>
3207 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3209 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3210 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3212 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3213 (pthread_rwlock_timedwrlock): Likewise.
3214 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3215 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3217 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3219 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3221 2007-07-26 Jakub Jelinek <jakub@redhat.com>
3223 * tst-locale2.c (useless): Add return statement.
3225 2007-07-24 Jakub Jelinek <jakub@redhat.com>
3227 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3228 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3229 * pthread_create.c (start_thread): Likewise.
3230 * init.c (sighandler_setxid): Likewise.
3231 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3232 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3233 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3234 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3235 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3236 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3237 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3238 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3239 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3241 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3243 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3245 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3246 __rtld_notify): Likewise.
3247 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3248 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3249 __pthread_once): Likewise.
3250 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3251 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3252 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3253 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3254 (lll_futex_wait): Add private argument, define as wrapper around
3255 lll_futex_timed_wait.
3256 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3257 use __lll_private_flag macro.
3258 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3259 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3260 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3261 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3262 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3263 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3264 (lll_futex_wait): Add private argument, define as wrapper around
3265 lll_futex_timed_wait.
3266 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3267 use __lll_private_flag macro.
3268 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3269 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3270 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3272 (lll_futex_timed_wait, lll_futex_wake): Use it.
3273 (lll_private_futex_wait, lll_private_futex_timed_wait,
3274 lll_private_futex_wake): Removed.
3275 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3276 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3277 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3278 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3279 (lll_futex_wait): Add private argument, define as wrapper around
3280 lll_futex_timed_wait.
3281 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3282 use __lll_private_flag macro.
3283 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3284 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3286 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3287 (lll_private_futex_wait, lll_private_futex_timed_wait,
3288 lll_private_futex_wake): Removed.
3289 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3290 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3291 (lll_private_futex_wait, lll_private_futex_timed_wait,
3292 lll_private_futex_wake): Removed.
3293 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3294 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3295 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3296 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3297 (lll_futex_wait): Add private argument, define as wrapper around
3298 lll_futex_timed_wait.
3299 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3300 use __lll_private_flag macro.
3301 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3302 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3304 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3306 (lll_futex_timed_wait, lll_futex_wake): Use it.
3307 (lll_private_futex_wait, lll_private_futex_timed_wait,
3308 lll_private_futex_wake): Removed.
3310 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3312 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3313 of the structure for sparc32.
3315 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3317 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3319 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3321 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3322 code used when private futexes are assumed.
3323 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3326 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3328 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3329 (__lll_private_flag): Define.
3330 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3331 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3333 (lll_private_futex_wait, lll_private_futex_timedwait,
3334 lll_private_futex_wake): Define as wrapper around non-_private
3336 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3337 (__lll_private_flag): Define.
3338 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3339 (lll_private_futex_wait, lll_private_futex_timedwait,
3340 lll_private_futex_wake): Define as wrapper around non-_private
3343 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3345 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3346 parameter to lll_futex_wait call.
3347 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3349 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3350 Replace lll_futex_wait with lll_private_futex_wait.
3351 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3352 Add LLL_SHARED parameter to lll_futex_wake().
3354 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3355 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3356 lll_private_futex_wake.
3357 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3358 bit from private parm before syscall.
3359 (lll_futex_timed_wait): Likewise.
3360 (lll_futex_wake): Likewise.
3361 (lll_futex_wake_unlock): Likewise.
3362 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3363 (lll_robust_mutex_unlock): Likewise.
3364 (lll_mutex_unlock_force): Likewise.
3365 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3367 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3369 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3370 compilation when unconditionally using private futexes.
3371 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3372 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3374 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3375 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3377 2007-07-17 Jakub Jelinek <jakub@redhat.com>
3379 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3382 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3384 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3387 2007-05-16 Roland McGrath <roland@redhat.com>
3389 * init.c (__nptl_initial_report_events): New variable.
3390 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3393 2007-06-22 Jakub Jelinek <jakub@redhat.com>
3395 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3396 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3398 2007-06-19 Ulrich Drepper <drepper@redhat.com>
3400 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3403 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3405 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3406 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3407 * pthread_mutex_timedlock.c: Likewise.
3408 * pthread_mutex_trylock.c: Likewise.
3409 * pthread_mutex_unlock.c: Likewise.
3411 2007-06-17 Andreas Schwab <schwab@suse.de>
3413 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3416 2007-06-17 Ulrich Drepper <drepper@redhat.com>
3418 * allocatestack.c (allocate_stack): Make code compile if
3419 __ASSUME_PRIVATE_FUTEX is set.
3421 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3423 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3424 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3425 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3426 (__pthread_rwlock_wrlock): Likewise.
3427 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3428 (pthread_rwlock_timedrdlock): Likewise.
3429 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3430 (pthread_rwlock_timedwrlock): Likewise.
3431 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3432 (__pthread_rwlock_unlock): Likewise.
3434 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3436 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3437 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3438 Split __flags into __flags, __shared, __pad1 and __pad2.
3439 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3440 futexes if they are available.
3441 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3442 in libc-lowlevellock.S allow using private futexes.
3443 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3444 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3445 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3446 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3447 lll_private_futex_timed_wait and lll_private_futex_wake.
3448 (lll_robust_mutex_unlock): Fix typo.
3449 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3450 field in futex command setup.
3451 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3452 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3453 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3454 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3455 if they are available. Remove clear_once_control.
3456 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3457 futexes if they are available.
3458 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3459 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3460 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3461 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3462 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3463 Wake only when there are waiters.
3464 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3465 support. Indicate that there are waiters. Remove unnecessary
3466 extra cancellation test.
3467 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3468 left-over duplication of __sem_wait_cleanup.
3470 2007-06-07 Ulrich Drepper <drepper@redhat.com>
3472 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3473 parameter to lll_futex_wait, lll_futex_timed_wait, and
3474 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3475 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3476 lll_private_futex_wake.
3477 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3478 * allocatestack.c: Adjust use of lll_futex_* macros.
3480 * lowlevellock.h: Likewise.
3481 * pthread_barrier_wait.c: Likewise.
3482 * pthread_cond_broadcast.c: Likewise.
3483 * pthread_cond_destroy.c: Likewise.
3484 * pthread_cond_signal.c: Likewise.
3485 * pthread_cond_timedwait.c: Likewise.
3486 * pthread_cond_wait.c: Likewise.
3487 * pthread_create.c: Likewise.
3488 * pthread_mutex_lock.c: Likewise.
3489 * pthread_mutex_setprioceiling.c: Likewise.
3490 * pthread_mutex_timedlock.c: Likewise.
3491 * pthread_mutex_unlock.c: Likewise.
3492 * pthread_rwlock_timedrdlock.c: Likewise.
3493 * pthread_rwlock_timedwrlock.c: Likewise.
3494 * pthread_rwlock_unlock.c: Likewise.
3495 * sysdeps/alpha/tls.h: Likewise.
3496 * sysdeps/i386/tls.h: Likewise.
3497 * sysdeps/ia64/tls.h: Likewise.
3498 * sysdeps/powerpc/tls.h: Likewise.
3499 * sysdeps/pthread/aio_misc.h: Likewise.
3500 * sysdeps/pthread/gai_misc.h: Likewise.
3501 * sysdeps/s390/tls.h: Likewise.
3502 * sysdeps/sh/tls.h: Likewise.
3503 * sysdeps/sparc/tls.h: Likewise.
3504 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3505 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3506 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3507 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3508 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3509 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3510 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3511 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3512 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3513 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3515 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3516 * sysdeps/x86_64/tls.h: Likewise.
3518 2007-05-29 Ulrich Drepper <drepper@redhat.com>
3520 * pthread_getattr_np.c: No need to install a cancellation handler,
3521 this is no cancellation point.
3522 * pthread_getschedparam.c: Likewise.
3523 * pthread_setschedparam.c: Likewise.
3524 * pthread_setschedprio.c: Likewise.
3525 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3527 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3528 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3529 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3530 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3531 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3532 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3533 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3534 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3535 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3536 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3537 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3538 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3540 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3541 whether there are more than one thread makes no sense here since
3542 we only call the slow path if the locks are taken.
3543 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3545 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3546 COND_NWAITERS_SHIFT.
3547 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3549 * pthread_cond_init.c: Likewise.
3550 * pthread_cond_timedwait.c: Likewise.
3551 * pthread_cond_wait.c: Likewise.
3552 * pthread_condattr_getclock.c: Likewise.
3553 * pthread_condattr_setclock.c: Likewise.
3554 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3555 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3556 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3557 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3558 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3560 2007-05-28 Jakub Jelinek <jakub@redhat.com>
3562 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3565 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3567 (THREAD_GSCOPE_GET_FLAG): Remove.
3568 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3569 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3571 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3572 (THREAD_GSCOPE_GET_FLAG): Remove.
3573 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3574 instead of THREAD_GSCOPE_GET_FLAG.
3575 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3577 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3578 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3579 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3580 THREAD_GSCOPE_WAIT): Define.
3581 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3582 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3583 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3584 THREAD_GSCOPE_WAIT): Define.
3585 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3586 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3587 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3588 THREAD_GSCOPE_WAIT): Define.
3589 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3590 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3591 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3592 THREAD_GSCOPE_WAIT): Define.
3594 2007-05-24 Richard Henderson <rth@redhat.com>
3596 * descr.h (struct pthread): Add header.gscope_flag.
3597 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3598 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3599 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3600 THREAD_GSCOPE_WAIT): Define.
3602 2007-05-27 Ulrich Drepper <drepper@redhat.com>
3604 * init.c: Make it compile with older kernel headers.
3606 * tst-initializers1.c: Show through exit code which test failed.
3608 * pthread_rwlock_init.c: Also initialize __shared field.
3609 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3610 element in rwlock structure into four byte elements. One of them is
3611 the new __shared element.
3612 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3614 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3615 __shared, adjust names of other padding elements.
3616 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3617 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3618 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3619 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3621 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3622 futex to use private operations if possible.
3623 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3625 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3627 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3628 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3629 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3630 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3632 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3634 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3635 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3637 2007-05-26 Ulrich Drepper <drepper@redhat.com>
3639 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3640 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3641 * pthread_rwlock_timedrdlock.c: Likewise.
3642 * pthread_rwlock_tryrdlock.c: Likewise.
3644 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3647 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3648 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3649 duplication of __sem_wait_cleanup.
3651 * allocatestack.c: Revert last change.
3653 * sysdeps/i386/tls.h: Likewise.
3654 * sysdeps/x86_64/tls.h: Likewise.
3655 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3657 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3659 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3661 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3662 * pthread_barrier_init.c: Set private flag if pshared and private
3663 futexes are supported.
3664 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3665 private field in futex command setup.
3666 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3668 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3670 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3672 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3673 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3674 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3675 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3676 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3678 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3679 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3680 fields in the structure.
3681 (__old_sem_init): New function.
3682 * sem_open.c: Initialize all fields of the structure.
3683 * sem_getvalue.c: Adjust for renamed element.
3684 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3685 (gen-as-const-headers): Add structsem.sym.
3686 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3687 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3688 struct new_sem. Add struct old_sem.
3689 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3690 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3691 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3692 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3693 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3694 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3695 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3696 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3697 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3698 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3699 * tst-sem10.c: New file.
3700 * tst-sem11.c: New file.
3701 * tst-sem12.c: New file.
3702 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3705 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3706 Jakub Jelinek <jakub@redhat.com>
3708 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3709 Move __pthread_enable_asynccancel right before futex syscall.
3710 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3713 2007-05-24 Jakub Jelinek <jakub@redhat.com>
3715 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3716 THREAD_COPY_PRIVATE_FUTEX): Define.
3717 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3718 THREAD_COPY_PRIVATE_FUTEX): Define.
3719 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3720 * init.c (__pthread_initialize_minimal_internal): Use
3721 THREAD_SET_PRIVATE_FUTEX.
3723 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3724 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3725 THREAD_GSCOPE_FLAG_WAIT): Define.
3726 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3727 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3728 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3730 (THREAD_GSCOPE_GET_FLAG): Define.
3731 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3732 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3733 instead of ->header.gscope_flag directly.
3735 2007-05-23 Ulrich Drepper <drepper@redhat.com>
3737 * init.c (__pthread_initialize_minimal_internal): Check whether
3738 private futexes are available.
3739 * allocatestack.c (allocate_stack): Copy private_futex field from
3740 current thread into the new stack.
3741 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3742 futexes if they are available.
3743 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3744 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3745 in libc-lowlevellock.S allow using private futexes.
3746 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3747 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3749 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3750 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3751 if they are available.
3752 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3753 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3754 * sysdeps/i386/tcb-offsets.sym: Likewise.
3755 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3756 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3758 2007-05-21 Ulrich Drepper <drepper@redhat.com>
3760 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3761 Remove ptr_wait_lookup_done again.
3762 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3763 (__pthread_initialize_minimal_internal): Initialize
3764 _dl_wait_lookup_done pointer in _rtld_global directly.
3765 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3766 Remove code to code _dl_wait_lookup_done.
3767 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3770 2007-05-21 Jakub Jelinek <jakub@redhat.com>
3772 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3773 pthread_mutex_init failed with ENOTSUP.
3775 2007-05-19 Ulrich Drepper <drepper@redhat.com>
3777 * allocatestack.c (__wait_lookup_done): New function.
3778 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3779 Add ptr_wait_lookup_done.
3780 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3781 * pthreadP.h: Declare __wait_lookup_done.
3782 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3783 Define macros to implement reference handling of global scope.
3784 * sysdeps/x86_64/tls.h: Likewise.
3785 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3786 Initialize GL(dl_wait_lookup_done).
3788 2007-05-17 Ulrich Drepper <drepper@redhat.com>
3791 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3793 * pthread_mutex_timedlock.c: Likewise.
3794 * pthread_mutex_trylock.c: Likewise.
3795 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3797 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3798 * tst-robust9.c: New file.
3799 * tst-robustpi9.c: New file.
3801 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3802 unnecessary extra cancellation test.
3804 2007-05-14 Ulrich Drepper <drepper@redhat.com>
3806 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3807 extra cancellation test.
3808 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3810 2007-05-10 Ulrich Drepper <drepper@redhat.com>
3812 * descr.h (struct pthread): Rearrange members to fill hole in
3815 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3816 (__pthread_setaffinity_new): If syscall was successful and
3817 RESET_VGETCPU_CACHE is defined, use it before returning.
3818 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3820 2007-05-10 Jakub Jelinek <jakub@redhat.com>
3823 * tst-align2.c: Include stackinfo.h.
3824 * tst-getpid1.c: Likewise.
3826 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
3829 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3830 * tst-getpid1.c (do_test): Likewise.
3833 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3834 (allocate_stack): Likewise.
3836 2007-05-07 Ulrich Drepper <drepper@redhat.com>
3838 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3839 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3840 (__lll_robust_timedlock_wait): Likewise.
3841 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3843 2007-05-06 Mike Frysinger <vapier@gentoo.org>
3846 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3847 * tst-cancel4.c (tf_fdatasync): New test.
3849 2007-04-27 Ulrich Drepper <drepper@redhat.com>
3852 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3853 check mutexes like normal mutexes.
3856 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3857 Initialize the whole sigevent structure to appease valgrind.
3859 2007-04-25 Ulrich Drepper <drepper@redhat.com>
3861 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3862 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3864 2007-04-06 Ulrich Drepper <drepper@redhat.com>
3866 * tst-locale1.c: Avoid warnings.
3867 * tst-locale2.c: Likewise.
3869 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3871 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3872 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3874 2007-03-16 Jakub Jelinek <jakub@redhat.com>
3876 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3877 __extern_always_inline where appropriate.
3878 * sysdeps/pthread/pthread.h: Likewise.
3880 2007-03-13 Richard Henderson <rth@redhat.com>
3882 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3883 separate cfi regions for the two subsections.
3885 2007-02-25 Ulrich Drepper <drepper@redhat.com>
3887 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3888 new thread, don't just decrement it.
3889 Patch by Suzuki K P <suzuki@in.ibm.com>.
3891 2007-02-21 Ulrich Drepper <drepper@redhat.com>
3893 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3894 PTHFCT_CALL definition.
3896 2007-02-18 Ulrich Drepper <drepper@redhat.com>
3898 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3899 available, don't use it.
3901 2007-02-09 Jakub Jelinek <jakub@redhat.com>
3903 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3904 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3905 call into the kernel to delay.
3907 2007-01-18 Ulrich Drepper <drepper@redhat.com>
3909 * tst-initializers1.c: We want to test the initializers as seen
3910 outside of libc, so undefined _LIBC.
3912 * pthread_join.c (cleanup): Avoid warning.
3914 2007-01-17 Ulrich Drepper <drepper@redhat.com>
3916 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3917 (__lll_timedwait_tid): Add unwind info.
3919 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3920 function table, mangle the pointers.
3921 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3922 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3923 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3924 demangle pointers before use.
3925 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3927 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3928 * sysdeps/pthread/setxid.h: Likewise.
3930 2007-01-12 Ulrich Drepper <drepper@redhat.com>
3932 * tst-rwlock7.c: Show some more information in case of correct
3935 2007-01-11 Ulrich Drepper <drepper@redhat.com>
3937 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3938 (lll_futex_timed_wait): Undo part of last change, don't negate
3941 2007-01-10 Ulrich Drepper <drepper@redhat.com>
3943 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
3944 FUTEX_CMP_REQUEUE and lll_futex_requeue.
3946 2006-12-28 David S. Miller <davem@davemloft.net>
3948 * shlib-versions: Fix sparc64 linux target specification.
3950 2007-01-10 Jakub Jelinek <jakub@redhat.com>
3952 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3953 Adjust include path for pthread_barrier_wait.c move.
3955 2006-12-21 Jakub Jelinek <jakub@redhat.com>
3957 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3958 tid isn't reread from pd->tid in between ESRCH test and the syscall.
3960 2006-12-06 Jakub Jelinek <jakub@redhat.com>
3962 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3963 6 argument cancellable syscalls.
3964 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3965 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3966 6 argument cancellable syscalls.
3967 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3969 2006-12-09 Ulrich Drepper <drepper@redhat.com>
3971 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3972 (__rtld_mrlock_initialize): Add missing closing parenthesis.
3974 2006-10-30 Jakub Jelinek <jakub@redhat.com>
3976 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3977 __sync_lock_release instead of __sync_lock_release_si.
3979 2006-10-29 Jakub Jelinek <jakub@redhat.com>
3981 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3983 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3984 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3985 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3986 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3987 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3988 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3989 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3990 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3991 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3992 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3993 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3995 2006-10-27 Ulrich Drepper <drepper@redhat.com>
3997 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3998 * pthread_barrier_wait.c: ...here.
3999 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4000 * pthread_cond_broadcast.c: ...here.
4001 * sysdeps/pthread/pthread_cond_signal.c: Move to...
4002 * pthread_cond_signal.c: ...here.
4003 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4004 * pthread_cond_timedwait.c: ...here.
4005 * sysdeps/pthread/pthread_cond_wait.c: Move to...
4006 * pthread_cond_wait.c: ...here.
4007 * sysdeps/pthread/pthread_once.c: Move to...
4008 * pthread_once.c: ...here.
4009 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4010 * pthread_rwlock_rdlock.c: ...here.
4011 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4012 * pthread_rwlock_timedrdlock.c: ...here.
4013 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4014 * pthread_rwlock_timedwrlock.c: ...here.
4015 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4016 * pthread_rwlock_unlock.c: ...here.
4017 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4018 * pthread_rwlock_wrlock.c: ...here.
4019 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4020 * pthread_spin_destroy.c: ...here.
4021 * sysdeps/pthread/pthread_spin_init.c: Move to...
4022 * pthread_spin_init.c: ...here.
4023 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4024 * pthread_spin_unlock.c: ...here.
4025 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4026 * pthread_getcpuclockid.c: ...here.
4028 * init.c: USE_TLS support is now always enabled.
4029 * tst-tls5.h: Likewise.
4030 * sysdeps/alpha/tls.h: Likewise.
4031 * sysdeps/i386/tls.h: Likewise.
4032 * sysdeps/ia64/tls.h: Likewise.
4033 * sysdeps/powerpc/tls.h: Likewise.
4034 * sysdeps/s390/tls.h: Likewise.
4035 * sysdeps/sh/tls.h: Likewise.
4036 * sysdeps/sparc/tls.h: Likewise.
4037 * sysdeps/x86_64/tls.h: Likewise.
4039 2006-10-27 Jakub Jelinek <jakub@redhat.com>
4041 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4042 __rtld_mrlock_change): Update oldval if atomic compare and exchange
4045 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4046 Define to THREAD_SELF->header.multiple_threads.
4047 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4049 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4051 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4052 (SINGLE_THREAD_P): Likewise.
4053 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4054 (SINGLE_THREAD_P): Likewise.
4055 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4056 (SINGLE_THREAD_P): Likewise.
4057 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4058 (SINGLE_THREAD_P): Likewise.
4059 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4061 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4062 (SINGLE_THREAD_P): Likewise.
4063 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4064 (SINGLE_THREAD_P): Likewise.
4065 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4068 2006-10-26 Jakub Jelinek <jakub@redhat.com>
4070 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4071 by default rather than 2_3_3.
4073 2006-10-17 Jakub Jelinek <jakub@redhat.com>
4075 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4076 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4077 atomic_* instead of catomic_* macros.
4079 2006-10-12 Ulrich Drepper <drepper@redhat.com>
4082 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4083 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4084 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4085 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4086 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4087 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4088 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4089 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4090 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4091 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4092 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4093 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4094 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4096 2006-10-11 Ulrich Drepper <drepper@redhat.com>
4098 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4099 cancelable syscalls with six parameters.
4101 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4102 operations instead of atomic_*.
4104 2006-10-09 Ulrich Drepper <drepper@redhat.com>
4106 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4108 2006-10-07 Ulrich Drepper <drepper@redhat.com>
4110 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4111 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4112 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4114 * pthread_attr_setstack.c: Allow overwriting the version number of the
4116 * pthread_attr_setstacksize.c: Likewise.
4117 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4119 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4120 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4122 2006-09-24 Ulrich Drepper <drepper@redhat.com>
4125 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4126 Patch by Petr Baudis.
4128 2006-09-18 Jakub Jelinek <jakub@redhat.com>
4130 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4132 * tst-cancel2.c (tf): Loop as long as something was written.
4134 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4136 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4137 mutexes wake all mutexes.
4138 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4139 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4140 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4142 2006-09-12 Ulrich Drepper <drepper@redhat.com>
4144 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4145 to guarantee the thread is always canceled.
4147 2006-09-08 Jakub Jelinek <jakub@redhat.com>
4149 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4151 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4152 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4153 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4154 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4155 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4157 2006-09-08 Ulrich Drepper <drepper@redhat.com>
4160 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4161 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4162 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4163 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4164 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4165 * Makefile (tests): Add tst-cond22.
4166 * tst-cond22.c: New file.
4168 2006-09-05 Ulrich Drepper <drepper@redhat.com>
4171 * descr.h (struct pthread): Add parent_cancelhandling.
4172 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4173 cancelhandling value to child.
4174 * pthread_create.c (start_thread): If parent thread was canceled
4175 reset the SIGCANCEL mask.
4176 * Makefile (tests): Add tst-cancel25.
4177 * tst-cancel25.c: New file.
4179 2006-09-05 Jakub Jelinek <jakub@redhat.com>
4180 Ulrich Drepper <drepper@redhat.com>
4182 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4183 counterp if it is already zero.
4184 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4186 2006-03-04 Jakub Jelinek <jakub@redhat.com>
4187 Roland McGrath <roland@redhat.com>
4189 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4190 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4191 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4192 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4193 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4194 lll_robust_mutex_timedlock, lll_mutex_unlock,
4195 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4196 Add _L_*_ symbols around the subsection.
4197 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4198 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4200 2006-03-03 Jakub Jelinek <jakub@redhat.com>
4201 Roland McGrath <roland@redhat.com>
4203 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4204 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4205 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4206 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4207 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4208 lll_robust_mutex_timedlock, lll_mutex_unlock,
4209 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4210 Add _L_*_ symbols around the subsection.
4211 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4212 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4214 2006-08-31 Ulrich Drepper <drepper@redhat.com>
4216 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4217 change because it can disturb too much existing code. If real hard
4218 reader preference is needed we'll introduce another type.
4219 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4220 (pthread_rwlock_timedwrlock): Likewise.
4221 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4224 2006-08-30 Ulrich Drepper <drepper@redhat.com>
4226 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4228 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4229 (pthread_rwlock_timedwrlock): Likewise.
4230 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4233 2006-08-25 Jakub Jelinek <jakub@redhat.com>
4235 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4236 Only define ifdef SHARED.
4238 2006-08-23 Ulrich Drepper <drepper@redhat.com>
4240 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4241 (free_stacks): ...here.
4242 (__free_stack_cache): New function.
4243 * pthreadP.h: Declare __free_stack_cache.
4244 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4246 * init.c (pthread_functions): Initialize ptr_freeres.
4247 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4248 New freeres function.
4250 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4253 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4255 2006-08-20 Ulrich Drepper <drepper@redhat.com>
4257 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4258 _XOPEN_REALTIME_THREADS.
4260 2006-08-15 Jakub Jelinek <jakub@redhat.com>
4262 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4263 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4264 HAVE_CLOCK_GETTIME_VSYSCALL.
4265 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4267 2006-08-14 Jakub Jelinek <jakub@redhat.com>
4269 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4270 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4271 * descr.h (struct priority_protection_data): New type.
4272 (struct pthread): Add tpp field.
4273 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4274 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4275 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4276 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4278 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4279 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4280 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4281 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4283 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4285 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4286 * pthread_mutexattr_getprioceiling.c
4287 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4288 in the SCHED_FIFO priority range.
4289 * pthread_mutexattr_setprioceiling.c
4290 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4291 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4292 if mutex is not TPP. Ceiling is now in __data.__lock.
4293 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4294 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4295 is now in __data.__lock. Add locking.
4296 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4297 * Makefile (libpthread-routines): Add tpp.
4298 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4299 * tst-tpp.h: New file.
4300 * tst-mutexpp1.c: New file.
4301 * tst-mutexpp6.c: New file.
4302 * tst-mutexpp10.c: New file.
4303 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4304 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4306 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4309 * pthread_join.c (pthread_join): Account for self being canceled
4310 when checking for deadlocks.
4311 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4312 (tf1): Don't print anything after pthread_join returns, this would be
4313 another cancellation point.
4315 * tst-join6.c: New file.
4316 * Makefile (tests): Add tst-join6.
4318 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4321 * pthread_setspecific.c (__pthread_setspecific): Check
4322 out-of-range index before checking for unused key.
4324 * sysdeps/pthread/gai_misc.h: New file.
4326 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4328 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4329 file. Don't use sysctl.
4330 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4331 overwrite the file if this is likely not true.
4333 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4335 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4336 * Makefile (tests): Add tst-getpid3.
4337 * tst-getpid3.c: New file.
4339 2006-07-30 Roland McGrath <roland@redhat.com>
4341 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4343 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4344 (pause_not_cancel): New macro.
4345 (nanosleep_not_cancel): New macro.
4346 (sigsuspend_not_cancel): New macro.
4347 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4348 nanosleep_not_cancel macro from <not-cancel.h>.
4349 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4350 macro from <not-cancel.h>.
4352 2006-07-28 Ulrich Drepper <drepper@redhat.com>
4353 Jakub Jelinek <jakub@redhat.com>
4355 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4356 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4357 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4358 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4359 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4360 * pthread_mutex_lock.c: Likewise.
4361 * pthread_mutex_timedlock.c: Likewise.
4362 * pthread_mutex_trylock.c: Likewise.
4363 * pthread_mutex_unlock.c: Likewise.
4364 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4366 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4367 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4368 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4369 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4370 pthread-pi-defines.sym.
4371 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4372 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4373 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4374 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4375 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4376 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4377 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4378 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4379 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4380 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4381 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4382 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4383 * tst-mutex2.c: Likewise.
4384 * tst-mutex3.c: Likewise.
4385 * tst-mutex4.c: Likewise.
4386 * tst-mutex5.c: Likewise.
4387 * tst-mutex6.c: Likewise.
4388 * tst-mutex7.c: Likewise.
4389 * tst-mutex7a.c: Likewise.
4390 * tst-mutex8.c: Likewise.
4391 * tst-mutex9.c: Likewise.
4392 * tst-robust1.c: Likewise.
4393 * tst-robust7.c: Likewise.
4394 * tst-robust8.c: Likewise.
4395 * tst-mutexpi1.c: New file.
4396 * tst-mutexpi2.c: New file.
4397 * tst-mutexpi3.c: New file.
4398 * tst-mutexpi4.c: New file.
4399 * tst-mutexpi5.c: New file.
4400 * tst-mutexpi6.c: New file.
4401 * tst-mutexpi7.c: New file.
4402 * tst-mutexpi7a.c: New file.
4403 * tst-mutexpi8.c: New file.
4404 * tst-mutexpi9.c: New file.
4405 * tst-robust1.c: New file.
4406 * tst-robust2.c: New file.
4407 * tst-robust3.c: New file.
4408 * tst-robust4.c: New file.
4409 * tst-robust5.c: New file.
4410 * tst-robust6.c: New file.
4411 * tst-robust7.c: New file.
4412 * tst-robust8.c: New file.
4413 * Makefile (tests): Add the new tests.
4415 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4416 * pthread_mutex_destroy.c: Remove unneeded label.
4418 2006-07-01 Ulrich Drepper <drepper@redhat.com>
4420 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4421 computations to compile time.
4423 2006-06-04 Ulrich Drepper <drepper@redhat.com>
4425 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4427 2006-05-15 Ulrich Drepper <drepper@redhat.com>
4429 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4431 2006-05-11 Ulrich Drepper <drepper@redhat.com>
4433 * pthread_key_create.c (__pthread_key_create): Do away with
4434 __pthread_keys_lock.
4436 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4437 (__kernel_cpumask_size): Mark as hidden.
4438 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4440 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4441 * semaphoreP.h (__sem_mappings_lock): Likewise.
4443 2006-05-10 Ulrich Drepper <drepper@redhat.com>
4445 * pthread_atfork.c: Mark __dso_handle as hidden.
4447 2006-05-09 Ulrich Drepper <drepper@redhat.com>
4450 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4451 the reload problem. Change the one path in pthread_cancel_init
4452 which causes the problem. Force gcc to reload. Simplify callers.
4453 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4454 (_Unwind_GetBSP): Undo last patch.
4456 2006-05-07 Ulrich Drepper <drepper@redhat.com>
4458 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4459 function pointer is reloaded after pthread_cancel_init calls.
4462 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4463 pointers are reloaded after pthread_cancel_init calls.
4465 2006-05-01 Ulrich Drepper <drepper@redhat.com>
4467 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4470 2006-04-27 Ulrich Drepper <drepper@redhat.com>
4472 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4473 Allocate new object which is passed to timer_sigev_thread so that
4474 the timer can be deleted before the new thread is scheduled.
4476 2006-04-26 Roland McGrath <roland@redhat.com>
4478 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4480 2006-04-08 Ulrich Drepper <drepper@redhat.com>
4482 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4483 suffix for conditional jumps.
4484 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4485 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4486 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4487 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4488 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4489 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4491 * init.c (sigcancel_handler): Compare with correct PID even if the
4492 thread is in the middle of a fork call.
4493 (sighandler_setxid): Likewise.
4494 Reported by Suzuki K P <suzuki@in.ibm.com> .
4496 2006-04-07 Jakub Jelinek <jakub@redhat.com>
4498 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4500 2006-04-06 Ulrich Drepper <drepper@redhat.com>
4502 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4503 fails [Coverity CID 105].
4505 2006-04-05 Ulrich Drepper <drepper@redhat.com>
4507 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4509 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4512 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4513 Define __lll_rel_instr using lwsync.
4515 2006-03-27 Ulrich Drepper <drepper@redhat.com>
4517 * allocatestack.c (allocate_stack): Always initialize robust_head.
4518 * descr.h: Define struct robust_list_head.
4519 (struct pthread): Use robust_list_head in robust mutex list definition.
4520 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4521 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4522 (__pthread_initialize_minimal_internal): Register robust_list with
4524 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4525 Declare __set_robust_list_avail.
4526 * pthread_create.c (start_thread): Register robust_list of new thread.
4527 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4529 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4530 number of users, it's unreliable.
4531 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4532 set_robust_list syscall is available.
4533 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4534 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4535 Set robust_head.list_op_pending before trying to lock a robust mutex.
4536 * pthread_mutex_timedlock.c: Likewise.
4537 * pthread_mutex_trylock.c: Likewise.
4538 * pthread_mutex_unlock.c: Likewise for unlocking.
4539 * Makefile (tests): Add tst-robust8.
4540 * tst-robust8.c: New file.
4542 2006-03-08 Andreas Schwab <schwab@suse.de>
4544 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4545 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4547 2006-03-05 Roland McGrath <roland@redhat.com>
4549 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4550 and $config_os doesn't match *linux*.
4552 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
4554 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4555 Use __syscall_error.
4556 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4557 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4558 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4559 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4560 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4561 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4563 2006-03-02 Ulrich Drepper <drepper@redhat.com>
4565 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4567 2006-03-01 Ulrich Drepper <drepper@redhat.com>
4569 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4570 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4572 (__lll_robust_timedlock_wait): Likewise.
4573 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4574 (__lll_robust_lock_wait): Likewise.
4575 (__lll_robust_timedlock_wait): Likewise.
4576 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4577 (__lll_robust_lock_wait): Likewise.
4578 (__lll_robust_timedlock_wait): Likewise.
4580 2006-03-01 Jakub Jelinek <jakub@redhat.com>
4582 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4583 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4584 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4585 lll_robust_mutex_unlock): Define.
4586 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4588 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4590 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4591 instead of <clone.S>.
4593 2006-02-27 Jakub Jelinek <jakub@redhat.com>
4595 * Makefile (libpthread-routines): Add
4596 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4597 and pthread_mutex_[sg]etprioceiling.
4598 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4599 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4600 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4601 pthread_mutex_setprioceiling.
4602 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4603 PTHREAD_PRIO_PROTECT): New enum values.
4604 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4605 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4606 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4608 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4609 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4610 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4612 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4613 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4614 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4615 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4616 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4617 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4618 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4620 * pthread_mutex_getprioceiling.c: New file.
4621 * pthread_mutex_setprioceiling.c: New file.
4622 * pthread_mutexattr_getprioceiling.c: New file.
4623 * pthread_mutexattr_setprioceiling.c: New file.
4624 * pthread_mutexattr_getprotocol.c: New file.
4625 * pthread_mutexattr_setprotocol.c: New file.
4627 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4629 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4631 2006-02-27 Roland McGrath <roland@redhat.com>
4633 * sysdeps/pthread/Subdirs: List nptl here too.
4634 * configure (libc_add_on_canonical): New variable.
4636 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4638 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4639 self to get main source tree's file.
4640 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4641 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4642 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4643 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4644 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4645 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4646 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4647 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4648 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4649 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4650 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4651 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4652 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4654 * Makefile: Use $(sysdirs) in vpath directive.
4656 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4657 (CPPFLAGS-timer_routines.c): Likewise.
4659 * Makeconfig (includes): Variable removed.
4661 2006-02-26 Roland McGrath <roland@redhat.com>
4663 * sysdeps/generic/pt-raise.c: Moved to ...
4664 * pt-raise.c: ... here.
4665 * sysdeps/generic/lowlevellock.h: Moved to ...
4666 * lowlevellock.h: ... here.
4668 2006-02-23 Roland McGrath <roland@redhat.com>
4670 * descr.h (struct pthread): Add final member `end_padding'.
4671 (PTHREAD_STRUCT_END_PADDING): Use it.
4673 2006-02-20 Roland McGrath <roland@redhat.com>
4675 * sysdeps/mips: Directory removed, saved in ports repository.
4676 * sysdeps/unix/sysv/linux/mips: Likewise.
4678 2006-02-18 Ulrich Drepper <drepper@redhat.com>
4680 * tst-robust1.c: Add second mutex to check that the mutex list is
4683 2006-02-17 Jakub Jelinek <jakub@redhat.com>
4685 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4686 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4687 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4688 lll_robust_mutex_unlock): New macros.
4689 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4690 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4691 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4692 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4693 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4695 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4697 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4699 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4701 2006-02-17 Ulrich Drepper <drepper@redhat.com>
4703 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4704 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4705 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4706 (lll_robust_mutex_unlock): Likewise.
4708 2006-02-13 Jakub Jelinek <jakub@redhat.com>
4710 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4711 Set robust_list.__next rather than robust_list.
4712 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4713 (__pthread_list_t): New typedef.
4714 (pthread_mutex_t): Replace __next and __prev fields with __list.
4715 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4716 (__pthread_list_t): New typedef.
4717 (pthread_mutex_t): Replace __next and __prev fields with __list.
4718 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4719 (__pthread_list_t, __pthread_slist_t): New typedefs.
4720 (pthread_mutex_t): Replace __next and __prev fields with __list.
4721 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4722 (__pthread_list_t, __pthread_slist_t): New typedefs.
4723 (pthread_mutex_t): Replace __next and __prev fields with __list.
4724 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4725 (__pthread_list_t, __pthread_slist_t): New typedefs.
4726 (pthread_mutex_t): Replace __next and __prev fields with __list.
4727 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4728 (__pthread_slist_t): New typedef.
4729 (pthread_mutex_t): Replace __next field with __list.
4731 2006-02-15 Ulrich Drepper <drepper@redhat.com>
4733 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4734 PTHREAD_MUTEX_OWNERDEAD.
4735 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4736 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4737 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4738 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4739 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4740 to PTHREAD_MUTEX_INCONSISTENT.
4741 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4742 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4743 * pthread_mutex_trylock.c: Likewise.
4744 * pthread_mutex_timedlock.c: Likewise.
4745 * pthread_mutex_unlock.c: Likewise.
4746 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4747 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4748 lowlevelrobustlock.sym.
4749 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4750 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4752 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4753 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4754 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4755 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4756 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4758 2006-02-12 Ulrich Drepper <drepper@redhat.com>
4760 * allocatestack.c (allocate_stack): Initialize robust_list.
4761 * init.c (__pthread_initialize_minimal_internal): Likewise.
4762 * descr.h (struct xid_command): Pretty printing.
4763 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4764 robust_list. Adjust macros.
4765 * pthread_create.c (start_thread): Adjust robust_list handling.
4766 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4767 but the owner for all robust mutex types.
4768 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4769 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
4770 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4771 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4773 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4774 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4776 2006-02-08 Jakub Jelinek <jakub@redhat.com>
4778 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4779 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4781 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4783 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4785 (lll_futex_timed_wait): Define.
4787 2006-01-19 Ulrich Drepper <drepper@redhat.com>
4789 * tst-cancel4.c: Test ppoll.
4791 2006-01-18 Andreas Jaeger <aj@suse.de>
4794 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4795 (pthread_mutex_t): Follow changes for other archs. Based on patch
4796 by Jim Gifford <patches@jg555.com>.
4798 2006-01-13 Richard Henderson <rth@redhat.com>
4800 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4802 2006-01-10 Roland McGrath <roland@redhat.com>
4804 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4805 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4806 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4807 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4808 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4809 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4810 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4811 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4812 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4813 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4815 2006-01-09 Roland McGrath <roland@redhat.com>
4817 * tst-initializers1-c89.c: New file.
4818 * tst-initializers1-c99.c: New file.
4819 * tst-initializers1-gnu89.c: New file.
4820 * tst-initializers1-gnu99.c: New file.
4821 * Makefile (tests): Add them.
4822 (CFLAGS-tst-initializers1-c89.c): New variable.
4823 (CFLAGS-tst-initializers1-c99.c): New variable.
4824 (CFLAGS-tst-initializers1-gnu89.c): New variable.
4825 (CFLAGS-tst-initializers1-gnu99.c): New variable.
4827 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4828 Use __extension__ on anonymous union definition.
4829 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4830 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4831 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4832 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4833 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4835 2006-01-08 Jakub Jelinek <jakub@redhat.com>
4837 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4838 Don't give the union a name because it changes the mangled name.
4839 Instead name the struct for __data.
4840 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4842 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4845 2006-01-09 Jakub Jelinek <jakub@redhat.com>
4847 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4848 stack bias to mc_ftp field.
4850 2006-01-07 Ulrich Drepper <drepper@redhat.com>
4852 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4853 being too clever and reloading the futex value where it shouldn't.
4855 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4857 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4860 2006-01-06 Jakub Jelinek <jakub@redhat.com>
4862 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4865 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4867 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4868 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4869 rename in tcbhead_t.
4871 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4872 Don't give the union a name because it changes the mangled name.
4873 Instead name the struct for __data.
4874 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4875 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4876 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4877 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4878 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4879 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4881 2006-01-05 Ulrich Drepper <drepper@redhat.com>
4883 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4885 (lll_futex_timed_wait): Define.
4886 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4887 * sysdeps/pthread/aio_misc.h: New file.
4889 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4891 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4893 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4895 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4896 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4897 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4899 2006-01-04 Ulrich Drepper <drepper@redhat.com>
4901 * tst-cancel24.cc: Use C headers instead of C++ headers.
4903 2006-01-03 Jakub Jelinek <jakub@redhat.com>
4905 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4906 sparc-linux configured glibc.
4907 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4908 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4909 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4910 atomic_compare_and_exchange_val_24_acq instead of
4911 atomic_compare_and_exchange_val_acq.
4912 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4913 instead of atomic_exchange_rel.
4914 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4915 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4917 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4919 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4920 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4921 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4922 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4923 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4924 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4926 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4928 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4929 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4930 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4932 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4934 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4936 2006-01-03 Ulrich Drepper <drepper@redhat.com>
4938 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4941 2006-01-02 Jakub Jelinek <jakub@redhat.com>
4943 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4944 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4945 THREAD_COPY_POINTER_GUARD): Define.
4946 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4947 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4949 2006-01-01 Ulrich Drepper <drepper@redhat.com>
4951 * version.c: Update copyright year.
4953 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4955 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4956 .eh_frame section, use cfi_* directives.
4957 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4959 2005-12-30 Ulrich Drepper <drepper@redhat.com>
4961 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4964 2005-12-29 Ulrich Drepper <drepper@redhat.com>
4966 * sysdeps/pthread/sigaction.c: Removed.
4967 * sigaction.c: New file.
4968 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4970 2005-12-28 Ulrich Drepper <drepper@redhat.com>
4972 * Makefile (tests): Add tst-signal7.
4973 * tst-signal7.c: New file.
4975 2005-12-27 Roland McGrath <roland@redhat.com>
4977 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4978 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4979 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4980 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4981 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4982 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4983 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4984 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4985 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4986 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4987 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4989 2005-12-27 Jakub Jelinek <jakub@redhat.com>
4991 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4992 and __prev field to pthread_mutex_t.
4993 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4994 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4995 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4996 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4997 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5000 2005-12-26 Ulrich Drepper <drepper@redhat.com>
5002 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5003 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5004 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5005 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5006 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5007 and PTHREAD_MUTEXATTR_FLAG_BITS.
5008 * descr.h (struct pthread): Add robust_list field and define
5009 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5010 * pthread_mutexattr_getrobust.c: New file.
5011 * pthread_mutexattr_setrobust.c: New file.
5012 * pthread_mutex_consistent.c: New file.
5013 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5014 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5015 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5016 Adjust pthread_mutex_t initializers.
5017 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5018 field to pthread_mutex_t.
5019 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5020 and __prev field to pthread_mutex_t.
5021 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5022 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5023 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5024 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5025 * pthread_mutexattr_gettype.c: Likewise.
5026 * pthread_mutexattr_setpshared.c: Likewise.
5027 * pthread_mutexattr_settype.c: Likewise.
5028 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5029 Initialize mutex kind according to robust flag.
5030 * pthread_mutex_lock.c: Implement local robust mutex.
5031 * pthread_mutex_timedlock.c: Likewise.
5032 * pthread_mutex_trylock.c: Likewise.
5033 * pthread_mutex_unlock.c: Likewise.
5034 * pthread_create.c (start_thread): Mark robust mutexes which remained
5036 * tst-robust1.c: New file.
5037 * tst-robust2.c: New file.
5038 * tst-robust3.c: New file.
5039 * tst-robust4.c: New file.
5040 * tst-robust5.c: New file.
5041 * tst-robust6.c: New file.
5042 * tst-robust7.c: New file.
5043 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5044 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5045 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5046 tst-robust5, tst-robust6, and tst-robust7.
5048 * tst-typesizes.c: New file.
5049 * Makefile (tests): Add tst-typesizes.
5051 * tst-once3.c: More debug output.
5053 2005-12-24 Ulrich Drepper <drepper@redhat.com>
5055 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5056 missing after last change.
5058 * version.c: Update copyright year.
5060 2005-12-23 Ulrich Drepper <drepper@redhat.com>
5062 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5063 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5064 * pthread_mutex_trylock.c: Likewise.
5065 * pthread_mutex_timedlock.c: Likewise.
5066 * pthread_mutex_unlock.c: Likewise.
5068 2005-12-22 Roland McGrath <roland@redhat.com>
5070 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5071 so that #include_next's search location is not reset to the -I..
5072 directory where <nptl/...> can be found.
5074 2005-12-22 Ulrich Drepper <drepper@redhat.com>
5077 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5078 Fix unwind info. Remove useless branch prediction prefix.
5079 * tst-cancel24.cc: New file.
5080 * Makefile: Add rules to build and run tst-cancel24.
5082 2005-12-21 Roland McGrath <roland@redhat.com>
5084 * libc-cancellation.c: Use <> rather than "" #includes.
5085 * pt-cleanup.c: Likewise.
5086 * pthread_create.c: Likewise.
5087 * pthread_join.c: Likewise.
5088 * pthread_timedjoin.c: Likewise.
5089 * pthread_tryjoin.c: Likewise.
5090 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5091 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5092 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5093 * unwind.c: Likewise.
5095 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5097 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5098 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5099 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5100 THREAD_COPY_POINTER_GUARD): Define.
5102 2005-12-19 Jakub Jelinek <jakub@redhat.com>
5104 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5106 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5107 THREAD_COPY_POINTER_GUARD): Define.
5108 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5109 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5110 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5111 THREAD_COPY_POINTER_GUARD): Define.
5112 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5113 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5114 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5115 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5116 Use PTR_DEMANGLE for B0 if defined.
5118 2005-12-17 Ulrich Drepper <drepper@redhat.com>
5120 * pthread_create.c (__pthread_create_2_1): Use
5121 THREAD_COPY_POINTER_GUARD if available.
5122 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5123 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5124 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5125 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5126 * sysdeps/x86_64/tls.h: Likewise.
5128 2005-12-15 Roland McGrath <roland@redhat.com>
5130 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5132 2005-12-13 Ulrich Drepper <drepper@redhat.com>
5134 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5136 * errno-loc.c: New file.
5138 2005-12-12 Roland McGrath <roland@redhat.com>
5140 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5141 adjustments before choosing stack size. Update minimum stack size
5142 calculation to match allocate_stack change.
5144 2005-12-12 Ulrich Drepper <drepper@redhat.com>
5146 * allocatestack.c (allocate_stack): Don't demand that there is an
5147 additional full page available on the stack beside guard, TLS, the
5150 2005-11-24 Ulrich Drepper <drepper@redhat.com>
5152 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5153 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5155 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5156 compiling 32-bit code we must define __cleanup_fct_attribute.
5158 005-11-24 Jakub Jelinek <jakub@redhat.com>
5161 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5162 __attribute__ instead of __attribute.
5163 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5164 (__cleanup_fct_attribute): Likewise.
5166 2005-11-17 Jakub Jelinek <jakub@redhat.com>
5168 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5169 a write barrier before writing libgcc_s_getcfa.
5171 2005-11-06 Ulrich Drepper <drepper@redhat.com>
5173 * sysdeps/unix/sysv/linux/configure: Removed.
5175 2005-11-05 Ulrich Drepper <drepper@redhat.com>
5177 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5178 optional init_array/fini_array support.
5180 2005-10-24 Roland McGrath <roland@redhat.com>
5182 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5183 versioned_symbol use.
5185 2005-10-16 Roland McGrath <roland@redhat.com>
5187 * init.c (__pthread_initialize_minimal_internal): Even when using a
5188 compile-time default stack size, apply the minimum that allocate_stack
5189 will require, and round up to page size.
5191 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5193 * Makefile ($(test-modules)): Remove static pattern rule.
5195 2005-10-14 Jakub Jelinek <jakub@redhat.com>
5196 Ulrich Drepper <drepper@redhat.com>
5198 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5199 alignment in callback function.
5200 * Makefile: Add rules to build and run tst-align3.
5201 * tst-align3.c: New file.
5203 2005-10-03 Jakub Jelinek <jakub@redhat.com>
5205 * allocatestack.c (setxid_signal_thread): Add
5206 INTERNAL_SYSCALL_DECL (err).
5208 2005-10-02 Jakub Jelinek <jakub@redhat.com>
5210 * allocatestack.c (setxid_signal_thread): Need to use
5211 atomic_compare_and_exchange_bool_acq.
5213 2005-10-01 Ulrich Drepper <drepper@redhat.com>
5214 Jakub Jelinek <jakub@redhat.com>
5216 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5218 (struct pthread): Move specific_used field to avoid padding.
5219 Add setxid_futex field.
5220 * init.c (sighandler_setxid): Reset setxid flag and release the
5222 * allocatestack.c (setxid_signal_thread): New function. Broken
5223 out of the bodies of the two loops in __nptl_setxid. For undetached
5224 threads check whether they are exiting and if yes, don't send a signal.
5225 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5226 * pthread_create.c (start_thread): For undetached threads, check
5227 whether setxid bit is set. If yes, wait until signal has been
5230 * allocatestack.c (STACK_VARIABLES): Initialize them.
5231 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5233 2004-09-02 Jakub Jelinek <jakub@redhat.com>
5235 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5236 waiters, awake all waiters on the associated mutex.
5238 2005-09-22 Roland McGrath <roland@redhat.com>
5240 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5241 ../sysdeps/x86_64/hp-timing.h).
5243 2005-08-29 Jakub Jelinek <jakub@redhat.com>
5245 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5246 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5247 (lll_futex_wake_unlock): Define.
5248 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5249 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5250 (lll_futex_wake_unlock): Define.
5251 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5252 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5253 (lll_futex_wake_unlock): Define.
5254 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5255 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5256 (lll_futex_wake_unlock): Define.
5257 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5258 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5259 (lll_futex_wake_unlock): Define.
5260 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5261 lll_futex_wake_unlock.
5262 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5263 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5264 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5265 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5266 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5267 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5269 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5271 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5272 Fix typo in register name.
5274 2005-08-23 Ulrich Drepper <drepper@redhat.com>
5276 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5277 Use __sigfillset. Document that sigfillset does the right thing wrt
5280 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5283 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5284 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5285 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5286 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5287 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5288 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5290 * Makefile (tests): Add tst-initializers1.
5291 (CFLAGS-tst-initializers1.c): Set.
5292 * tst-initializers1.c: New test.
5294 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5296 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5297 Make sure __flags are located at offset 48 from the start of the
5300 2005-07-02 Roland McGrath <roland@redhat.com>
5302 * Makeconfig: Comment fix.
5304 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5306 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5307 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5308 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5309 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5310 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5311 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5312 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5313 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5314 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5315 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5317 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5319 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5320 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5321 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5323 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5324 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5325 field. Put in sysinfo field unconditionally.
5326 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5327 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5328 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5329 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5331 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5332 * pthread_create.c (__pthread_create_2_1): Use
5333 THREAD_COPY_STACK_GUARD macro.
5334 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5336 * tst-stackguard1.c: New file.
5337 * tst-stackguard1-static.c: New file.
5339 2005-06-14 Alan Modra <amodra@bigpond.net.au>
5341 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5342 Invoke CGOTSETUP and CGOTRESTORE.
5343 (CGOTSETUP, CGOTRESTORE): Define.
5345 2005-05-29 Richard Henderson <rth@redhat.com>
5347 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5348 (tf_write, tf_writev): Use it.
5349 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5352 2005-05-23 Jakub Jelinek <jakub@redhat.com>
5354 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5355 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5356 __librt_*_asynccancel@local.
5358 2005-05-17 Alan Modra <amodra@bigpond.net.au>
5360 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5361 all occurrences of JUMPTARGET. Instead append @local to labels.
5363 2005-05-20 Jakub Jelinek <jakub@redhat.com>
5365 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5366 size/alignment of struct pthread rather than tcbhead_t.
5367 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5369 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5371 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5374 2005-05-19 Richard Henderson <rth@redhat.com>
5376 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5377 __sync_val_compare_and_swap, not explicit _si variant.
5378 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5380 2005-05-03 Ulrich Drepper <drepper@redhat.com>
5383 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5385 2005-05-03 Jakub Jelinek <jakub@redhat.com>
5387 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5388 .eh_frame section, use cfi_* directives.
5390 2005-04-27 Jakub Jelinek <jakub@redhat.com>
5392 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5395 2005-04-27 Ulrich Drepper <drepper@redhat.com>
5398 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5401 2005-04-27 Roland McGrath <roland@redhat.com>
5403 * Makefile (tests): Remove tst-clock2.
5405 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5406 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5407 translating to the kernel clockid_t for our own process/thread clock.
5409 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5411 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5413 * old_pthread_cond_init.c: Include <errno.h>.
5414 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5415 process shared or uses clock other than CLOCK_REALTIME.
5416 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5418 2005-04-13 David S. Miller <davem@davemloft.net>
5420 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5421 * sysdeps/sparc/sparc64/clone.S: New file.
5423 2005-04-05 Jakub Jelinek <jakub@redhat.com>
5426 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5427 __inline instead of inline.
5428 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5430 2005-03-31 Jakub Jelinek <jakub@redhat.com>
5432 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5433 functionally equivalent, but shorter instructions.
5434 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5435 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5436 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5438 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5439 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5440 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5441 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5442 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5443 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5444 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5446 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5447 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5448 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5449 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5450 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5452 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5454 * sysdeps/mips/Makefile: New file.
5455 * sysdeps/mips/nptl-sysdep.S: New file.
5456 * sysdeps/mips/tcb-offsets.sym: New file.
5457 * sysdeps/mips/pthread_spin_lock.S: New file.
5458 * sysdeps/mips/pthread_spin_trylock.S: New file.
5459 * sysdeps/mips/pthreaddef.h: New file.
5460 * sysdeps/mips/tls.h: New file.
5461 * sysdeps/mips/jmpbuf-unwind.h: New file.
5462 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5463 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5464 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5465 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5466 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5467 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5468 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5469 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5470 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5471 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5473 2005-03-23 Ulrich Drepper <drepper@redhat.com>
5476 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5479 2005-03-10 Jakub Jelinek <jakub@redhat.com>
5481 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5483 2005-02-25 Roland McGrath <roland@redhat.com>
5485 * alloca_cutoff.c: Correct license text.
5486 * tst-unload.c: Likewise.
5487 * sysdeps/pthread/allocalim.h: Likewise.
5488 * sysdeps/pthread/pt-initfini.c: Likewise.
5489 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5490 * sysdeps/pthread/bits/sigthread.h: Likewise.
5491 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5492 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5494 2005-02-16 Roland McGrath <roland@redhat.com>
5496 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5497 Use unsigned int * for ptr_nthreads.
5499 2005-02-14 Alan Modra <amodra@bigpond.net.au>
5502 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5505 2005-02-07 Richard Henderson <rth@redhat.com>
5508 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5511 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
5513 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5514 order of arguments in invocation of atomic_add_zero.
5516 2005-01-26 Jakub Jelinek <jakub@redhat.com>
5519 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5520 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5521 at least gotntpoff relocation and addition.
5522 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5524 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5526 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5529 2005-01-06 Ulrich Drepper <drepper@redhat.com>
5531 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5532 entry for static tls deallocation fix.
5533 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5534 also contains information whether the memory pointed to is static
5536 * sysdeps/i386/tls.h: Likewise.
5537 * sysdeps/ia64/tls.h: Likewise.
5538 * sysdeps/powerpc/tls.h: Likewise.
5539 * sysdeps/s390/tls.h: Likewise.
5540 * sysdeps/sh/tls.h: Likewise.
5541 * sysdeps/sparc/tls.h: Likewise.
5542 * sysdeps/x86_64/tls.h: Likewise.
5544 2004-12-27 Ulrich Drepper <drepper@redhat.com>
5546 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5548 2004-12-21 Jakub Jelinek <jakub@redhat.com>
5550 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5552 * Makefile (tests): Add tst-align2.
5553 * tst-align2.c: New test.
5554 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5555 -mpreferred-stack-boundary=4.
5557 2004-12-18 Roland McGrath <roland@redhat.com>
5559 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5560 New file removed withdrawn for the moment.
5562 2004-12-17 Richard Henderson <rth@redhat.com>
5564 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5565 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5567 2004-12-16 Ulrich Drepper <drepper@redhat.com>
5569 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5570 Increased PTHREAD_STACK_MIN.
5572 * tst-context1.c (stacks): Use bigger stack size.
5574 2004-12-16 Jakub Jelinek <jakub@redhat.com>
5576 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5577 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5579 2004-12-15 Jakub Jelinek <jakub@redhat.com>
5581 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5582 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5583 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5585 2004-12-15 Ulrich Drepper <drepper@redhat.com>
5587 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5589 2004-12-14 Ulrich Drepper <drepper@redhat.com>
5591 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5592 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5594 * tst-getpid1.c: If child crashes, report this first. Print which
5597 2004-12-09 Ulrich Drepper <drepper@redhat.com>
5599 * init.c (__pthread_initialize_minimal_internal): Also unblock
5602 2004-12-01 Jakub Jelinek <jakub@redhat.com>
5604 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5605 _POSIX_THREAD_CPUTIME): Define to 0.
5606 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5607 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5608 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5609 __timer_signal_thread_tclk): Remove.
5610 (init_module): Remove their initialization.
5611 (thread_cleanup): Remove their cleanup assertions.
5612 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5613 __timer_signal_thread_tclk): Remove.
5614 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5615 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5616 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5618 2004-12-07 Jakub Jelinek <jakub@redhat.com>
5620 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5621 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5623 * Makefile (tests): Add tst-getpid2.
5624 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5625 (do_test): Use it. Use __clone2 instead of clone on ia64.
5626 * tst-getpid2.c: New test.
5628 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5630 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5632 2004-12-04 Ulrich Drepper <drepper@redhat.com>
5634 * Makefile (tests): Add tst-getpid1.
5635 * tst-getpid1.c: New file.
5636 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5637 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5639 2004-12-02 Roland McGrath <roland@redhat.com>
5641 * Makefile (libpthread-nonshared): Variable removed.
5642 ($(objpfx)libpthread_nonshared.a): Target removed.
5643 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5644 These are now handled by generic magic from
5645 libpthread-static-only-routines being set.
5647 2004-11-27 Ulrich Drepper <drepper@redhat.com>
5649 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5650 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5651 _POSIX_THREAD_PRIO_PROTECT): Define.
5652 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5653 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5654 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5656 2004-11-26 Jakub Jelinek <jakub@redhat.com>
5658 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5659 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5660 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5661 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5662 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5663 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5664 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5666 2004-11-24 Ulrich Drepper <drepper@redhat.com>
5668 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5670 * Makefile (libpthread-routines): Add pthread_setschedprio.
5671 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5672 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5673 * pthread_setschedprio.c: New file.
5675 2004-11-20 Jakub Jelinek <jakub@redhat.com>
5677 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5678 * pthread_cancel.c (pthread_create): Likewise.
5680 * Makefile (libpthread-routines): Add vars.
5681 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5682 * init.c (__default_stacksize, __is_smp): Remove.
5684 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5685 and define a wrapper macro.
5686 (PTHREAD_STATIC_FN_REQUIRE): Define.
5687 * allocatestack.c (__find_thread_by_id): Undefine.
5688 * pthread_create (__pthread_keys): Remove.
5689 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5690 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5691 PTHREAD_STATIC_FN_REQUIRE.
5693 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5695 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5696 parameter to REGISTER macro.
5698 2004-11-17 Roland McGrath <roland@redhat.com>
5700 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5701 Make sure SIGCANCEL is blocked as well.
5703 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5705 * sysdeps/pthread/setxid.h: New file.
5706 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5707 (struct xid_command): Add forward decl.
5708 (struct pthread_functions): Change return type of __nptl_setxid hook
5710 * pthreadP.h (__nptl_setxid): Change return type to int.
5711 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5712 calling thread, return its return value and set errno on failure.
5713 * descr.h (struct xid_command): Change id type to long array.
5715 * Makefile: Add rules to build and test tst-setuid1 and
5717 * tst-setuid1.c: New test.
5718 * tst-setuid1-static.c: New test.
5720 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5722 * Makefile (tests): Add tst-exit3.
5723 * tst-exit3.c: New test.
5725 2004-11-09 Ulrich Drepper <drepper@redhat.com>
5727 * Makefile (tests): Add tst-exit2.
5728 * tst-exit2.c: New file.
5730 2004-11-09 Roland McGrath <roland@redhat.com>
5733 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5734 here, before calling clone.
5735 * pthread_create.c (start_thread): Don't do it here.
5737 2004-11-02 Jakub Jelinek <jakub@redhat.com>
5739 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5741 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5743 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5744 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5747 2004-10-28 Jakub Jelinek <jakub@redhat.com>
5749 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5750 if sched_priority is not between minprio and maxprio.
5752 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5754 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5755 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5757 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5758 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5760 2004-10-24 Ulrich Drepper <drepper@redhat.com>
5762 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5763 not-cancelable I/O functions.
5765 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5767 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5768 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5769 make sure 2 is stored in the futex and we looked at the old value.
5770 Fix a few other problems to return the correct value.
5772 2004-10-14 Richard Henderson <rth@redhat.com>
5774 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5777 2004-10-06 Jakub Jelinek <jakub@redhat.com>
5779 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5780 of pthread-functions.h and pthreaddef.h.
5781 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5783 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5784 Change __data.__nwaiters from int to unsigned int.
5786 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5787 sysconf (_SC_THREAD_CPUTIME) returns negative value.
5789 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5792 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5793 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5795 2004-10-06 Ulrich Drepper <drepper@redhat.com>
5797 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
5798 test fails, remove message queue.
5799 (tf_msgsnd): Likewise.
5801 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5803 * tst-clock1.c: Change #ifdef to #if defined.
5804 * tst-clock2.c: Likewise.
5805 * tst-cond11.c: Likewise.
5807 * sysdeps/pthread/timer_create.c (timer_create): Use
5808 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5809 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5812 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5814 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5815 _POSIX_THREAD_CPUTIME): Define to 0.
5817 2004-10-04 Ulrich Drepper <drepper@redhat.com>
5819 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5820 and _POSIX_THREAD_CPUTIME to zero.
5821 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5822 * tst-barrier2.c: Fix testing for POSIX feature.
5823 * tst-clock1.c: Likewise.
5824 * tst-clock2.c: Likewise.
5825 * tst-cond11.c: Likewise.
5826 * tst-cond4.c: Likewise.
5827 * tst-cond6.c: Likewise.
5828 * tst-flock2.c: Likewise.
5829 * tst-mutex4.c: Likewise.
5830 * tst-mutex9.c: Likewise.
5831 * tst-rwlock12.c: Likewise.
5832 * tst-rwlock4.c: Likewise.
5833 * tst-signal1.c: Likewise.
5834 * tst-spin2.c: Likewise.
5835 * sysdeps/pthread/posix-timer.h: Likewise.
5836 * sysdeps/pthread/timer_create.c: Likewise.
5837 * sysdeps/pthread/timer_routines.c: Likewise.
5839 2004-10-01 Ulrich Drepper <drepper@redhat.com>
5841 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5842 (__lll_mutex_timedlock_wait): Address futex correctly.
5844 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5845 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5846 make sure 2 is stored in the futex and we looked at the old value.
5847 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5848 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5849 which might very well made the code not working at all before.
5852 2004-09-28 Ulrich Drepper <drepper@redhat.com>
5854 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5855 allow SIGSETXID to be sent.
5856 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5857 for SIGSETXID to be defined.
5858 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5859 SIGSETXID cannot be blocked.
5861 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5862 Add __extension__ to long long types.
5863 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5864 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5865 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5866 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5867 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5868 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5869 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5871 2004-09-25 Ulrich Drepper <drepper@redhat.com>
5873 * descr.h (struct pthread): Add stopped_start field.
5874 * sysdeps/pthread/createthread.c (create_thread): Set
5875 start_stopped flag in descriptor for new thread appropriately.
5876 * pthread_create.c (start_thread): Only take lock to be stopped on
5877 startup if stopped_start flag says so.
5879 2004-09-24 Ulrich Drepper <drepper@redhat.com>
5881 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5882 is created detached and if yes, do not try to free the stack in case
5883 the thread creation failed.
5884 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5885 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5886 case there has been no error. [BZ #405]
5888 * pthread_create.c (start_thread): Don't wait for scheduler data
5889 etc to be set at the beginning of the function. The cancellation
5890 infrastructure must have been set up. And enable async
5891 cancellation before potentially going to sleep. [BZ #401]
5893 2004-09-20 Ulrich Drepper <drepper@redhat.com>
5895 * Versions: Remove exports for pthread_set*id_np functions.
5896 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5898 * Makefile: Don't build pthread_set*id code for now.
5900 2004-09-19 Ulrich Drepper <drepper@redhat.com>
5902 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5904 * allocatestack.c (__nptl_setxid): New function.
5905 * descr.h (struct xid_command): Define type.
5906 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5907 (sighandler_setxid): New function.
5908 (__pthread_initialize_minimal): Register sighandler_setxid for
5910 * pt-allocrtsig.c: Update comment.
5911 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
5912 Declare __nptl_setxid.
5913 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5914 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5915 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5916 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5917 and pthread_setresuid_np.
5918 * pthread_setgid_np.c: New file.
5919 * pthread_setuid_np.c: New file.
5920 * pthread_setegid_np.c: New file.
5921 * pthread_seteuid_np.c: New file.
5922 * pthread_setregid_np.c: New file.
5923 * pthread_setreuid_np.c: New file.
5924 * pthread_setresgid_np.c: New file.
5925 * pthread_setresuid_np.c: New file.
5926 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5927 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5928 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5929 and pthread_setresuid_np.
5930 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5931 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5932 pthread_setregid, and pthread_setresgid.
5934 2004-09-18 Ulrich Drepper <drepper@redhat.com>
5936 * allocatestack.c (allocate_stack): Return EAGAIN instead of
5937 ENOMEM when out of memory.
5939 2004-09-10 Roland McGrath <roland@redhat.com>
5942 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5943 code, since we don't try to use the broken CLONE_STOPPED any more.
5944 * pthread_create.c (start_thread): Likewise.
5946 2004-09-15 Richard Henderson <rth@redhat.com>
5948 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5950 2004-09-01 David Mosberger <davidm@hpl.hp.com>
5952 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5953 (__libc_unwind_longjmp): Delete macro and declare as function.
5954 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5955 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5957 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5958 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5959 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5961 2004-09-12 Ulrich Drepper <drepper@redhat.com>
5963 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5965 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5966 types also for __USE_XOPEN2K.
5967 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5968 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5969 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5970 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5971 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5972 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5973 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5976 2004-09-08 Ulrich Drepper <drepper@redhat.com>
5978 * sysdeps/pthread/pthread.h
5979 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5980 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5981 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5982 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5985 2004-09-07 Ulrich Drepper <drepper@redhat.com>
5987 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5988 PSEUDO to be used with . prefix.
5990 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5991 Use atomic_increment instead of atomic_exchange_and_add.
5992 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5994 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5996 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5999 * allocatestack.c (allocate_stack): Use atomic_increment_val
6000 instead of atomic_exchange_and_add.
6001 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6002 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6004 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6007 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6008 the initialization function might throw.
6010 2005-09-05 Richard Henderson <rth@redhat.com>
6012 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6013 Move definition inside libpthread, libc, librt check. Provide
6014 definition for rtld.
6016 2004-09-02 Ulrich Drepper <drepper@redhat.com>
6018 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6019 * sysdeps/i386/jmpbuf-unwind.h: Likewise
6020 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6021 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6022 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6023 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6024 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6025 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6028 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6029 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6030 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6032 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6033 Decrement __nwaiters. If pthread_cond_destroy has been called and
6034 this is the last waiter, signal pthread_cond_destroy caller and
6035 avoid using the pthread_cond_t structure after unlock.
6036 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6037 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6038 Read clock type from the least significant bits of __nwaiters instead
6040 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6041 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6043 2004-08-31 Jakub Jelinek <jakub@redhat.com>
6046 * Makefile (tests): Add tst-cond20 and tst-cond21.
6047 * tst-cond20.c: New test.
6048 * tst-cond21.c: New test.
6049 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6050 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6052 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6054 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6055 (pthread_cond_t): Likewise.
6056 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6058 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6060 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6062 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6063 (cond_nwaiters): New.
6065 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6066 if there are waiters not signalled yet.
6067 Wait until all already signalled waiters wake up.
6068 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6069 __nwaiters. If pthread_cond_destroy has been called and this is the
6070 last waiter, signal pthread_cond_destroy caller and avoid using
6071 the pthread_cond_t structure after unlock.
6072 (__pthread_cond_wait): Increment __nwaiters in the beginning,
6073 decrement it when leaving. If pthread_cond_destroy has been called
6074 and this is the last waiter, signal pthread_cond_destroy caller.
6075 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6076 Likewise. Read clock type from the least significant bits of
6077 __nwaiters instead of __clock.
6078 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6079 whether clock ID can be encoded in COND_CLOCK_BITS bits.
6080 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6081 clock type just from the last COND_CLOCK_BITS bits of value.
6082 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6083 instead of __clock, just from second bit of condattr's value.
6085 2004-08-30 Jakub Jelinek <jakub@redhat.com>
6087 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6088 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
6090 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6092 2004-08-15 Roland McGrath <roland@frob.com>
6094 * pthread_atfork.c: Update copyright terms including special exception
6095 for these trivial files, which are statically linked into executables
6096 that use dynamic linking for the significant library code.
6098 2004-08-09 Jakub Jelinek <jakub@redhat.com>
6100 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6101 pthread_rwlock_rdlock.
6102 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6103 Decrease __nr_readers_queued after reacquiring lock.
6104 * sysdeps/pthread/pthread_rwlock_timedrdlock
6105 (pthread_rwlock_timedrdlock): Likewise.
6106 Reported by Bob Cook <bobcook47@hotmail.com>.
6108 2004-08-11 Jakub Jelinek <jakub@redhat.com>
6110 * tst-rwlock14.c (tf): Read main thread handle from *ARG
6111 before pthread_barrier_wait.
6113 2004-08-07 Ulrich Drepper <drepper@redhat.com>
6115 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6116 Remove unnecessary exception handling data.
6118 2004-07-23 Jakub Jelinek <jakub@redhat.com>
6121 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6122 instead of clockid_t.
6124 2004-07-21 Roland McGrath <roland@redhat.com>
6126 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6128 2004-07-19 Roland McGrath <roland@redhat.com>
6130 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6132 2004-07-02 Roland McGrath <roland@redhat.com>
6134 * configure: Don't exit.
6136 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6138 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6139 (__pthread_cond_timedwait): Check for invalid nanosecond in
6142 2004-07-07 Ulrich Drepper <drepper@redhat.com>
6144 * Makefile: Add rules to build and run tst-fini1.
6145 * tst-fini1.c: New file.
6146 * tst-fini1mod.c: New file.
6148 2004-07-05 Ulrich Drepper <drepper@redhat.com>
6150 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6151 if no cancellation support is needed.
6152 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6153 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6154 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6155 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6156 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6157 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6158 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6159 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6160 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6162 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6163 only if not already defined.
6165 2004-07-05 Jakub Jelinek <jakub@redhat.com>
6167 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6168 constraint "m" instead of "0" for futex.
6170 * shlib-versions: Add powerpc64-.*-linux.*.
6172 2004-07-04 Jakub Jelinek <jakub@redhat.com>
6174 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6175 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6177 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6178 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6181 2004-06-29 Roland McGrath <roland@redhat.com>
6183 * Banner: NPTL no longer has its own version number.
6184 * Makefile (nptl-version): Variable removed.
6185 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6186 using $(version), the glibc version number.
6188 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6190 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6191 Fix branch offset for a PLT entry.
6192 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6194 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6196 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6198 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6201 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6203 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6206 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6208 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6209 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6211 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6212 (pthread_rwlock_timedrdlock): Likewise.
6214 2004-06-22 Jakub Jelinek <jakub@redhat.com>
6216 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6217 Set __r7 to val, not mutex.
6219 2004-06-27 Ulrich Drepper <drepper@redhat.com>
6221 * Makefile: Add rules to build tst-rwlock14.
6222 * tst-rwlock14.c: New file.
6224 2004-06-24 Boris Hu <boris.hu@intel.com>
6226 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6228 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6230 2004-06-19 Andreas Jaeger <aj@suse.de>
6232 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6233 assembler in last patch.
6235 2004-06-17 Ulrich Drepper <drepper@redhat.com>
6237 * sysdeps/pthread/pthread_cond_timedwait.c
6238 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6239 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6240 (__pthread_cond_timedwait): Check for invalid nanosecond in
6242 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6243 * tst-cond19.c: New file.
6244 * Makefile: Add rules to build and run tst-cond19.
6246 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6248 * tst-context1.c (GUARD_PATTERN): Defined.
6249 (tst_context_t): Define struct containing ucontext_t & guard words.
6250 (ctx): Declare as an array of tst_context_t.
6251 (fct): Verify uc_link & guard words are still valid.
6252 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6254 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6256 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6257 Add __data.__futex field, reshuffle __data.__clock.
6258 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6259 (__pthread_cond_signal): Increment __futex at the same time as
6260 __wakeup_seq or __total_seq. Pass address of __futex instead of
6261 address of low 32-bits of __wakeup_seq to futex syscall.
6262 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6263 (__pthread_cond_wait): Likewise. Pass __futex value from before
6264 releasing internal lock to FUTEX_WAIT.
6265 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6266 (__pthread_cond_timedwait): Likewise.
6267 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6268 (FUTEX_CMP_REQUEUE): Define.
6269 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6270 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6271 Pass __futex value from before the unlock and __futex address instead
6272 of address of low 32-bits of __wakeup_seq to futex syscall.
6273 Fallback to FUTEX_WAKE all on any errors.
6275 2004-06-08 Jakub Jelinek <jakub@redhat.com>
6277 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6279 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6280 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6281 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6282 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6283 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6285 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6287 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6288 Add memory clobber to inline assembly.
6289 (__lll_mutex_trylock): Likewise.
6290 (__lll_mutex_cond_trylock): Likewise.
6292 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6294 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6295 Pass val argument as 6th system call argument in %r7.
6297 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6299 * Makefile (tests): Add tst-cond16.
6300 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6301 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6302 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6303 Add __data.__futex field, reshuffle __data.__clock.
6304 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6305 (__pthread_cond_signal): Increment __futex at the same time as
6306 __wakeup_seq or __total_seq. Pass address of __futex instead of
6307 address of low 32-bits of __wakeup_seq to futex syscall.
6308 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6309 (__pthread_cond_wait): Likewise. Pass __futex value from before
6310 releasing internal lock to FUTEX_WAIT.
6311 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6312 (__pthread_cond_timedwait): Likewise.
6313 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6314 (FUTEX_CMP_REQUEUE): Define.
6315 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6316 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6317 Pass __futex value from before the unlock and __futex address instead
6318 of address of low 32-bits of __wakeup_seq to futex syscall.
6319 Fallback to FUTEX_WAKE all on any errors.
6320 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6322 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6323 internally. Return non-zero if error, zero if success.
6324 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6325 Add __data.__futex field, reshuffle __data.__clock.
6326 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6328 (lll_futex_requeue): Add val argument, return 1 unconditionally
6330 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6331 Add __data.__futex field, reshuffle __data.__clock.
6332 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6334 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6335 internally. Return non-zero if error, zero if success.
6336 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6337 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6338 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6340 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6341 internally. Return non-zero if error, zero if success.
6342 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6343 Add __data.__futex field, reshuffle __data.__clock.
6344 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6346 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6347 internally. Return non-zero if error, zero if success.
6348 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6349 Add __data.__futex field, reshuffle __data.__clock.
6350 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6351 Add __data.__futex field, reshuffle __data.__clock.
6352 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6353 Increment __futex at the same time as __wakeup_seq or __total_seq.
6354 Pass address of __futex instead of address of low 32-bits of
6355 __wakeup_seq to futex syscall.
6356 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6357 Pass __futex value from before releasing internal lock
6359 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6360 Likewise. Avoid unnecessary shadowing of variables.
6361 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6362 Set __futex to 2 * __total_seq. Pass __futex value from before the
6363 unlock and __futex address instead of address of low 32-bits of
6364 __wakeup_seq to futex_requeue macro, adjust for new return value
6366 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6367 (__pthread_cond_signal): Increment __futex at the same time as
6368 __wakeup_seq or __total_seq. Pass address of __futex instead of
6369 address of low 32-bits of __wakeup_seq to futex syscall.
6370 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6371 (__pthread_cond_wait): Likewise. Pass __futex value from before
6372 releasing internal lock to FUTEX_WAIT.
6373 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6374 (__pthread_cond_timedwait): Likewise.
6375 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6376 (FUTEX_CMP_REQUEUE): Define.
6377 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6378 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6379 Pass __futex value from before the unlock and __futex address instead
6380 of address of low 32-bits of __wakeup_seq to futex syscall.
6381 Fallback to FUTEX_WAKE all on any errors.
6383 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6385 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6386 Add nop to align the end of critical section.
6387 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6389 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6391 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6392 Add __broadcast_seq field.
6393 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6394 all waiters as woken with woken_seq and bump broadcast counter.
6395 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6396 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6397 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6398 Comment typo fixes. Avoid returning -ETIMEDOUT.
6400 2004-06-01 Ulrich Drepper <drepper@redhat.com>
6402 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6403 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6404 Reported by Kaz Kojima.
6406 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6408 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6410 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6412 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6413 __broadcast_seq with bc_seq after acquiring internal lock instead of
6416 2004-05-18 Jakub Jelinek <jakub@redhat.com>
6418 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6420 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6421 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6422 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6423 (pthread_cond_t): Add __data.__broadcast_seq field.
6424 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6425 (FRAME_SIZE): Define.
6426 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6428 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6430 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6432 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6433 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6436 2004-05-18 Ulrich Drepper <drepper@redhat.com>
6438 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6439 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6440 Add __broadcast_seq field.
6441 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6442 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6443 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6444 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6445 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6446 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6447 all waiters as woken with woken_seq and bump broadcast counter.
6448 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6449 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6450 __broadcast_seq field.
6451 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6452 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6453 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6454 * pthread_cond_init.c: Initialize __broadcast_seq field.
6455 * Makefile (tests): Add tst-cond17 and tst-cond18.
6456 Add .NOTPARALLEL goal.
6457 * tst-cond16.c: New file. From Jakub.
6458 * tst-cond17.c: New file. From Jakub.
6459 * tst-cond18.c: New file. From Jakub.
6461 2004-05-16 Ulrich Drepper <drepper@redhat.com>
6463 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6466 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6467 Parametrize frame size. Correct some unwind info.
6468 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6470 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6472 * tst-stack3.c: Note testing functionality beyond POSIX.
6474 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6476 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6477 Change conditional from ifdef to if.
6479 2004-04-23 Jakub Jelinek <jakub@redhat.com>
6481 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6482 SYSDEP_CANCEL_ERROR): Define.
6485 2004-05-01 Jakub Jelinek <jakub@redhat.com>
6487 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6489 2004-04-20 Jakub Jelinek <jakub@redhat.com>
6491 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6493 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6495 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6496 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6497 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6498 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6500 2004-04-19 Ulrich Drepper <drepper@redhat.com>
6502 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6503 thread has all signals blocked.
6505 2004-04-18 Andreas Jaeger <aj@suse.de>
6507 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6508 (SEM_VALUE_MAX): Add missing brace.
6510 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6512 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6514 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6515 * sysdeps/pthread/tst-mqueue8x.c: New test.
6516 * tst-cancel4.c: Update comment about message queues.
6518 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6519 return it_value { 0, 0 }.
6520 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6522 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6523 assertion for SIGEV_NONE.
6524 (thread_attr_compare): Compare all attributes, not just a partial
6527 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6529 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6531 2004-04-17 Ulrich Drepper <drepper@redhat.com>
6533 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6534 Just use a plain number.
6535 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6536 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6537 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6538 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6539 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6540 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6541 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6543 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6545 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6547 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6549 2004-04-15 Jakub Jelinek <jakub@redhat.com>
6551 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6552 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6553 of calling sigwaitinfo.
6555 2004-04-16 Ulrich Drepper <drepper@redhat.com>
6557 * allocatestack.c (allocate_stack): Set reported_guardsize
6559 * pthread_getattr_np.c (pthread_getattr_np): Use
6560 reported_guardsize instead of guardsize.
6561 * descr.h (struct pthread): Add reported_guardsize field.
6563 2004-04-13 Jakub Jelinek <jakub@redhat.com>
6565 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6567 2004-04-12 Ulrich Drepper <drepper@redhat.com>
6569 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6571 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6573 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6574 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6575 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6576 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6577 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6579 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6580 (_POSIX_MESSAGE_PASSING): Define.
6581 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6582 (_POSIX_MESSAGE_PASSING): Define.
6583 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6584 (_POSIX_MESSAGE_PASSING): Define.
6586 2004-04-04 Ulrich Drepper <drepper@redhat.com>
6588 * tst-context1.c (fct): Check whether correct stack is used.
6590 2004-04-03 Ulrich Drepper <drepper@redhat.com>
6592 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6593 matching constraints for asm mem parameters.
6595 * tst-clock2.c (tf): Don't define unless needed.
6597 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6599 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6602 2004-03-30 Ulrich Drepper <drepper@redhat.com>
6604 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6605 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6606 * pthreadP.h: Declare __nptl_deallocate_tsd.
6607 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6610 * Makefile (tests): Add tst-tsd5.
6611 * tst-tsd5.c: New file.
6613 2004-03-29 Ulrich Drepper <drepper@redhat.com>
6615 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6616 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6617 is SHLIB_COMPAT check.
6618 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6619 (__pthread_attr_getaffinity_old): Likewise.
6620 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6621 (__pthread_getaffinity_old): Likewise.
6622 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6623 (__pthread_setaffinity_old): Likewise.
6625 2004-03-26 Ulrich Drepper <drepper@redhat.com>
6627 * allocatestack.c (_make_stacks_executable): Call
6628 _dl_make_stack_executable first.
6630 2004-03-24 Roland McGrath <roland@redhat.com>
6632 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6633 constraint instead of "0".
6635 2004-03-24 Ulrich Drepper <drepper@redhat.com>
6637 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6638 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6640 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6641 code to avoid warning.
6643 2004-03-24 Andreas Jaeger <aj@suse.de>
6645 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6646 (__pthread_attr_setaffinity_old): Remove const.
6648 2004-03-23 Ulrich Drepper <drepper@redhat.com>
6650 * sysdeps/unix/sysv/linux/smp.h: New file.
6651 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6652 * init.c: Define __is_smp.
6653 (__pthread_initialize_minimal_internal): Call is_smp_system to
6654 initialize __is_smp.
6655 * pthreadP.h: Declare __is_smp.
6656 Define MAX_ADAPTIVE_COUNT is necessary.
6657 * pthread_mutex_init.c: Add comment regarding __spins field.
6658 * pthread_mutex_lock.c: Implement adaptive mutex type.
6659 * pthread_mutex_timedlock.c: Likewise.
6660 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6661 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6663 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6664 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6665 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6666 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6667 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6668 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6669 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6670 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6671 lll_mutex_cond_trylock.
6672 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6673 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6674 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6675 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6676 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6677 Define BUSY_WAIT_NOP.
6678 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6679 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6681 * tst-mutex5.c: Add support for testing adaptive mutexes.
6682 * tst-mutex7.c: Likewise.
6683 * tst-mutex5a.c: New file.
6684 * tst-mutex7a.c: New file.
6685 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6687 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6688 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6689 vgettimeofday call might destroy the content.
6691 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6694 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6695 No need to restrict type of ret. Make it int. Add comment.
6697 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6698 Remove unnecessary setne instruction.
6700 2004-03-22 Jakub Jelinek <jakub@redhat.com>
6702 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6703 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6704 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6705 If realloc fails, break out of the loop.
6707 2004-03-20 Andreas Jaeger <aj@suse.de>
6709 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6710 (__pthread_setaffinity_old): Fix interface.
6711 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6712 (__pthread_getaffinity_old): Likewise.
6714 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6715 (__pthread_setaffinity_new): Remove duplicate declaration.
6717 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6719 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6720 the return value to a safe register.
6721 (CDISABLE): Set the function argument correctly.
6723 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6725 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6726 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6727 Rewrite so that only one locked memory operation per round is needed.
6728 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6729 (pthread_barrier_wait): After wakeup, release lock only when the
6730 last thread stopped using the barrier object.
6731 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6732 (__pthread_cond_wait): Don't store mutex address if the current
6733 value is ~0l. Add correct cleanup support and unwind info.
6734 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6735 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6736 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6737 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6738 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6739 Add correct cleanup support and unwind info.
6740 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6741 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6742 information for syscall wrappers.
6744 2004-03-18 Ulrich Drepper <drepper@redhat.com>
6746 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6747 cpusetsize field, remove next.
6748 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6749 parameter for size of the CPU set.
6750 (pthread_setaffinity_np): Likewise.
6751 (pthread_attr_getaffinity_np): Likewise.
6752 (pthread_attr_setaffinity_np): Likewise.
6753 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6754 interface change, keep compatibility code.
6755 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6756 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6757 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6758 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6759 __pthread_getaffinity_np.
6760 * Versions: Add version for changed interfaces.
6761 * tst-attr3.c: Adjust test for interface change.
6762 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6763 increasing buffer sizes.
6764 * pthread_attr_destroy.c: Remove unused list handling.
6765 * pthread_attr_init.c: Likewise.
6767 2004-03-17 Roland McGrath <roland@redhat.com>
6769 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6770 first argument to clock_getres so we ever enable kernel timers.
6772 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
6774 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6776 2004-03-12 Richard Henderson <rth@redhat.com>
6778 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6779 oldvalue from CENABLE to CDISABLE.
6781 2004-03-12 Ulrich Drepper <drepper@redhat.com>
6783 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6784 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6785 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6786 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6788 2004-03-11 Richard Henderson <rth@redhat.com>
6790 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6791 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6792 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6794 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6796 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6797 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6798 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6800 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6802 * forward.c (__pthread_cond_broadcast_2_0,
6803 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6804 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6805 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6807 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6809 * sysdeps/sh/tcb-offsets.sym: Add PID.
6810 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6811 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6813 2004-03-10 Ulrich Drepper <drepper@redhat.com>
6815 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6816 include <sysdep-cancel.h>, vfork is no cancellation point.
6817 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6818 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6819 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6821 2004-03-10 Jakub Jelinek <jakub@redhat.com>
6823 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6825 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6826 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6828 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6830 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6831 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6832 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6833 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6834 of DO_CALL_VIA_BREAK. Work around a gas problem.
6836 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6837 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6838 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6839 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6840 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6841 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6843 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6844 a local register for saving old PID. Negate PID in parent upon exit.
6846 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6848 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6849 before syscall, set to the old value in the parent afterwards.
6850 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6851 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6853 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6854 before syscall, set to the old value in the parent afterwards.
6855 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6856 * sysdeps/s390/tcb-offsets.sym: Add PID.
6858 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6859 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6860 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6861 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6862 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6863 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6865 2004-03-10 Andreas Schwab <schwab@suse.de>
6867 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6868 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6869 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6871 2004-03-09 Jakub Jelinek <jakub@redhat.com>
6873 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6874 * tst-cancel21.c (do_one_test): Likewise.
6875 Reported by Gordon Jin <gordon.jin@intel.com>.
6877 2004-02-09 Jakub Jelinek <jakub@redhat.com>
6879 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6880 if non-zero and set to INT_MIN if zero.
6881 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6882 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6883 (SAVE_PID, RESTORE_PID): Define.
6885 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6886 Use relative path to avoid including NPTL i386/vfork.S.
6887 (SAVE_PID, RESTORE_PID): Define.
6888 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6889 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6890 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6892 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6893 * tst-vfork1.c: New test.
6894 * tst-vfork2.c: New test.
6895 * tst-vfork1x.c: New test.
6896 * tst-vfork2x.c: New test.
6898 2004-03-08 Ulrich Drepper <drepper@redhat.com>
6900 * sysdeps/i386/tcb-offsets.sym: Add PID.
6901 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6902 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6903 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6905 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
6907 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6909 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
6911 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6914 2004-03-07 Ulrich Drepper <drepper@redhat.com>
6916 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6919 * tst-once4.c: Remove unnecessary macro definition.
6921 * tst-mutex7.c (do_test): Limit thread stack size.
6922 * tst-once2.c (do_test): Likewise.
6923 * tst-tls3.c (do_test): Likewise.
6924 * tst-tls1.c (do_test): Likewise.
6925 * tst-signal3.c (do_test): Likewise.
6926 * tst-kill6.c (do_test): Likewise.
6927 * tst-key4.c (do_test): Likewise.
6928 * tst-join4.c (do_test): Likewise.
6929 * tst-fork1.c (do_test): Likewise.
6930 * tst-context1.c (do_test): Likewise.
6931 * tst-cond2.c (do_test): Likewise.
6932 * tst-cond10.c (do_test): Likewise.
6933 * tst-clock2.c (do_test): Likewise.
6934 * tst-cancel10.c (do_test): Likewise.
6935 * tst-basic2.c (do_test): Likewise.
6936 * tst-barrier4.c (do_test): Likewise.
6938 2004-03-05 Ulrich Drepper <drepper@redhat.com>
6940 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6942 2004-03-01 Ulrich Drepper <drepper@redhat.com>
6944 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6945 (__pthread_cond_timedwait): Optimize wakeup test.
6946 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6947 (__pthread_cond_wait): Likewise.
6948 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6949 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6952 2004-02-29 Ulrich Drepper <drepper@redhat.com>
6954 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6955 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
6956 the atomic instruction needed.
6957 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6958 (__lll_mutex_lock_wait): Likewise.
6960 2004-02-28 Ulrich Drepper <drepper@redhat.com>
6962 * Makefile (tests): Add tst-cond14 and tst-cond15.
6963 * tst-cond14.c: New file.
6964 * tst-cond15.c: New file.
6966 2004-02-27 Ulrich Drepper <drepper@redhat.com>
6968 * sysdeps/pthread/createthread.c (create_thread): Remove use of
6969 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
6970 needs to be implemented differently to be useful.
6972 2004-02-26 Ulrich Drepper <drepper@redhat.com>
6974 * pthread_attr_setschedparam.c: Don't test priority against limits
6975 here. Set ATTR_FLAG_SCHED_SET flag.
6976 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6977 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6978 from parent thread to child. If attribute is used and scheduling
6979 parameters are not inherited, copy parameters from attribute or
6980 compute them. Check priority value.
6981 * pthread_getschedparam.c: If the parameters aren't known yet get
6982 them from the kernel.
6983 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6984 ATTR_FLAG_POLICY_SET flag for thread.
6985 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6986 and ATTR_FLAG_POLICY_SET.
6988 * sysdeps/pthread/createthread.c: Use tgkill if possible.
6990 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6991 fail if stack address hasn't been set. Just return 0.
6993 2004-02-25 Ulrich Drepper <drepper@redhat.com>
6995 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
6996 libpthread for the files in this list.
6997 (CFLAGS-tst-unload): Removed.
6998 * tst-unload.c (do_test): Don't use complete path for
7001 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7004 2004-02-22 Ulrich Drepper <drepper@redhat.com>
7006 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7007 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7008 operation per round is needed.
7009 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7010 (__lll_mutex_lock_wait): Likewise.
7012 2004-02-20 Ulrich Drepper <drepper@redhat.com>
7014 * tst-cancel9.c (cleanup): Don't print to stderr.
7016 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7018 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7020 2004-02-20 Jakub Jelinek <jakub@redhat.com>
7022 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7023 (__syscall_error_handler2): Call CDISABLE.
7024 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7025 (__syscall_error_handler2): Call CDISABLE.
7027 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7028 Release lock before the loop, don't reacquire it.
7030 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7032 2004-02-19 Andreas Schwab <schwab@suse.de>
7034 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7037 2004-02-18 Ulrich Drepper <drepper@redhat.com>
7039 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7040 (pthread_barrier_wait): After wakeup, release lock only when the
7041 last thread stopped using the barrier object.
7042 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7043 (pthread_barrier_wait): Likewise.
7044 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7046 * Makefile (tests): Add tst-barrier4.
7047 * tst-barrier4.c: New file.
7049 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7050 (__pthread_cond_timedwait): Perform timeout test while holding
7051 internal lock to prevent wakeup race.
7052 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7053 * sysdeps/pthread/pthread_cond_timedwait.c
7054 (__pthread_cond_timedwait): Likewise.
7055 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7056 (__pthread_cond_timedwait): Likewise.
7058 2004-02-18 Jakub Jelinek <jakub@redhat.com>
7060 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7061 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7062 * Makefile (tests): Add tst-rwlock13.
7063 * tst-rwlock13.c: New test.
7065 2004-02-16 Ulrich Drepper <drepper@redhat.com>
7067 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7068 (__condvar_tw_cleanup): Little optimization.
7069 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7071 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
7073 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7074 libpthread as "lib" parameter to SHLIB_COMPAT.
7075 (__novmx_siglongjmp): Fix typo in function name.
7076 (__novmx_longjmp): Fix typo in function name.
7078 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7080 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7083 * sysdeps/generic/pt-longjmp.c: Moved to...
7084 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
7086 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
7088 * Makefile (libpthread-routines): Add pt-cleanup.
7089 * pt-longjmp.c: Removed.
7090 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7091 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7092 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7093 Version longjmp, siglongjmp for GLIBC_2.3.4.
7094 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7096 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7098 * sysdeps/pthread/pthread_cond_timedwait.c
7099 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
7100 Reuse code. Add __builtin_expects.
7102 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7103 (__pthread_cond_timedwait): Get internal lock in case timeout has
7104 passed before the futex syscall.
7105 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7107 2004-01-20 Ulrich Drepper <drepper@redhat.com>
7109 * allocatestack.c: Pretty printing.
7111 * sysdeps/pthread/createthread.c (create_thread): Don't add
7112 CLONE_DETACHED bit if it is not necessary.
7114 2004-01-16 Ulrich Drepper <drepper@redhat.com>
7116 * pthread_getattr_np.c: Include ldsodefs.h.
7118 2004-01-16 Richard Henderson <rth@redhat.com>
7120 * allocatestack.c: Don't declare __libc_stack_end.
7121 * init.c (__pthread_initialize_minimal_internal): Likewise.
7122 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7124 2004-01-15 Richard Henderson <rth@redhat.com>
7126 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7127 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7128 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7129 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7130 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7131 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7132 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7133 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7135 2004-01-14 Ulrich Drepper <drepper@redhat.com>
7137 * init.c (pthread_functions): Make array const.
7139 2004-01-13 Ulrich Drepper <drepper@redhat.com>
7141 * allocatestack.c (__make_stacks_executable): Change interface.
7142 Check parameters. Pass parameter on to libc counterpart.
7143 * pthreadP.h: Change declaration.
7145 2004-01-13 Richard Henderson <rth@redhat.com>
7147 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7149 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7152 * sysdeps/alpha/Makefile: New file.
7153 * sysdeps/alpha/tcb-offsets.sym: New file.
7154 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7155 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7157 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7160 2004-01-08 Jakub Jelinek <jakub@redhat.com>
7162 * Makefile (tests): Add tst-backtrace1.
7163 * tst-backtrace1.c: New test.
7165 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7167 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7168 register as second parameter to the REGISTER macro.
7169 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7170 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7171 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7172 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7173 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7174 of thread register as second parameter to REGISTER macro in 64 case.
7176 2004-01-03 Ulrich Drepper <drepper@redhat.com>
7178 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7179 (CFLAGS-getpid.o): Defined.
7180 (CFLAGS-getpid.os): Defined.
7182 2003-12-31 Ulrich Drepper <drepper@redhat.com>
7184 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7185 returned for main thread does not overlap with any other VMA.
7186 Patch by Jakub Jelinek.
7188 2003-12-29 Jakub Jelinek <jakub@redhat.com>
7190 * tst-raise1.c: Include stdio.h.
7192 2003-12-23 Jakub Jelinek <jakub@redhat.com>
7194 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7195 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7196 If pid is 0, set it to selftid.
7197 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7198 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7199 != 0, return self->tid without doing a syscall.
7200 * descr.h (struct pthread): Move pid field after tid.
7202 * Makefile (tests): Add tst-raise1.
7203 * tst-raise1.c: New file.
7205 2003-12-23 Roland McGrath <roland@redhat.com>
7207 * tst-oddstacklimit.c: New file.
7208 * Makefile (tests): Add it.
7209 (tst-oddstacklimit-ENV): New variable.
7211 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7212 value up to page size for __default_stacksize.
7214 2003-12-21 Ulrich Drepper <drepper@redhat.com>
7216 * Makefile (tests): Add tst-eintr5.
7217 * tst-eintr5.c: New file.
7219 * eintr.c (eintr_source): Prevent sending signal to self.
7221 * tst-eintr2.c (tf1): Improve error message.
7223 2003-12-20 Ulrich Drepper <drepper@redhat.com>
7225 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7226 * sysdeps/unix/sysv/linux/getpid.c: New file.
7227 * pthread_cancel.c: Add comment explaining use of PID field.
7228 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7229 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7230 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7231 temporarily to signal the field must not be relied on and updated
7233 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7234 temporarily negative.
7235 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7237 2003-12-19 Ulrich Drepper <drepper@redhat.com>
7239 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7240 (eintr_source): If ARG != NULL, use pthread_kill.
7241 * tst-eintr1.c: Adjust for this change.
7242 * tst-eintr2.c: Likewise.
7243 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7244 * tst-eintr3.c: New file.
7245 * tst-eintr4.c: New file.
7247 2003-12-19 Jakub Jelinek <jakub@redhat.com>
7249 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7250 if CANCELSTATE_BITMASK is set.
7251 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7254 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7255 (tests-reverse): Add tst-cancel23.
7256 * tst-cancel22.c: New test.
7257 * tst-cancel23.c: New test.
7259 2003-12-18 Ulrich Drepper <drepper@redhat.com>
7261 * tst-eintr1.c: Better error messages.
7263 * Makefile (tests): Add tst-eintr2.
7264 * tst-eintr2.c: New file.
7266 2003-12-18 Jakub Jelinek <jakub@redhat.com>
7268 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7269 (CFLAGS-tst-cancelx21.c): Set.
7270 * tst-cancel21.c: New test.
7271 * tst-cancelx21.c: New test.
7273 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7275 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7276 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7277 * pt-longjmp.c: Include jmpbuf-unwind.h.
7278 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7279 _JMPBUF_UNWINDS. Adjust compared pointers.
7280 * init.c (__pthread_initialize_minimal_internal): Initialize
7281 pd->stackblock_size.
7282 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7283 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7284 * sysdeps/i386/jmpbuf-unwind.h: New file.
7285 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7286 * sysdeps/s390/jmpbuf-unwind.h: New file.
7287 * sysdeps/sh/jmpbuf-unwind.h: New file.
7288 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7289 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7290 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7291 (_JMPBUF_CFA_UNWINDS): Remove.
7292 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7294 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7296 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7297 (CFLAGS-tst-cancelx20.c): Set.
7298 * tst-cancel20.c: New test.
7299 * tst-cancelx20.c: New test.
7301 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7303 * init.c (__pthread_initialize_minimal_internal): Don't treat
7304 architectures with separate register stack special here when
7305 computing default stack size.
7307 2003-12-17 Roland McGrath <roland@redhat.com>
7309 * Makefile (tst-cancelx7-ARGS): New variable.
7310 Reportd by Greg Schafer <gschafer@zip.com.au>.
7312 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7314 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7315 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7316 (tst-stack3-ENV): Set.
7317 ($(objpfx)tst-stack3-mem): New.
7318 * tst-stack3.c: New test.
7320 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7322 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7323 Add unwind directives. Drop unused .regstk directive.
7324 (_fini_EPILOG_BEGINS): Add unwind directives.
7326 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7328 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7329 Assume parameter is a pointer.
7330 (lll_futex_wake): Likewise.
7331 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7333 (lll_futex_wake): Likewise.
7334 Reported by Boris Hu.
7335 * sysdeps/unix/sysv/linux/unregister-atfork.c
7336 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7338 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7340 2003-12-10 Ulrich Drepper <drepper@redhat.com>
7342 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7343 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7344 __rtld_lock_initialize for ld.so lock.
7345 Patch in part by Adam Li <adam.li@intel.com>.
7347 2003-12-02 David Mosberger <davidm@hpl.hp.com>
7349 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7350 in $(gnulib). Also, remove stale comment.
7352 2003-11-12 David Mosberger <davidm@hpl.hp.com>
7354 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7355 advantage of new syscall stub and optimize accordingly.
7357 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7358 from SYS_futex, to match expectations of
7359 sysdep.h:DO_INLINE_SYSCALL.
7360 (lll_futex_clobbers): Remove.
7361 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7362 (lll_futex_wake): Likewise.
7363 (lll_futex_requeue): Likewise.
7364 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7365 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7367 (__lll_mutex_lock): Likewise.
7368 (__lll_mutex_cond_lock): Likewise.
7369 (__lll_mutex_timed_lock): Likewise.
7370 (__lll_mutex_unlock): Likewise.
7371 (__lll_mutex_unlock_force): Likewise.
7373 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7374 comes before the include of <sysdep.h>.
7375 (THREAD_SELF_SYSINFO): New macro.
7376 (THREAD_SYSINFO): Likewise.
7377 (INIT_SYSINFO): New macro.
7378 (TLS_INIT_TP): Call INIT_SYSINFO.
7380 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7382 * sysdeps/pthread/createthread.c (create_thread): Use
7383 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7384 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7385 THREAD_SELF_SYSINFO instead of open code.
7386 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7387 (THREAD_SYSINFO): Likewise.
7389 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7391 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7393 2003-12-06 Ulrich Drepper <drepper@redhat.com>
7395 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7396 instead of .init. Patch by David Mosberger.
7398 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
7400 * sysdeps/pthread/configure.in: Remove broken declaration in C
7401 cleanup handling check.
7403 2003-11-30 Andreas Jaeger <aj@suse.de>
7405 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7406 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7409 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7411 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7412 * pthread_attr_destroy.c: Include shlib-compat.h.
7413 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7414 is set in iattr->flags.
7415 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7417 2003-11-21 Jakub Jelinek <jakub@redhat.com>
7419 * Makefile (distribute): Add tst-cleanup4aux.c.
7421 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7424 2003-11-21 Ulrich Drepper <drepper@redhat.com>
7426 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7427 pthread_cond_signal.
7429 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7430 store mutex address if the current value is ~0l.
7431 * sysdeps/pthread/pthread_cond_timedwait.c
7432 (__pthread_cond_timedwait): Likewise.
7433 * sysdeps/pthread/pthread_cond_broadcast.c
7434 (__pthread_cond_broadcast): Don't use requeue for pshared
7437 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7438 (__pthread_cond_wait): Don't store mutex address if the current
7440 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7441 (__pthread_cond_timedwait): Likewise.
7442 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7443 (__pthread_cond_broadcast): Don't use requeue for pshared
7446 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7447 element with ~0l for pshared condvars, with NULL otherwise.
7449 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7450 (__pthread_cond_wait): Don't store mutex address if the current
7452 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7453 (__pthread_cond_timedwait): Likewise.
7454 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7455 (__pthread_cond_broadcast): Don't use requeue for pshared
7458 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7459 * tst-cond12.c: New file.
7460 * tst-cond13.c: New file.
7462 2003-11-17 Ulrich Drepper <drepper@redhat.com>
7464 * sysdeps/pthread/configure.in: Make missing forced unwind support
7467 2003-11-11 Ulrich Drepper <drepper@redhat.com>
7469 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7471 2003-11-06 Ulrich Drepper <drepper@redhat.com>
7473 * Makefile: Add magic to clean up correctly.
7475 2003-11-05 Jakub Jelinek <jakub@redhat.com>
7477 * unwind.c (FRAME_LEFT): Define.
7478 (unwind_stop): Handle old style cleanups here.
7479 (__pthread_unwind): Handle old style cleanups only if
7480 !HAVE_FORCED_UNWIND.
7481 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7482 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7483 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7484 ($(objpfx)tst-cleanupx4): Likewise.
7485 * tst-cleanup4.c: New test.
7486 * tst-cleanup4aux.c: New.
7487 * tst-cleanupx4.c: New test.
7489 2003-11-04 Ulrich Drepper <drepper@redhat.com>
7491 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7492 lll_mutex_*lock macros to skip atomic operations on some archs.
7494 2003-11-03 Ulrich Drepper <drepper@redhat.com>
7496 * sysdeps/pthread/tst-timer.c (main): Initialize
7497 sigev2.sigev_value as well.
7499 2003-10-15 Roland McGrath <roland@redhat.com>
7501 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7503 * sysdeps/pthread/configure: Regenerated.
7505 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7507 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7508 locking macros. No distinction between normal and mutex locking
7510 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7511 Merge bits from lowlevelmutex.S we still need.
7512 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7513 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7514 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7515 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7516 new mutex implementation.
7517 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7518 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7519 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7520 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7521 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7522 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7523 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7524 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7525 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7526 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7527 symbol for entry point to avoid cancellation.
7529 2003-10-07 Jakub Jelinek <jakub@redhat.com>
7531 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7533 (SAVE_OLDTYPE_0): Fix a typo.
7535 2003-10-03 Ulrich Drepper <drepper@redhat.com>
7537 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7538 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7540 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7542 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7545 2003-10-02 Jakub Jelinek <jakub@redhat.com>
7547 * Makefile (tests): Add tst-cancel19.
7548 * tst-cancel19.c: New test.
7550 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7552 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7553 restoring of the old cancellation type.
7555 2003-09-30 Jakub Jelinek <jakub@redhat.com>
7557 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7559 2003-09-27 Wolfram Gloger <wg@malloc.de>
7561 * sysdeps/pthread/malloc-machine.h: New file
7563 2003-09-24 Roland McGrath <roland@redhat.com>
7565 * allocatestack.c (__make_stacks_executable): Don't ignore return
7566 value from _dl_make_stack_executable.
7568 2003-09-24 Ulrich Drepper <drepper@redhat.com>
7570 * allocatestack.c (__make_stacks_executable): Also change
7571 permission of the currently unused stacks.
7573 * allocatestack.c (change_stack_perm): Split out from
7574 __make_stacks_executable.
7575 (allocate_stack): If the required permission changed between the time
7576 we started preparing the stack and queueing it, change the permission.
7577 (__make_stacks_executable): Call change_stack_perm.
7579 * Makefile: Build tst-execstack-mod locally.
7580 * tst-execstack-mod.c: New file.
7582 2003-09-23 Jakub Jelinek <jakub@redhat.com>
7584 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7586 2003-09-23 Roland McGrath <roland@redhat.com>
7588 * tst-execstack.c: New file.
7589 * Makefile (tests): Add it.
7590 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7591 (LDFLAGS-tst-execstack): New variable.
7593 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7594 whether to use PROT_EXEC for stack mmap.
7595 (__make_stacks_executable): New function.
7596 * pthreadP.h: Declare it.
7597 * init.c (__pthread_initialize_minimal_internal): Set
7598 GL(dl_make_stack_executable_hook) to that.
7600 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7602 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7603 recommendation from AMD re avoidance of lock prefix.
7605 2003-09-22 Jakub Jelinek <jakub@redhat.com>
7607 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7608 lll_futex_timed_wait instead of lll_futex_wait.
7609 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7610 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7611 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7612 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7613 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7614 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7615 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7616 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7617 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7618 Completely revamp the locking macros. No distinction between
7619 normal and mutex locking anymore.
7620 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7621 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7622 __lll_lock_timedwait): Fix prototypes.
7623 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7624 __lll_lock_timedwait): Likewise.
7625 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7626 macros, add __builtin_expect.
7627 (lll_mutex_timedlock): Likewise. Fix return value.
7628 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7629 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7630 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7631 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7632 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7633 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7634 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7635 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7637 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7639 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7640 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7641 operation if possible.
7643 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7644 like jumping over the lock prefix.
7646 2003-09-21 Ulrich Drepper <drepper@redhat.com>
7648 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7649 locking macros. No distinction between normal and mutex locking
7651 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7652 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7653 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7654 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7655 locking. Merge bits from lowlevelmutex.S we still need.
7656 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7657 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7658 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7659 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7660 * Makefile (routines): Remove libc-lowlevelmutex.
7661 (libpthread-rountines): Remove lowlevelmutex.
7662 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7663 for new mutex implementation.
7664 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7665 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7666 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7667 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7668 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7670 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7672 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7673 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7674 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7675 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7676 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7677 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7678 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7679 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7681 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7683 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7684 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7685 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7687 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7688 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7690 2003-09-20 Ulrich Drepper <drepper@redhat.com>
7692 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7693 in parameters of asm with output parameters.
7695 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7696 type of DECR parameter to int.
7697 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7699 2003-09-18 Jakub Jelinek <jakub@redhat.com>
7701 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7702 guardsize for each thread.
7704 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7706 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7707 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7708 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7710 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7711 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7713 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7714 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7715 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7716 (pthread_getaffinity_np): Add hidden_def.
7718 * Makefile (tests): Add tst-attr3.
7719 * tst-attr3.c: New test.
7721 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7723 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7725 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7726 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7728 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7730 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7731 * tst-align.c: Include tst-stack-align.h.
7732 (tf, do_test): Use TEST_STACK_ALIGN macro.
7734 2003-09-17 Ulrich Drepper <drepper@redhat.com>
7736 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7739 2003-09-16 Ulrich Drepper <drepper@redhat.com>
7741 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7742 stack-related values for the initial thread.
7744 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7746 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7748 2003-09-11 Ulrich Drepper <drepper@redhat.com>
7750 * pthread_mutex_lock.c: Minor code rearrangements.
7752 2003-09-05 Roland McGrath <roland@redhat.com>
7754 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7755 Instead, include ../nptl_db/db_info.c to do its magic.
7756 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7757 (__pthread_pthread_key_2ndlevel_size): Likewise.
7758 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7759 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7760 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7761 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7762 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7763 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7764 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7765 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7766 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7767 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7768 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7769 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7770 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7771 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7772 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7773 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7774 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7776 2003-09-08 Ulrich Drepper <drepper@redhat.com>
7778 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7779 of pthread_t to be compatible with LT.
7780 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7781 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7782 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7783 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7784 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7785 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7786 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7788 2003-09-04 Ulrich Drepper <drepper@redhat.com>
7790 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7792 2003-09-04 Jakub Jelinek <jakub@redhat.com>
7794 * unwind-forcedunwind.c: Move to...
7795 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7796 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7797 * sysdeps/pthread/jmpbuf-unwind.h: New file.
7798 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7799 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7800 * unwind.c: Include jmpbuf-unwind.h.
7801 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7803 2003-09-02 Jakub Jelinek <jakub@redhat.com>
7805 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7806 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7807 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7808 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7809 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7810 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7811 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7812 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7813 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7814 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7815 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7817 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7818 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7819 * Makefile (tests): Add tst-stack2.
7820 * tst-stack2.c: New test.
7821 * tst-stack1.c: Include limits.h and sys/param.h.
7822 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7824 * pthread_condattr_setpshared.c: Include errno.h.
7825 (pthread_condattr_setpshared): Return EINVAL if pshared
7826 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7828 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7829 defined symbol for entry point to avoid cancellation.
7830 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7832 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7834 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7836 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7838 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7840 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7841 __close_nocancel, __read_nocancel, __write_nocancel,
7842 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7843 libpthread.so or librt.so, define to corresponding function
7844 without _nocancel suffix.
7845 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7846 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7847 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7849 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7851 2003-09-02 Ulrich Drepper <drepper@redhat.com>
7853 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7854 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7856 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7857 in subsections has a symbol associated with it.
7859 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7860 defined symbol for entry point to avoid cancellation.
7861 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7863 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7865 * Makefile (tests): Add tst-tls5.
7866 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7867 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7868 ($(objpfx)tst-tls5): New.
7869 ($(objpfx)tst-tls6.out): Likewise.
7870 (tests): Depend on $(objpfx)tst-tls6.out.
7871 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7872 (do_test): Check pthread_self () return value alignment.
7873 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7874 (tf): Check pthread_self () return value alignment.
7875 * tst-tls5.c: New test.
7877 * tst-tls5mod.c: New.
7878 * tst-tls5moda.c: New.
7879 * tst-tls5modb.c: New.
7880 * tst-tls5modc.c: New.
7881 * tst-tls5modd.c: New.
7882 * tst-tls5mode.c: New.
7883 * tst-tls5modf.c: New.
7884 * tst-tls6.sh: New test.
7886 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7887 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7888 * init.c (pthread_functions): Initialize them.
7889 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7890 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7891 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7892 pthread_cond_timedwait@@GLIBC_2.3.2.
7894 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7896 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7897 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7898 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7899 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7900 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7901 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7903 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7905 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7906 _POSIX_THREAD_PRIORITY_SCHEDULING.
7907 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7909 2003-08-31 Ulrich Drepper <drepper@redhat.com>
7911 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7912 nested function, use static inline function from libio.h.
7913 Code by Richard Henderson.
7915 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7918 2003-08-30 Jakub Jelinek <jakub@redhat.com>
7920 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7921 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7922 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7923 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7924 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7925 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7926 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7927 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7928 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7929 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7930 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7931 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7932 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7933 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7934 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7935 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7936 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7937 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7938 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7939 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7940 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7941 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7942 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7943 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7944 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7945 * sysdeps/sparc/tls.h: New file.
7946 * sysdeps/sparc/tcb-offsets.sym: New file.
7947 * sysdeps/sparc/Makefile: New file.
7948 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7949 * init.c [__sparc__] (__NR_set_tid_address): Define.
7951 2003-08-29 Jakub Jelinek <jakub@redhat.com>
7953 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7954 _IO_release_lock): Define.
7956 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
7958 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7959 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
7961 2003-08-27 Ulrich Drepper <drepper@redhat.com>
7963 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7964 (__pthread_cleanup_class): Add missing return types of member
7967 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
7969 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7970 (lll_mutex_unlock_force): Add memory barrier between store and futex
7973 2003-08-25 Ulrich Drepper <drepper@redhat.com>
7975 * tst-cancel4.c (do_test): Also unlink tempfname and remove
7976 tempmsg in first loop.
7978 2003-08-18 Ulrich Drepper <drepper@redhat.com>
7980 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7981 _POSIX_THREAD_PRIORITY_SCHEDULING.
7982 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7984 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7986 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7987 (__rtld_lock_default_lock_recursive,
7988 __rtld_lock_default_unlock_recursive): Define.
7989 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7990 __rtld_lock_unlock_recursive): Define using
7991 GL(_dl_rtld_*lock_recursive).
7992 * init.c (__pthread_initialize_minimal_internal): Initialize
7993 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7994 Lock GL(_dl_load_lock) the same number of times as
7995 GL(_dl_load_lock) using non-mt implementation was nested.
7997 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7998 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8000 2003-08-06 Jakub Jelinek <jakub@redhat.com>
8002 * tst-cancel17.c (do_test): Make len2 maximum of page size and
8005 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8007 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8009 2003-08-03 Jakub Jelinek <jakub@redhat.com>
8011 * sysdeps/pthread/createthread.c (do_clone): Move error handling
8012 to first syscall error check. Move syscall error check for tkill
8013 into __ASSUME_CLONE_STOPPED #ifdef.
8015 2003-08-02 Ulrich Drepper <drepper@redhat.com>
8017 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8018 is not defined, do explicit synchronization.
8019 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
8020 is not defined also unlock pd->lock for non-debugging case in case
8022 * pthread_create.c (start_thread): Always get and release pd->lock
8023 if __ASSUME_CLONE_STOPPED is not defined.
8024 (start_thread_debug): Removed. Adjust users.
8025 * allocatestack.c (allocate_stack): Always initialize lock if
8026 __ASSUME_CLONE_STOPPED is not defined.
8027 * Makefile (tests): Add tst-sched1.
8028 * tst-sched1.c: New file.
8030 * sysdeps/pthread/createthread.c (do_clone): Only use
8031 sched_setschduler and pass correct parameters.
8033 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8035 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8036 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8037 PTHREAD_STACK_MIN in comments.
8039 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8041 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8042 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8044 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8045 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8046 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8047 (__pthread_cleanup_upto): Fix prototype.
8048 (_longjmp_unwind): Adjust caller.
8049 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8050 Change second argument to const struct pointer.
8051 * tst-sem8.c (main): Remove unused s2 and s3 variables.
8052 * tst-sem9.c (main): Likewise.
8053 * unwind.c: Include string.h for strlen prototype.
8055 2003-07-31 Ulrich Drepper <drepper@redhat.com>
8057 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8058 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8059 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8061 Patch by Nicholas Miell <nmiell@attbi.com>.
8063 2003-07-30 Jakub Jelinek <jakub@redhat.com>
8065 * init.c (__pthread_initialize_minimal_internal): Initialize
8066 GL(dl_init_static_tls).
8067 * pthreadP.h (__pthread_init_static_tls): New prototype.
8068 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8070 * Makefile (tests): Add tst-tls4.
8071 (modules-names): Add tst-tls4moda and tst-tls4modb.
8072 ($(objpfx)tst-tls4): Link against libdl and libpthread.
8073 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8075 * tst-tls4.c: New file.
8076 * tst-tls4moda.c: New file.
8077 * tst-tls4modb.c: New file.
8079 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
8081 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8082 before __timer_dealloc.
8083 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8084 Don't call list_unlink.
8086 2003-07-29 Roland McGrath <roland@redhat.com>
8088 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8090 2003-07-25 Jakub Jelinek <jakub@redhat.com>
8092 * tst-cancel17.c (do_test): Check if aio_cancel failed.
8093 Don't reuse struct aiocb A if it failed.
8094 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8095 not just one byte, as that does not block.
8097 2003-07-22 Jakub Jelinek <jakub@redhat.com>
8099 * sysdeps/pthread/unwind-resume.c: New file.
8100 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8101 unwind-resume in csu subdir.
8102 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8104 (librt-sysdep_routines, librt-shared-only-routines): Add
8106 * sysdeps/pthread/rt-unwind-resume.c: New file.
8107 * unwind-forcedunwind.c: New file.
8108 * Makefile (libpthread-routines): Add unwind-forcedunwind.
8109 (libpthread-shared-only-routines): Likewise.
8110 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8111 * pthreadP.h (pthread_cancel_init): New prototype.
8112 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8114 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8115 attr argument const struct pthread_attr *.
8117 * res.c (__res_state): Return __resp.
8118 * descr.h: Include resolv.h.
8119 (struct pthread): Add res field.
8120 * pthread_create.c: Include resolv.h.
8121 (start_thread): Initialize __resp.
8122 * Makefile (tests): Add tst-_res1.
8123 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8124 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8125 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8127 * tst-_res1.c: New file.
8128 * tst-_res1mod1.c: New file.
8129 * tst-_res1mod2.c: New file.
8131 2003-07-21 Ulrich Drepper <drepper@redhat.com>
8133 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8135 * Makefile: Define various *-no-z-defs variables for test DSOs
8136 which has undefined symbols.
8138 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8140 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8141 Retry if the stwcx fails to store once_control.
8143 2003-07-20 Ulrich Drepper <drepper@redhat.com>
8145 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8146 pthread_attr_setaffinity.
8147 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8148 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8149 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8150 * pthread_attr_destroy.c: Free cpuset element if allocated.
8151 * pthread_create.c: Pass iattr as additional parameter to
8153 * sysdeps/pthread/createthread.c: If attribute is provided and
8154 a new thread is created with affinity set or scheduling parameters,
8155 start thread with CLONE_STOPPED.
8156 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8157 pthread_attr_setaffinity.
8158 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8161 2003-07-15 Ulrich Drepper <drepper@redhat.com>
8163 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8165 2003-07-14 Ulrich Drepper <drepper@redhat.com>
8167 * sysdeps/pthread/configure.in: Require CFI directives also for
8170 2003-07-15 Jakub Jelinek <jakub@redhat.com>
8172 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8175 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8177 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8179 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8180 registers as variables. Call __pthread_mutex_unlock_usercnt.
8181 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8182 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8183 not self pointer in __writer. Compare with TID to determine
8185 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8186 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8188 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8190 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8191 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8192 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8193 macros also when compiling librt.
8195 2003-07-11 Jakub Jelinek <jakub@redhat.com>
8197 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8198 -fasynchronous-unwind-tables.
8199 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8200 (PSEUDO): Add cfi directives.
8201 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8203 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8206 2003-07-08 Jakub Jelinek <jakub@redhat.com>
8208 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8209 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8210 * unwind.c (__pthread_unwind_next): Add hidden_def.
8211 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8213 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8214 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8215 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8217 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8218 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8220 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8221 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8222 __pthread_unregister_cancel and __pthread_unwind_next.
8224 2003-07-04 Jakub Jelinek <jakub@redhat.com>
8226 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8227 different symbol for the cancellation syscall wrapper and
8228 non-cancellation syscall wrapper.
8229 (PSEUDO_END): Define.
8231 2003-07-05 Richard Henderson <rth@redhat.com>
8233 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8234 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8235 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8236 return actual return value from the syscall, not 0.
8238 2003-07-07 Ulrich Drepper <drepper@redhat.com>
8240 * descr.h (struct pthread): Add pid field.
8241 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8242 (__reclaim_stacks): Likewise.
8243 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8244 also check for PID of the signal source.
8245 (__pthread_initialize_minimal_internal): Also initialize pid field
8246 of initial thread's descriptor.
8247 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8248 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8249 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8250 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8251 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8253 2003-07-05 Ulrich Drepper <drepper@redhat.com>
8255 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8256 Fix use of parameter.
8257 (__libc_cleanup_pop): Likewise.
8259 2003-07-04 Ulrich Drepper <drepper@redhat.com>
8261 * init.c (sigcancel_handler): Change parameters to match handler
8262 for SA_SIGACTION. Check signal number and code to recognize
8263 invalid invocations.
8265 2003-07-03 Roland McGrath <roland@redhat.com>
8267 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8268 Apply sizeof (struct pthread) bias to r13 value.
8270 2003-07-03 Ulrich Drepper <drepper@redhat.com>
8272 * sysdeps/pthread/configure.in: Require CFI directives.
8274 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8276 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8277 libpthread compilation.
8278 * unwind.c (__pthread_unwind): Add hidden_def.
8279 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8281 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8283 * libc-cancellation.c (__libc_cleanup_routine): Define.
8284 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8285 (__pthread_cleanup_pop): Define.
8287 2003-07-01 Richard Henderson <rth@redhat.com>
8289 * sysdeps/alpha/elf/pt-initfini.c: New file.
8290 * sysdeps/alpha/pthread_spin_lock.S: New file.
8291 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8292 * sysdeps/alpha/pthreaddef.h: New file.
8293 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8294 * sysdeps/alpha/tls.h: New file.
8295 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8296 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8297 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8298 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8299 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8300 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8301 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8302 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8303 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8304 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8306 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8308 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8309 cleanup support and unwind info.
8311 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8313 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8314 Use correct cleanup handler registration. Add unwind info.
8315 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8316 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8317 * tst-once3.c: Add cleanup handler and check it is called.
8318 * tst-once4.c: Likewise.
8319 * tst-oncex3.c: New file.
8320 * tst-oncex4.c: New file.
8321 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8323 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8325 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8327 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8329 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8330 (tf_msgsnd): Likewise.
8332 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8333 premature returns a bit more.
8335 2003-06-26 Ulrich Drepper <drepper@redhat.com>
8337 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8338 definition to the front.
8340 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8341 the cleanup functions to make the names unique. Fix dwarf opcode
8343 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8344 functions to make the names unique. Fix CFA offset for two blocks.
8346 2003-06-25 Ulrich Drepper <drepper@redhat.com>
8348 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8349 missing closing braces.
8350 Patch by Christophe Saout <christophe@saout.de>.
8352 2003-06-24 Roland McGrath <roland@redhat.com>
8354 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8356 2003-06-24 Ulrich Drepper <drepper@redhat.com>
8358 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8359 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8361 * pthreadP.h: Declare __find_thread_by_id.
8362 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8363 * pthread_clock_gettime.c: Allow using other thread's clock.
8364 * pthread_clock_settime.c: Likewise.
8365 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8366 * Makefile: Add rules to build and run tst-clock2.
8367 * tst-clock2.c: New file.
8369 2003-06-23 Ulrich Drepper <drepper@redhat.com>
8371 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8372 to use exception-based cleanup handler.
8373 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8375 * tst-cond8.c (ch): Announce that we are done.
8377 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8379 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8380 Also test aio_suspend with timeout value.
8382 2003-06-22 Ulrich Drepper <drepper@redhat.com>
8384 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8385 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8388 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8389 (__pthread_mutex_lock_internal): Likewise.
8390 (__pthread_mutex_unlock_internal): Likewise.
8391 (__pthread_mutex_unlock_usercnt): Declare.
8392 * pthread_mutex_destroy.c: Always fail if used in any way.
8393 * pthread_mutex_init.c: Update comment.
8394 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8395 * pthread_mutex_timedlock.c: Adjust __nusers.
8396 * pthread_mutex_trylock.c: Adjust __nusers.
8397 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8398 and public interfaces are wrapper with pass additional parameter.
8399 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8401 * tst-mutex8.c: New file.
8402 * Makefile (tests): Add tst-mutex8.
8403 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8404 __pthread_mutex_unlock_usercnt.
8405 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8406 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8407 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8408 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8409 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8410 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8411 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8413 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8414 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8415 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8416 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8417 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8419 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8420 * pthread_mutex_timedlock.c: Likewise.
8421 * pthread_mutex_trylock.c: Adjust __nusers.
8422 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8423 * tst-mutex9.c: New file.
8424 * Makefile (tests): Add tst-mutex9.
8425 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8426 * sysdeps/ia64/tls.h: Likewise.
8427 * sysdeps/powerpc/tls.h: Likewise.
8428 * sysdeps/s390/tls.h: Likewise.
8429 * sysdeps/sh/tls.h: Likewise.
8430 * sysdeps/x86_64/tls.h: Likewise.
8431 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8432 Change type of __owner.
8433 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8434 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8435 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8436 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8437 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8439 2003-06-19 Jakub Jelinek <jakub@redhat.com>
8441 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8442 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8444 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8445 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8446 instead of nr to lll_futex_wake. Only set errno and return -1
8449 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8450 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8451 return actual return value from the syscall, not 0.
8453 2003-06-18 Ulrich Drepper <drepper@redhat.com>
8455 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8456 find a random value.
8457 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8460 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8461 compat_timer_settime.
8462 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8463 compat_timer_gettime.
8464 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8465 compat_timer_getoverrun.
8466 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8467 compat_timer_delete.
8469 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8470 error-checking mutex detect busy mutexes.
8472 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8474 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8475 Add ax to clobber list.
8476 (lll_mutex_cond_lock): Likewise.
8477 (lll_mutex_unlock): Likewise.
8478 (lll_lock): Likewise.
8479 (lll_unlock): Likewise.
8481 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8482 * tst-cancel18.c: New file.
8483 * tst-cancelx18.c: New file.
8485 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8488 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8489 * tst-cancel17.c: New file.
8490 * tst-cancelx17.c: New file.
8492 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8493 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8494 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8496 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8498 2003-06-16 Jakub Jelinek <jakub@redhat.com>
8500 * sysdeps/pthread/createthread.c (create_thread): Set
8501 header.multiple_threads unconditionally.
8502 * allocatestack.c (allocate_stack): Likewise.
8503 * descr.h (struct pthread): Add header.multiple_threads
8505 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8506 Define for librt. #error if neither libpthread, libc nor librt.
8507 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8509 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8510 CDISABLE): Likewise.
8511 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8512 CDISABLE): Likewise.
8513 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8514 CDISABLE): Likewise.
8515 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8516 CDISABLE): Likewise. Access header.multiple_threads outside of
8517 libc and libpthread.
8518 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8520 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8521 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8523 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8525 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8526 Also test early cancellation before the thread reaches the cancellation
8529 * Makefile: Compile forward.c with exceptions.
8531 * sysdeps/unix/sysv/linux/sleep.c: New file.
8533 2003-06-16 Ulrich Drepper <drepper@redhat.com>
8535 * Makefile: Add CFLAGS definition to compile function wrappers
8536 duplicated from libc with exceptions.
8537 * tst-cancel4.c: Also check cancellation handlers.
8539 * Makefile: Add rules to build and run tst-cancel16 and
8540 tst-cancelx16. Add missing CFLAGS definitions.
8541 * tst-cancel16.c: New file.
8542 * tst-cancelx16.c: New file.
8544 2003-06-15 Ulrich Drepper <drepper@redhat.com>
8546 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8547 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8548 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8549 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8551 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8552 (LIBC_CANCEL_RESET): Likewise.
8553 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8554 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8556 (CFLAGS-libcrt-cancellation.c): Define.
8557 * sysdeps/pthread/librt-cancellation.c: New file.
8558 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8559 macros also when compiling librt.
8560 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8561 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8562 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8563 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8564 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8565 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8566 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8568 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8569 compat_timer_create.
8571 2003-06-14 Ulrich Drepper <drepper@redhat.com>
8573 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8575 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8577 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8578 Add libc_hidden_def.
8580 2003-06-13 Roland McGrath <roland@redhat.com>
8582 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8583 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8585 2003-06-11 Ulrich Drepper <drepper@redhat.com>
8587 * allocatestack.c (queue_stack): Always inline.
8588 * ptreadhP.h (__do_cancel): Likewise.
8590 2003-06-10 Jakub Jelinek <jakub@redhat.com>
8592 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8595 2003-06-10 Ulrich Drepper <drepper@redhat.com>
8597 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8598 (__pthread_cond_signal): Remove incorrect second addition for
8601 2003-06-09 Ulrich Drepper <drepper@redhat.com>
8603 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8604 (__pthread_cond_signal): Use correct futex pointer in
8605 __lll_mutex_lock_wait call.
8607 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8608 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8610 2003-06-08 Ulrich Drepper <drepper@redhat.com>
8612 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8614 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8617 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8618 hand-written CFI generation code. Since ENTRY/END also initiated
8619 CFI frames this caused two CFI sets to be generated.
8621 2003-06-07 Ulrich Drepper <drepper@redhat.com>
8623 * cleanup_routine.c: New file.
8624 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8625 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8627 * Makefile (libpthread-routines): Add cleanup_routine.
8628 Add more CFLAGS variables to compile with exceptions. Add comments
8629 why which file needs unwind tables.
8630 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8632 * tst-cancelx1.c: New file.
8633 * tst-cancelx2.c: New file.
8634 * tst-cancelx3.c: New file.
8635 * tst-cancelx4.c: New file.
8636 * tst-cancelx5.c: New file.
8637 * tst-cancelx6.c: New file.
8638 * tst-cancelx7.c: New file.
8639 * tst-cancelx8.c: New file.
8640 * tst-cancelx9.c: New file.
8641 * tst-cancelx10.c: New file.
8642 * tst-cancelx11.c: New file.
8643 * tst-cancelx12.c: New file.
8644 * tst-cancelx13.c: New file.
8645 * tst-cancelx14.c: New file.
8646 * tst-cancelx15.c: New file.
8647 * tst-cleanupx0.c: New file.
8648 * tst-cleanupx0.expect: New file.
8649 * tst-cleanupx1.c: New file.
8650 * tst-cleanupx2.c: New file.
8651 * tst-cleanupx3.c: New file.
8653 * tst-cleanup0.c: Make standard compliant.
8654 * tst-cleanup1.c: Likewise.
8656 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8657 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8658 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8659 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8660 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8661 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8662 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8664 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8665 * tst-cancel12.c: New file.
8666 * tst-cancel13.c: New file.
8667 * tst-cancel14.c: New file.
8668 * tst-cancel15.c: New file.
8669 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8672 * tst-cancel1.c: Add some comments.
8674 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8677 2003-06-06 Ulrich Drepper <drepper@redhat.com>
8679 * Makefile (CFLAGS-pthread_cancel.c): Define.
8681 2003-06-05 Ulrich Drepper <drepper@redhat.com>
8683 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8684 Change type of __writer element to int.
8685 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8686 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8687 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8688 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8689 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8690 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8691 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8692 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8693 Compare with TID to determine deadlocks.
8694 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8695 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8696 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8697 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8698 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8699 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8701 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8703 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8704 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8705 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8707 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8709 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8710 * Makefile (tests): Add tst-rwlock12.
8711 * tst-rwlock12.c: New file.
8713 2003-06-05 Jakub Jelinek <jakub@redhat.com>
8715 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8716 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8717 Remove bogus hidden_proto.
8718 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8720 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8721 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8722 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8723 ___lll_mutex_timedlock): Likewise.
8725 2003-06-04 Ulrich Drepper <drepper@redhat.com>
8727 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8728 (__pthread_cond_signal): Add some code to eventually handle
8731 2003-06-01 Ulrich Drepper <drepper@redhat.com>
8733 * Makefile (tests): Add tst-exec4.
8734 (tst-exec4-ARGS): Define.
8735 * tst-exec4.c: New file.
8737 2003-05-31 Ulrich Drepper <drepper@redhat.com>
8739 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8740 Also fail if tv_nsec < 0.
8741 (__lll_timedwait_tid): Likewise.
8742 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8743 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8745 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8747 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8749 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8751 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8753 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8756 * Makefile (tests): Add tst-sem8 and tst-sem9.
8757 * tst-sem8.c: New file.
8758 * tst-sem9.c: New file.
8759 * sem_open.c: Fix creation of in_use record if the file exists but
8762 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8765 * sysdeps/pthread/timer_create.c (timer_create): In case
8766 evp==NULL, assign timer ID to sival_ptr.
8768 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8769 struct pthread_unwind_buf *.
8770 (struct pthread): Likewise for cleanup_jmp_buf element.
8772 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8773 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8774 * unwind.c (__pthread_unwind_next): Likewise.
8776 2003-05-30 Ulrich Drepper <drepper@redhat.com>
8778 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8779 (lll_futex_timed_wait): Use int for futex value parameter.
8780 (lll_futex_wake): Likewise.
8781 (lll_futex_requeue): Likewise.
8783 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8784 Replace one memory operation with one register operation.
8786 * tst-join4.c (do_test): Fix error message.
8788 * tst-rwlock6.c (do_test): Use correct format specifier.
8790 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8791 (__lll_mutex_lock_wait): Replace one memory operation with one
8793 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8794 (__lll_mutex_lock_wait): Likewise.
8796 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8797 (__lll_mutex_cond_lock): Add one to value parameter of
8798 __lll_lock_wait to reflect reality in the futex syscall.
8799 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8800 (lll_mutex_cond_lock): Likewise.
8802 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8804 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8806 (lll_mutex_cond_lock): Define.
8808 2003-05-29 Ulrich Drepper <drepper@redhat.com>
8810 * Makefile (tests): Add tst-signal6.
8811 * tst-signal6.c: New file.
8813 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8814 (__lll_mutex_unlock_force): New function
8815 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8817 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8818 (__lll_mutex_unlock_force): New function.
8819 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8821 * tst-rwlock7.c (do_test): Use correct format specifier.
8823 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8824 Find break parameter in correct asm argument.
8826 2003-05-27 Jakub Jelinek <jakub@redhat.com>
8828 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8830 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8832 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8834 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8835 lll_futex_requeue, lll_mutex_unlock_force): Define.
8837 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8839 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8840 (pthread_cond_t): Add __mutex.
8841 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8842 lll_futex_requeue, lll_mutex_unlock_force): Define.
8844 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8846 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8847 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8849 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8851 (lll_futex_wait, lll_futex_wake): Define.
8852 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8853 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8854 FUTEX_REQUEUE instead of FUTEX_WAIT.
8855 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8856 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8857 mutex which was used in condvar structure. Call
8858 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8859 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8861 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8862 include tcb-offsets.h. Read wakeup value in locked region.
8863 Use the value of gbr register as THREAD_ID.
8864 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8865 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8866 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8868 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8871 2003-05-28 Ulrich Drepper <drepper@redhat.com>
8873 * sysdeps/pthread/pthread_cond_broadcast.c
8874 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8876 2003-05-26 Ulrich Drepper <drepper@redhat.com>
8878 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8879 typo in register name.
8880 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8881 correctly. Actually use requeue. Little optimization.
8882 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8883 mutex address early. Handle cancellation state as 32-bit value.
8884 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8885 Remove unnecessary label.
8887 2003-05-25 Ulrich Drepper <drepper@redhat.com>
8889 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8890 instead of FUTEX_WAIT.
8891 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8892 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8893 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8894 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8895 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8896 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8897 used in condvar structure. Call __pthread_mutex_cond_lock instead
8898 of __pthread_mutex_lock_internal.
8899 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8900 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8901 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8902 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8903 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8904 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8905 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8906 Add pthread_mutex_cond_lock.
8907 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8908 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8909 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8910 lll_mutex_cond_lock.
8911 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8912 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8913 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8915 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8916 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8918 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8919 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8921 * pthreadP.h: Declare __pthread_mutex_cond_lock.
8922 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8923 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
8924 macro don't define aliases.
8926 * cancellation.c: Remove __pthread_enable_asynccancel_2.
8927 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8928 * sysdeps/pthread/pthread_cond_timedwait.c: Use
8929 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8930 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8931 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8932 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8933 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8934 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8936 2003-05-17 Ulrich Drepper <drepper@redhat.com>
8938 * sem_open.c: Fix one endless loop. Implement correct semantics
8939 wrt opening the same semaphore more then once.
8940 * sem_close.c: Adjust for sem_open change.
8941 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
8942 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8943 * Makefile (tests): Add tst-sem7.
8944 * tst-sem7.c: New file.
8946 2003-05-16 Roland McGrath <roland@redhat.com>
8948 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8949 uninitialized variable braino.
8951 2003-05-16 Ulrich Drepper <drepper@redhat.com>
8953 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8954 test for syscall availability.
8956 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8957 __no_posix_timers to -1 if the syscalls don't exist.
8959 * pthread_join.c (pthread_join): Set tid field of the joined
8960 thread to -1. This isn't necessary but helps to recognize some
8961 error conditions with almost no cost.
8963 * allocatestack.c (FREE_P): Also negative values indicate an
8966 * unwind.c: Include <unistd.h>.
8968 2003-05-14 Ulrich Drepper <drepper@redhat.com>
8970 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8972 2003-05-14 Jakub Jelinek <jakub@redhat.com>
8974 * Makefile (crti-objs, crtn-objs): New variables.
8975 (omit-deps, extra-objs): Add crtn.
8976 ($(objpfx)libpthread.so): Depend on both crti and crtn
8977 and links to them in multidir.
8978 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8980 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
8982 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8983 (lll_mutex_unlock): Use atomic_exchange_rel.
8985 2003-05-11 Ulrich Drepper <drepper@redhat.com>
8987 * cond-perf.c (cons): Add missing locking around setting of alldone.
8989 2003-05-10 Ulrich Drepper <drepper@redhat.com>
8991 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8993 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8995 2003-05-09 Ulrich Drepper <drepper@redhat.com>
8997 * tst-sem6.c: New file.
8998 * Makefile (tests): Add tst-sem6.
9000 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9001 Use atomic_exchange_rel instead of atomic_exchange.
9002 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9005 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9006 code for lll_futex_wait and lll_futex_wake in static apps. Use
9007 vsyscall is possible.
9009 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9010 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9011 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9012 pthread_setaffinity_np.
9013 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9014 and pthread_setaffinity_np.
9015 * Makefile (libpthread-routines): Add pthread_getaffinity and
9016 pthread_setaffinity.
9018 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9019 use it in case mmap to allocate the stack fails.
9020 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9021 ARCH_MAP_FLAGS here.
9022 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9025 2003-05-08 Ulrich Drepper <drepper@redhat.com>
9027 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9028 handler implementation. It is now lockless in fork().
9029 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9030 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9031 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
9032 declare the __fork_*_lists.
9033 (struct fork_handler): Include pointers to all three functions.
9034 Add next, refcntr and need_signal elements.
9035 (__fork_handlers): New declaration.
9036 (__register_atfork_malloc): Remove declaration.
9037 (HAVE_register_atfork_malloc): Remove definition.
9038 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9039 __pthread_child_handler variable.
9040 (__libc_pthread_init): Use __register_atfork instead of explicitly
9042 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9044 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9046 * unwind.c (unwind_cleanup): Print error message and then abort. This
9047 function must never be reached.
9049 * cond-perf.c: New file.
9051 2003-05-05 Ulrich Drepper <drepper@redhat.com>
9053 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9055 2003-05-04 Roland McGrath <roland@redhat.com>
9057 * Makefile ($(objpfx)../libc.so): New target.
9059 2003-05-02 Ulrich Drepper <drepper@redhat.com>
9061 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9062 (pthread_condattr_t): Size is only an int, don't use long for
9064 (pthread_mutexattr_t): Likewise.
9065 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9066 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9067 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9069 2003-05-01 Ulrich Drepper <drepper@redhat.com>
9071 * sysdeps/i386/tls.h: Define THREAD_ID.
9072 * sysdeps/ia64/tls.h: Likewise.
9073 * sysdeps/powerpc/tls.h: Likewise.
9074 * sysdeps/s390/tls.h: Likewise.
9075 * sysdeps/sh/tls.h: Likewise.
9076 * sysdeps/x86_64/tls.h: Likewise.
9077 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9079 * pthread_mutex_timedlock.c: Likewise.
9080 * pthread_mutex_trylock.c: Likewise.
9081 * pthread_mutex_unlock.c: Likewise.
9082 * pthread_rwlock_trywrlock.c: Likewise.
9083 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9084 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9085 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9086 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9088 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9091 2003-04-29 Jakub Jelinek <jakub@redhat.com>
9093 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9094 (__SIZEOF_PTHREAD_COND_T): Define to 48.
9095 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9096 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9097 Make __align long long instead of long.
9098 (pthread_rwlock_t): Formatting.
9099 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9100 (pthread_rwlock_t): Formatting.
9101 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9102 (pthread_cond_t): Make __align long long instead of long.
9103 (pthread_rwlock_t): Move __flags field to the same position as in
9106 2003-04-30 Ulrich Drepper <drepper@redhat.com>
9108 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9109 * tst-rwlock7.c (do_test): Likewise.
9111 2003-04-26 Roland McGrath <roland@redhat.com>
9113 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9115 2003-04-22 Jakub Jelinek <jakub@redhat.com>
9117 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9118 sizeof (struct pthread).
9119 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9121 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9123 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9125 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9127 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9129 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9131 (NO_TLS_OFFSET): Define.
9132 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9133 add TLS_TCB_SIZE unnecessarily.
9135 2003-04-22 Roland McGrath <roland@redhat.com>
9137 * Makeconfig (shared-thread-library): Reverse link order to work
9140 2003-04-22 Ulrich Drepper <drepper@redhat.com>
9142 * semaphore.h: Fix typo in comment.
9144 2003-04-21 Ulrich Drepper <drepper@redhat.com>
9146 * sysdeps/pthread/sigfillset.c: New file.
9148 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9149 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9150 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9151 * sysdeps/pthread/sigaction.c: Likewise.
9152 * sysdeps/pthread/sigprocmask.c: New file.
9153 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9155 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9156 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9159 2003-04-19 Ulrich Drepper <drepper@redhat.com>
9161 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9162 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9164 * sysdeps/unix/sysv/linux/unregister-atfork.c
9165 (__unregister_atfork): Don't free memory not allocated dynamically.
9167 * semaphore.h: Remove __THROW marker from cancellation points.
9168 * nptl/sysdeps/pthread/pthread.h: Likewise.
9170 2003-04-18 Ulrich Drepper <drepper@redhat.com>
9172 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9173 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9176 2003-04-16 Jakub Jelinek <jakub@redhat.com>
9178 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9180 2003-04-15 Roland McGrath <roland@redhat.com>
9182 * forward.c (__pthread_unwind): Tweak to avoid warning.
9184 2003-04-15 Ulrich Drepper <drepper@redhat.com>
9186 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9188 2003-04-14 Ulrich Drepper <drepper@redhat.com>
9190 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9191 overflow CFA advance instructions.
9192 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9194 2003-04-14 Jakub Jelinek <jakub@redhat.com>
9196 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9197 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9198 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9201 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9202 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9203 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9204 DW_CFA_advance_loc for .Laddl-.Lsubl.
9206 2003-04-13 Ulrich Drepper <drepper@redhat.com>
9208 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9209 position-independent unwind data for static libraries.
9210 Add missing unwind info. Add comments.
9212 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9213 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9214 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9215 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9217 2003-04-12 Ulrich Drepper <drepper@redhat.com>
9219 * Makefile: Make sure all cancellation points are compiled with
9220 exception and asynchronous unwind tables.
9222 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9223 which mishandles loading of global object addresses in PIC.
9224 (THREAD_SETMEM_NC): Likewise.
9226 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9228 * pthread.h: Define new data structure for cleanup buffer. Declare
9229 new cleanup handler interfaces.
9230 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9231 (struct pthread): Add cleanup_jmp_buf pointer. Define
9232 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9233 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9234 it. Declare old cleanup handler installation functions.
9235 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9237 * cleanup_defer.c: Likewise.
9238 * cleanup_compat.c: New file. Old cleanup code.
9239 * cleanup_def_compat.c: New file. Old cleanup code.
9240 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9241 if own thread descriptor.
9242 * unwind.c: New file.
9243 * forward.c: Add __pthread_unwind.
9244 * init.c (pthread_functions): Add __pthread_unwind.
9245 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9246 Add ptr___pthread_unwind.
9247 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9248 and unwind function.
9249 * Makefile (libpthread-routines): Add cleanup_compat,
9250 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9251 table generation if necessary.
9252 * version.c: Record whether unwind support is compiled in.
9253 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9254 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9256 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9257 complication to generate unwind information for syscall wrappers.
9258 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9259 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9260 __cleanup_fct_attribute.
9262 * Makefile: Add rules to build and run tst-cleanup0.
9263 * tst-cleanup0.c: New file.
9264 * tst-cleanup0.expect: New file.
9266 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9267 caller. Optimize to avoid often unecessary local variable.
9269 2003-04-11 Roland McGrath <roland@redhat.com>
9271 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9272 sets variable `multidir'; include that.
9273 (generated): Add it.
9274 ($(objpfx)$(multidir)/crti.o): New target.
9275 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9277 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9279 * tst-attr2.c (do_test): Add cast to avoid warning.
9280 * tst-mutex4.c (do_test): Likewise.
9282 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9284 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9287 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9289 * Makefile (tests): Add tst-detach1.
9290 * tst-detach1.c: New file.
9292 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9294 * sysdeps/pthread/pthread.h: Remove duplicate
9295 pthread_cleanup_{push,pop} definitions.
9297 * tst-barrier2.c: Eliminate warnings.
9298 * tst-cancel4.c: Likewise.
9299 * tst-cond4.c: Likewise.
9300 * tst-cond6.c: Likewise.
9301 * tst-detach1.c: Likewise.
9302 * tst-rwlock4.c: Likewise.
9303 * tst-rwlock6.c: Likewise.
9304 * tst-rwlock7.c: Likewise.
9305 * tst-sem3.c: Likewise.
9306 * tst-spin2.c: Likewise.
9307 * tst-umask1.c: Likewise.
9309 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9311 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9313 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9315 * descr.h (struct pthread): Move cancelhandling member to the front.
9317 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9319 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9320 malloc_parent, and malloc_child statically.
9321 (__register_atfork_malloc): New function.
9322 (free_mem): Don't free any of the malloc_* variables on the list.
9323 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9324 Define HAVE_register_atfork_malloc.
9326 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9328 * sysdeps/pthread/createthread.c (create_thread): Add some more
9329 comments explaining when to set multiple_threads and when not.
9331 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9332 THREAD_ATOMIC_BIT_SET if not already defined.
9333 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9334 THREAD_ATOMIC_BIT_SET:
9335 * sysdeps/x86_64/tls.h: Likewise.
9336 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9337 THREAD_ATOMIC_CMPXCHG_VAL.
9338 (_pthread_cleanup_pop_restore): Likewise.
9339 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9340 (__pthread_enable_asynccancel_2): Likewise.
9341 (__pthread_disable_asynccancel): Likewise.
9342 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9343 (__libc_disable_asynccancel): Likewise.
9344 * init.c (sigcancel_handler): Likewise.
9345 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9346 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9348 2003-04-03 Ulrich Drepper <drepper@redhat.com>
9350 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9351 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9352 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9353 * Makefile (tests): Add tst-cancel11.
9354 * tst-cancel11.c: New file.
9356 2003-04-01 Ulrich Drepper <drepper@redhat.com>
9358 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9359 round, not the first. Use specific_used flag instead of local
9360 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9361 (__free_tcb): Don't call deallocate_tsd here.
9362 (start_thread): Call deallocate_tsd here.
9363 * pthread_setspecific.c: Set specific_used flag really only when
9365 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9366 * tst-tsd3.c: New file.
9367 * tst-tsd4.c: New file.
9369 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9371 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9372 Use atomic_exchange_and_add instead of __lll_add.
9373 (__lll_mutex_timedlock): Likewise.
9374 Patch by Ian Wienand.
9376 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9378 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9379 (SINGLE_THREAD_P): Fix typo.
9380 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9382 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9384 * Makefile (tests): Add tst-align.
9385 * tst-align.c: New file.
9386 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9388 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9391 * tst-tsd2.c: Add casts to avoid warnings.
9393 2003-03-30 Ulrich Drepper <drepper@redhat.com>
9395 * descr.h (struct pthread): Move most often used elements to the front.
9397 2003-03-29 Ulrich Drepper <drepper@redhat.com>
9399 * Makefile (libpthread-routines): Add pthread_atfork.
9400 (libpthread-static-only-routines): Add pthread_atfork.
9402 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9404 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9406 (INSTALL_DTV): Add parens.
9407 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9408 Use passed descr instead of THREAD_SELF.
9409 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9410 (__lll_mutex_timedlock_wait): Correct expected value after
9412 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9413 Release lock before waking up the waiters.
9414 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9415 criteria. Reorderstruct passed to cleanup handler. Fix
9416 handling of cancellation and failung pthread_mutex_unlock call.
9417 Use __pthread_enable_asynccancel_2 instead of
9418 __pthread_enable_asynccancel.
9419 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9420 Return result of lock re-get if it fails.
9421 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9422 for __pthread_cleanup_push.
9423 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9424 completely broken rwlock implementation.
9425 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9426 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9427 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9428 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9429 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9430 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9431 versioned_symbol macro.
9432 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9433 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9435 2003-03-27 Ulrich Drepper <drepper@redhat.com>
9437 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9438 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9440 (struct timer): Remove th and bar field.
9441 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9442 debugging code. Create only one helper thread.
9443 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9445 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9446 Renamed. Define statically. Use thread info from siginfo.
9447 (__helper_once): New variable.
9448 (__helper_tid): New variable.
9449 (__reset_helper_control): New function.
9450 (__start_helper_thread): New function.
9452 * pthread_create.c (start_thread): Don't use setjmp inside
9453 __builtin_expect to work around gcc bug.
9455 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9456 timer_delete syscall fails, but not with ENOSYS, set
9459 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9460 (timer_settime): Fix typo.
9461 * sysdeps/unix/sysv/linux/timer_getoverr.c
9462 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9464 2003-03-27 Jakub Jelinek <jakub@redhat.com>
9466 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9467 offset of cleanupbuf.__prev.
9469 2003-03-26 Jakub Jelinek <jakub@redhat.com>
9471 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9474 2003-03-26 Ulrich Drepper <drepper@redhat.com>
9476 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9477 NULL provide default definition to syscall.
9479 2003-03-25 Roland McGrath <roland@redhat.com>
9481 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9482 (timer_id2ptr): Fix typo.
9484 2003-03-25 Ulrich Drepper <drepper@redhat.com>
9486 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9487 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9488 * sysdeps/ia64/pthreaddef.h: Likewise.
9489 * sysdeps/powerpc/pthreaddef.h: Likewise.
9490 * sysdeps/s390/pthreaddef.h: Likewise.
9491 * sysdeps/sh/pthreaddef.h: Likewise.
9492 * sysdeps/x86_64/pthreaddef.h: Likewise.
9493 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9494 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9496 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9497 SIGTIMER is not unblocked.
9498 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9500 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9502 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9503 pass pointer through as ID.
9504 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9505 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9506 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9507 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9508 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9509 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9510 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9511 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9512 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9513 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9514 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9515 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9516 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9517 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9518 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9519 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9520 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9521 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9522 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9523 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9524 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9525 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9526 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9527 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9528 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9529 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9530 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9531 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9532 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9533 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9534 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9535 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9536 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9538 * pthreadP.h: Remove FRAME_LEFT definition.
9539 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9540 already left frame. Programs which have this problem are not POSIX
9542 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9544 2003-03-24 Ulrich Drepper <drepper@redhat.com>
9546 * sysdeps/pthread/tst-timer.c: Check return values of the
9549 2003-03-23 Roland McGrath <roland@redhat.com>
9551 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9552 * tst-tls3mod.c: Likewise.
9553 * tst-tls1.c: Likewise.
9554 * tst-tls2.c: Likewise.
9556 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9559 * tst-join5.c (tf1, tf2): Add a cast.
9561 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9563 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9564 Don't test anything.
9565 * tst-cond4.c: Likewise.
9566 * tst-cond6.c: Likewise.
9567 * tst-flock2.c: Likewise.
9568 * tst-mutex4.c: Likewise.
9569 * tst-rwlock4.c: Likewise.
9570 * tst-signal1.c: Likewise.
9571 * tst-spin2.c: Likewise.
9572 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9574 * tst-mutex4.c: Use test-skeleton.c.
9575 * tst-spin2.c: Likewise.
9576 * tst-sysconf.c: Likewise.
9577 * tst-barrier2.c: Likewise.
9578 * tst-cond4.c: Likewise.
9579 * tst-cond6.c: Likewise.
9580 * tst-rwlock4.c: Likewise.
9581 * tst-unload.c: Likewise.
9582 * tst-flock2.c (do_test): Use return instead of exit.
9584 2003-03-22 Jakub Jelinek <jakub@redhat.com>
9586 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9588 2003-03-21 Ulrich Drepper <drepper@redhat.com>
9590 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9591 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9592 instead of __lll_compare_and_swap.
9593 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9595 Removed definition if __lll_compare_and_swap.
9597 * cancellation.c: Adjust for new form of compare&exchange macros.
9598 * cleanup_defer.c: Likewise.
9600 * libc-cancellation.c: Likewise.
9601 * old_pthread_cond_broadcast.c: Likewise.
9602 * old_pthread_cond_signal.c: Likewise.
9603 * old_pthread_cond_timedwait.c: Likewise.
9604 * old_pthread_cond_wait.c: Likewise.
9605 * pthread_cancel.c: Likewise.
9606 * pthread_create.c: Likewise.
9607 * pthread_detach.c: Likewise.
9608 * pthread_join.c: Likewise.
9609 * pthread_key_delete.c: Likewise.
9610 * pthread_setcancelstate.c: Likewise.
9611 * pthread_setcanceltype.c: Likewise.
9612 * pthread_timedjoin.c: Likewise.
9613 * pthread_tryjoin.c: Likewise.
9614 * sysdeps/pthread/createthread.c: Likewise.
9616 2003-03-20 Ulrich Drepper <drepper@redhat.com>
9618 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9619 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9620 definitions. Replace uses with calls to atomic_* functions.
9621 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9622 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9623 __lll_test_and_set calls with atomic_exchange_and_add and
9624 atomic_exchange calls respectively.
9625 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9626 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9627 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9628 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9629 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9630 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9631 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9633 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9634 returns the old value.
9636 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9638 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9639 int for variable OLDVAL and correct inline assembler contraint.
9640 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9641 type int for variable OLD.
9643 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9645 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9646 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9647 instead of multiple_threads field in the TCB.
9649 2003-03-19 Ulrich Drepper <drepper@redhat.com>
9651 * sysdeps/i386/i686/bits/atomic.h: Removed.
9652 * sysdeps/i386/i586/bits/atomic.h: Removed.
9653 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9654 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9655 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9656 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9657 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9658 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9659 * atomic.h: Removed. Moved to glibc.
9661 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9662 support for clock selection.
9664 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9667 2003-03-18 Roland McGrath <roland@redhat.com>
9669 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9670 Add __lll_rel_instr first. Add memory clobber.
9671 (lll_mutex_unlock): Use __lll_test_and_set.
9672 From Paul Mackerras <paulus@samba.org>.
9674 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9676 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9677 (SINGLE_THREAD_P): Add `header.' prefix.
9678 From Paul Mackerras <paulus@samba.org>.
9680 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9681 pthread_timedjoin_np to ...
9682 (libpthread: GLIBC_2.3.3): ... here.
9683 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9685 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9686 Avoid shadowing VAL variable.
9688 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9691 2003-03-18 Ulrich Drepper <drepper@redhat.com>
9693 * Makefile (tests): Add tst-cond11.
9694 * tst-cond11.c: New file.
9696 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9697 struct passed to cleanup handler to eliminate one more
9699 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9701 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9702 (pthrad_cond_t): Replace __unused field with __clock.
9704 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9705 waken all waiters in cleanup handler.
9706 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9707 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9709 * pthread_condattr_getclock.c: New file.
9710 * pthread_condattr_setclock.c: New file.
9711 * sysdeps/pthread/pthread.h: Declare these new functions.
9712 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9713 * Makefile (libpthread-routines): Add the new functions.
9714 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9715 Renamed field to value. Document use of the bits.
9716 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9718 * pthread_condattr_setpshared.c: Likewise.
9719 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9720 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9721 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9723 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9724 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9725 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9726 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9727 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9728 Implement clock selection.
9729 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9730 * pthread-errnos.sym: Add ENOSYS.
9731 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9732 _POSIX_CLOCK_SELECTION.
9733 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9735 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9736 invalid .size directive.
9738 2003-03-17 Roland McGrath <roland@redhat.com>
9740 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9743 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9745 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9746 Use __lll_add instead of spelling it out. Use protected symbol names.
9747 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9749 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9750 Renamed from lll_compare_and_swap. Use new name where necessary.
9751 (__lll_add): Defined.
9752 (__lll_dec_if_positive): Defined.
9753 (__lll_test_and_set): Defined.
9754 * sysdeps/ia64/pthread_spin_init.c: Removed.
9755 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9756 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9757 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9758 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9759 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9760 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9761 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9762 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9763 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9764 __sync_lock_release_si.
9765 Patch by Jakub Jelinek.
9767 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9768 Fix timeout handling.
9769 (__lll_timedwait_tid): Likewise.
9770 (lll_unlock_wake_cb): Wake up other waiters if necessary.
9771 Patch by Jakub Jelinek.
9773 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9775 2003-03-17 Roland McGrath <roland@redhat.com>
9777 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9778 * sysdeps/pthread/pthread_spin_init.c: New file.
9779 * sysdeps/pthread/pthread_spin_unlock.c: New file.
9780 * sysdeps/powerpc/Makefile: New file.
9781 * sysdeps/powerpc/pthread_spin_lock.c: New file.
9782 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9783 * sysdeps/powerpc/pthreaddef.h: New file.
9784 * sysdeps/powerpc/tcb-offsets.sym: New file.
9785 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9786 * sysdeps/powerpc/tls.h: New file.
9787 * sysdeps/powerpc/bits/atomic.h: New file.
9788 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9789 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9790 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9792 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9793 * sysdeps/unix/sysv/linux/sem_post.c: New file.
9794 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9795 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9796 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9797 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9798 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9799 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9800 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9801 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9802 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9803 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9804 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9805 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9806 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9808 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9810 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9811 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9812 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9813 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9814 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9816 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9818 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9819 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9820 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9821 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9822 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9824 2003-03-16 Roland McGrath <roland@redhat.com>
9826 * tst-fork4.c: Include <string.h>.
9827 * tst-signal2.c: Likewise.
9828 * tst-mutex5.c (do_test): exit -> return.
9829 * tst-mutex2.c: Include <stdlib.h>.
9831 2003-03-16 Ulrich Drepper <drepper@redhat.com>
9833 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9834 (__lll_mutex_timedlock_wait): Correct expected value after
9835 spurious wakeup. Otherwise we would never wait again.
9837 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9838 zone versus inline asm stupidity. Use correct instructions.
9840 * tst-rwlock6.c: Add some more status output.
9842 2003-03-15 Roland McGrath <roland@redhat.com>
9844 * sysdeps/pthread/configure.in: New file.
9845 * sysdeps/pthread/configure: New file (generated).
9847 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9849 * allocatestack.c (allocate_stack): Store the exact stack size of
9850 user allocated stacks.
9852 2003-03-15 Jakub Jelinek <jakub@redhat.com>
9854 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9855 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9856 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9857 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9858 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9859 Use `header.' prefix.
9860 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9862 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9864 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9865 __builtin_frame_address, use stack pointer.
9867 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9868 instead of __builtin_frame_pointer.
9870 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9872 * tst-basic1.c (do_test): Add cast to avoid warning.
9873 * tst-basic2.c (do_test): Likewise.
9875 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9876 amount of stack correction.
9878 * tst-fork4.c: Use test-skeleton.c.
9880 2003-03-14 Roland McGrath <roland@redhat.com>
9882 * init.c: Fix typo "#eli" for "#else".
9884 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9886 * allocatestack.c (__stack_user): Use hidden_data_def.
9887 * pthread_create.c (__pthread_keys): Likewise.
9889 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9891 2003-03-14 Roland McGrath <roland@redhat.com>
9893 * tst-fork4.c: New file.
9894 * Makefile (tests): Add it.
9896 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9897 we always define the padding space.
9898 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9899 stopped supporting its own extensions fully.
9900 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9901 struct also called `header', so `header.multiple_threads' is the field
9902 name to use on all machines.
9903 * allocatestack.c (allocate_stack): Use `header.' prefix.
9904 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9905 * pthread_create.c (__pthread_create_2_1): Likewise.
9906 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9907 (THREAD_SELF): Likewise.
9908 * sysdeps/x86_64/tls.h: Likewise.
9909 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9910 (SINGLE_THREAD_P): Likewise.
9911 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9912 (SINGLE_THREAD_P): Likewise.
9913 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9914 (SINGLE_THREAD_P): Likewise.
9916 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9919 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9921 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9922 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9924 * pthread_create.c (start_thread): setjmp is expected to return 0.
9926 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9927 (THREAD_GETMEM_NC): Likewise.
9929 2003-03-13 Ulrich Drepper <drepper@redhat.com>
9931 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9932 and the size of the stack which must be allocated is a multiple,
9933 allocate one more page.
9934 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9935 MULTI_PAGE_ALIASING.
9937 2003-03-13 Roland McGrath <roland@redhat.com>
9939 * pthread_create.c (start_thread): Set EXITING_BIT after the
9940 event-reporting (and destructors), not before.
9942 2003-03-13 Jakub Jelinek <jakub@redhat.com>
9944 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9945 lll_futex_wake): Declare register variables as long int instead of
9946 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9947 Make syscall arguments clobbered by the syscall.
9948 (lll_futex_wait): Define using lll_futex_timed_wait.
9950 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9953 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9956 * allocatestack.c (nptl_ncreated): Only declare if
9957 COLORING_INCREMENT != 0.
9959 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9960 (__libc_enable_asynccancel_2): Remove prototype.
9962 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9963 ctid to match kernel.
9965 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9967 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9968 libc_multiple_threads.
9969 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9970 __libc_multiple_threads to...
9971 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
9973 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9975 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9976 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9978 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9979 (__pthread_once_internal): Define.
9981 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9982 macros instead of .symver directly.
9983 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9984 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9986 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9987 * sysdeps/x86_64/tcb-offsets.sym: New file.
9988 * sysdeps/x86_64/Makefile: New file.
9990 * sysdeps/i386/tcb-offsets.sym: Add SELF.
9991 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9992 to access own pthread_t in TCB.
9993 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9995 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9997 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9999 2003-03-12 Roland McGrath <roland@redhat.com>
10001 * pthread-errnos.sym: New file.
10002 * Makefile (gen-as-const-headers): New variable, list that file.
10003 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10004 header <pthread-errnos.h> instead of defining errno values here.
10005 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10006 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10007 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10008 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10009 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10011 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10013 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10014 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10015 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10016 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10017 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10018 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10019 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10020 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10021 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10022 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10023 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10024 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10025 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10026 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10027 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10028 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10029 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10030 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10031 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10032 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10033 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10034 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10035 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10036 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10037 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10038 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10039 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10041 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10042 CLONE_CHILD_SETTID worked.
10044 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10046 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10048 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10051 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10052 (pthread_cond_t): Add padding.
10054 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10055 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10056 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10058 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10059 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10060 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10061 (__pthread_rwlock_timedrdlock): Likewise.
10062 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10063 (__pthread_rwlock_wrlock): Likewise.
10064 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10065 (__pthread_rwlock_rdlock): Likewise.
10067 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10069 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10070 result of lock re-get if it fails.
10072 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10074 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10075 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10076 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10077 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10078 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10079 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10080 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10081 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10082 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10083 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10085 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10086 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10088 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10089 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10090 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10091 (create_thread): Likewise.
10092 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10093 * init.c (__pthread_initialize_minimal_internal): Initialize
10094 __libc_multiple_threads_ptr if necessary.
10095 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
10096 __pthread_multiple_threads and __libc_multiple_threads_ptr.
10097 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10098 __libc_multiple_threads.
10099 (__libc_pthread_init): Return pointer to __libc_pthread_init if
10102 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10103 (THREAD_SETMEM_NC): Likewise.
10105 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10106 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10107 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10108 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10110 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10111 Eliminate one entire instruction.
10113 * cancellation.c (__pthread_enable_asynccancel_2): New function.
10114 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10115 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10116 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10117 instead of __pthread_enable_asynccancel.
10118 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10119 (__pthread_cond_wait): Likewise.
10120 * sysdeps/pthread/pthread_cond_timedwait.c
10121 (__pthread_cond_timedwait): Likewise.
10122 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10124 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10125 (__condvar_cleanup): Wake up all waiters in case we got signaled
10126 after being woken up but before disabling asynchronous
10128 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10129 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10130 (__condvar_cleanup): Likewise.
10132 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10133 Make it an error if architecture has no #if case. Add x86-64.
10135 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10136 pt-initfini.s generation.
10138 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10139 (TLS_INIT_TP): Fix typo.
10141 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10143 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10144 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10146 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10147 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10148 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10149 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10150 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10151 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10152 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10153 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10155 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10157 * sysdeps/pthread/pthread_cond_timedwait.c
10158 (__pthread_cond_timedwait): Return the result of the final
10159 locking. If it succeeds, the regular function return value.
10161 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10162 Return result of the final locking.
10163 * version.c (__nptl_main): Work around problems with the strange
10164 INTERNAL_SYSCALL macro on ppc32.
10165 * init.c (__pthread_initialize_minimal_internal): Unblock
10166 SIGCANCEL in case the parent blocked it.
10167 Reported by Paul Mackerras <paulus@samba.org>.
10169 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10170 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10171 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10173 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10175 * sysdeps/pthread/pthread_cond_timedwait.c
10176 (__pthread_cond_timedwait): Unlock and fail if
10177 __pthread_mutex_unlock_internal failed.
10179 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10180 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10182 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10183 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10184 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10185 ALLOCATE_STACK): New macros.
10186 (TLS_TPADJ): New macro.
10187 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10188 (allocate_stack): Handle TLS_DTV_AT_TP and
10189 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10190 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10191 Don't set PD->self.
10192 * init.c [__ia64__] (__NR_set_tid_address): Define.
10194 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10195 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10196 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10197 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10198 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10199 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10200 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10201 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10202 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10203 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10204 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10205 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10206 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10207 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10208 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10209 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10210 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10211 * sysdeps/ia64/bits/atomic.h: New file.
10212 * sysdeps/ia64/Makefile: New file.
10213 * sysdeps/ia64/pthread_spin_init.c: New file.
10214 * sysdeps/ia64/pthread_spin_lock.c: New file.
10215 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10216 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10217 * sysdeps/ia64/pthreaddef.h: New file.
10218 * sysdeps/ia64/tcb-offsets.sym: New file.
10219 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10220 * sysdeps/ia64/tls.h: New file.
10222 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10223 to syscall instead of no arguments.
10225 2003-03-10 Ulrich Drepper <drepper@redhat.com>
10227 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10228 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10229 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10230 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10232 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10235 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10237 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10238 lowlevelbarrier.sym.
10239 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10240 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10241 Include lowlevelbarrier.h and don't define offsets locally.
10242 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10244 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10245 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10246 (__lll_mutex_timedlock_wait): Likewise.
10247 (lll_mutex_lock): Adjust asm for that.
10248 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10249 (lll_lock): Adjust asm for operand order change.
10250 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10251 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10253 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10254 Reverse order of parameters.
10255 (__lll_timedwait_tid): Remove regparms attribute.
10256 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10257 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10259 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10260 (__lll_timedwait_tid): Remove one unnecessary instruction.
10262 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10263 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10264 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10267 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10268 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10270 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10273 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10274 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10276 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10277 define LOCK here (if UP is not defined). The actual code is in
10280 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10281 LOCK is already defined. Don't define lll_unlock_wake_cb and
10282 __lll_timedwait_tid for libc.so.
10283 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10284 define LOCK here (if UP is not defined). The actual code is in
10287 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10288 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10289 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10290 instead of lowlevelsem.h.
10291 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10292 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10293 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10295 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10296 lowlevelrwlock.sym.
10297 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10298 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10299 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10301 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10303 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10304 last changed. D'oh.
10306 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10308 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10309 of __libc_locking_needed.
10310 (lll_trylock): Initialize %eax to zero.
10312 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10313 pthread_cond_t definition.
10315 2003-03-10 Roland McGrath <roland@redhat.com>
10317 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10318 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10319 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10320 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10321 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10323 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10324 Instead of setting PD->multiple_threads, set globals
10325 __pthread_multiple_threads and __libc_multiple_threads.
10326 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10327 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10328 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10330 * descr.h (struct pthread): Conditionalize first member on
10331 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10332 containing an anonymous tcbhead_t. Move `list' member out.
10333 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10334 * allocatestack.c: Remove use of `header.data.' prefix.
10335 * pthread_create.c: Likewise.
10336 * init.c (__pthread_initialize_minimal_internal): Likewise.
10337 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10338 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10339 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10340 * sysdeps/x86_64/tls.h: Likewise.
10341 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10342 (SINGLE_THREAD_P): Likewise.
10343 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10344 (SINGLE_THREAD_P): Likewise.
10345 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10346 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10348 2003-03-09 Ulrich Drepper <drepper@redhat.com>
10350 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10352 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10353 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10355 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10356 leftovers from the ia32 code.
10358 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10360 (clear_once_control): Don't load %esi.
10362 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10365 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10367 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10368 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10370 * Makefile (tests): Add tst-cond10.
10371 * tst-cond10.c: New file.
10373 2003-03-08 Ulrich Drepper <drepper@redhat.com>
10375 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10376 * tst-signal3.c (do_test): Likewise.
10377 * tst-sem5.c (do_test): Likewise.
10378 * tst-kill6.c (do_test): Likewise.
10379 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10381 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10383 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10384 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10385 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10386 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10387 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10388 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10389 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10391 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10393 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10394 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10395 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10396 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10397 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10398 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10399 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10400 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10402 * allocatestack.c (allocate_stack): If mprotect() fails free the
10405 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10407 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10409 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10410 lll_wake_tid. This was used only to work around kernel limits in
10412 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10413 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10414 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10415 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10417 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10418 (__pthread_initialize_minimal_internal): Change initialization of
10419 __static_tls_align_m1 appropriately.
10420 * pthreadP.h (__static_tls_align_m1): Renamed from
10421 __static_tls_align.
10422 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10423 instead of __static_tls_align-1.
10425 2003-03-04 Ulrich Drepper <drepper@redhat.com>
10427 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10429 * pthread_create.c: Define __pthread_keys using nocommon
10430 attribute, not by placing it explicitly in bss.
10431 Remove DEFINE_DEALLOC definition. Not needed anymore.
10433 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10434 Use it in mmap call to allocate stacks.
10436 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10438 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10439 result of the thread function.
10441 2003-03-03 Ulrich Drepper <drepper@redhat.com>
10443 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10444 version is just fine.
10446 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10447 (__pthread_child_handler): Renamed from pthread_child_handler,
10448 exported, and marked hidden. Change all users.
10449 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10450 free __pthread_child_handler from child list.
10452 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10454 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10456 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10457 Fix handling of cancellation and failing pthread_mutex_unlock call.
10458 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10459 (__pthread_cond_wait): Likewise.
10461 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10462 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10463 lll_futex_timed_wait call.
10464 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10465 (pthread_rwlock_timedwrlock): Likewise.
10467 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10468 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10469 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10471 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10472 check of lll_futex_wake return value.
10474 2003-03-03 Roland McGrath <roland@redhat.com>
10476 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10478 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10479 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10480 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10482 2003-03-02 Ulrich Drepper <drepper@redhat.com>
10484 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10485 error for CPU clocks.
10487 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10488 _POSIX_MONOTONIC_CLOCK.
10489 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10491 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10494 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10496 * descr.h (struct pthread): Move cleanup field to the front.
10498 2003-03-01 Roland McGrath <roland@redhat.com>
10500 * sem_open.c (sem_open): Braino fix.
10502 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10504 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10505 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10506 __pthread_cleanup_pop functionality.
10507 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10509 * descr.h (struct pthread): Move tid field to the front now that
10512 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10513 (__lll_mutex_timedlock_wait): Remove.
10514 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10515 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10516 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10517 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10518 (lll_unlock_wake_cb): Don't save and restore %esi.
10519 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10521 (__lll_timedwait_tid): Add alignment.
10522 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10523 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10525 (__lll_timedwait_tid): Removed.
10526 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10527 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10528 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10529 (pthread_barrier_wait): Don't save, load, and restore %esi for
10531 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10532 (__pthread_cond_signal): Don't save, load, and restore %esi.
10533 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10534 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10535 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10536 Don't save, load, and restore %esi.
10538 2003-02-27 Ulrich Drepper <drepper@redhat.com>
10540 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10541 Release lock before waking up the waiters.
10543 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10545 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10546 (reader_thread): Likewise.
10548 * sysdeps/pthread/pthread_rwlock_unlock.c
10549 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10550 to wake up readers if there are none.
10552 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10553 Release internal lock before wake threads.
10555 2003-02-26 Ulrich Drepper <drepper@redhat.com>
10557 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10558 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10560 * tst-rwlock9.c: Likewise.
10561 * tst-rwlock10.c: New file.
10562 * tst-rwlock11.c: New file.
10564 * Makefile (tests): Add tst-dlsym1.
10565 * tst-dlsym1.c: New file.
10567 * init.c (__pthread_initialize_minimal_internal): Set
10568 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10569 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10571 2003-02-24 Ulrich Drepper <drepper@redhat.com>
10573 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10575 * tst-cond2.c: Fix sychronization with child.
10577 * tst-rwlock8.c (reader_thread): Remove unused variable.
10579 * Makefile: Add rules to build and run tst-tls3.
10580 * tst-tls3.c: New file.
10581 * tst-tls3mod.c: New file.
10583 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10584 * tst-rwlock8.c: New file.
10585 * tst-rwlock9.c: New file.
10586 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10587 complete broken rwlock implementation.
10588 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10590 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10592 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10593 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10594 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10595 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10596 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10597 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10598 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10600 2003-02-23 Roland McGrath <roland@redhat.com>
10602 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10604 2003-02-23 Ulrich Drepper <drepper@redhat.com>
10606 * Makefile (tests): Add tst-context1.
10607 * tst-context1.c: New file.
10609 * Makefile (tests): Add tst-tls1 and tst-tls2.
10610 * tst-tls1.c: New file.
10611 * tst-tls2.c: New file.
10613 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10614 for failed cmpxchg.
10616 * pthread_create.c (start_thread): Set EXITING_BIT early.
10618 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10619 (THREAD_GETMEM_NC): Likewise.
10621 2003-02-22 Ulrich Drepper <drepper@redhat.com>
10623 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10624 off 3 more bytes by using offset-less instructions when possible.
10626 * Makefile: Add dependency for $(objpfx)version.d.
10628 * eintr.c (eintr_source): Add unnecessary return but the compiler
10631 * tst-kill3.c: Include <unistd.h>.
10633 2003-02-21 Roland McGrath <roland@redhat.com>
10635 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10637 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10639 * Makefile (tests): Add tst-eintr1.
10640 (distribute): Add eintr.c.
10641 * tst-eintr1.c: New file.
10642 * eintr.c: New file.
10644 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10646 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10647 Disallow sending SIGCANCEL.
10649 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
10650 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10651 * tst-kill1.c: New file.
10652 * tst-kill2.c: New file.
10653 * tst-kill3.c: New file.
10654 * tst-kill5.c: New file.
10655 * tst-kill6.c: New file.
10656 * tst-basic7.c: Renamed to...
10657 * tst-kill4.c: ...this.
10659 2003-02-21 Roland McGrath <roland@redhat.com>
10661 * Makefile (install-lib-ldscripts): New variable.
10663 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10665 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10666 * pthread_cancel.c: Use INVALID_TD_P.
10667 * pthread_detach.c: Likewise.
10668 * pthread_getschedparam.c: Likewise.
10669 * pthread_setschedparam.c: Likewise.
10670 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10671 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10672 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10673 * pthread_timedjoin.c: Likewise.
10675 * tst-basic7.c: Include <signal.h>.
10677 * pthread_join.c (pthread_join): Limited checking for invalid
10679 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10681 2003-02-20 Ulrich Drepper <drepper@redhat.com>
10683 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10684 beginning of the loop. Clear the entire first block of TSD.
10685 * Makefile (tests): Add tst-key4.
10686 * tst-key4.c: New file.
10688 2003-02-18 Ulrich Drepper <drepper@redhat.com>
10690 * Makefile (tests): Add tst-basic7.
10691 * tst-basic7.c: New file.
10693 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10694 Add some more __builtin_expect.
10696 * pthreadP.h: Define dummy version of DEBUGGING_P.
10698 2003-02-17 Ulrich Drepper <drepper@redhat.com>
10700 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10701 _POSIX_THREAD_PRIORITY_SCHEDULING.
10702 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10703 _XOPEN_REALTIME_THREADS.
10704 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10706 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10707 kernel returns EINVAL for PID <= 0, work around it.
10709 * Makefile (tests): Add tst-signal5.
10710 * tst-signal5.c: New file.
10712 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10713 and LOGIN_NAME_MAX.
10715 * tst-cancel1.c (tf): Block all signals.
10717 * Makefile (tests): Add tst-basic6.
10718 * tst-basic6.c: New file.
10720 * tst-basic1.c: Add test for process ID.
10722 * Makefile (tests): Add tst-cancel10.
10723 * tst-cancel10.c: New file.
10725 * Makefile (tests): Add tst-signal4.
10726 * tst-signal4.c: New file.
10728 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10729 __sigismember instead of sigismember. Add __builtin_expect.
10731 2003-02-16 Ulrich Drepper <drepper@redhat.com>
10733 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10734 pthread_setcancelstate, and pthread_rwlock_setpshared.
10736 * tst-cancel7.c (do_test): Make sure the pid file exists before
10737 canceling the thread.
10739 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10740 pthread_rwlock_timedrdlock tests.
10741 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10742 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10743 Check for invalid tv_nsec field.
10744 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10747 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10748 recursive mutex of overflow.
10750 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10752 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10753 going into an endless loop.
10754 * Makefile (tests): Add tst-cancel9.
10755 * tst-cancel9.c: New file.
10757 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10759 2003-02-15 Ulrich Drepper <drepper@redhat.com>
10761 * tst-mutex5.c (do_test): Add more timedlock tests.
10763 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10764 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10766 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10767 use INLINE_SYSCALL. Error number is returned, not -1.
10769 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10770 and __deallocate_stack with internal_function.
10771 * pthread_create.c: Adjust definitions appropriately.
10772 * allocatestack.c: Likewise.
10774 * pthread_join.c: Add one more __builtin_expect.
10775 * pthread_timedjoin.c: Likewise.
10777 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10778 not data of sequence number does not match.
10779 Add one __builtin_expect.
10781 * Makefile (tests): Add tst-clock1.
10782 * tst-clock1.c: New file.
10784 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10785 negative arguments.
10786 * Makefile (tests): Add tst-basic5.
10787 * tst-basic5.c: New file.
10789 2003-02-14 Ulrich Drepper <drepper@redhat.com>
10791 * Makefile (tests): Add tst-basic4.
10792 * tst-basic4.c: New file.
10794 * pthreadP.h: Add declaraction for __nptl_nthreads.
10795 * pthread_create.c: Define __nptl_nthreads
10796 (start_thread): Increment __nptl_nthreads at beginning. Decrement
10797 after thread is done. If then zero, call exit(0).
10798 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10799 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
10800 * init.c (pthread_functions): Initialize ptr_nthreads.
10801 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10802 (__reclaim_stacks): Decrement __nptl_nthreads.
10803 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10805 * Makefile (tests): Add tst-basic3.
10806 * tst-basic3.c: New file.
10808 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
10809 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
10810 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10811 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
10812 if asynchronous canceling is enabled.
10813 * pthread_join.c (pthread_join): When recognizing circular joins,
10814 take into account the other thread might be already canceled.
10815 * Makefile (tests): Add tst-join5.
10816 * tst-join5.c: New file.
10818 * Makefile (tests): Add tst-join4.
10819 * tst-join4.c: New file.
10821 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10823 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10825 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
10827 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10828 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10829 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10831 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10833 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10834 error if lll_futex_wake failed.
10836 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10838 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10839 handling of cancellation and failung pthread_mutex_unlock call.
10840 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10841 * Makefile (tests): Add tst-cond8 and tst-cond9.
10842 * tst-cond8.c: New file.
10843 * tst-cond9.c: New file.
10845 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10847 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10848 non-standard initializers with __USE_GNU.
10850 * Makefile (tests): Add tst-cleanup3.
10851 * tst-cleanup3.c: New file.
10853 2003-02-12 Ulrich Drepper <drepper@redhat.com>
10855 * Makefile (tests): Add tst-attr1 and tst-attr2.
10856 * tst-attr1.c: New file.
10857 * tst-attr2.c: New file.
10859 * Makefile: Add rules to build and run tst-atfork2 test.
10860 * tst-atfork2.c: New file.
10861 * tst-atfork2mod.c: New file.
10863 * sysdeps/unix/sysv/linux/unregister-atfork.c
10864 (__unregister_atfork): Free the memory allocated for the handlers
10865 after removing them from the lists.
10867 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10870 * tst-atfork1.c (do_test): Wait for the child we forked.
10871 Report error in child.
10873 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10875 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10877 2003-02-10 Ulrich Drepper <drepper@redhat.com>
10879 * Makefile (tests): Add tst-cancel8.
10880 * tst-cancel8.c: New file.
10882 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10883 clearing of control variable.
10884 * Makefile (tests): Add tst-once3 and tst-once4.
10885 * tst-once3.c: New file.
10886 * tst-once4.c: New file.
10888 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10890 * sysdeps/sh/Makefile: New file.
10891 * sysdeps/sh/bits/atomic.h: New file.
10892 * sysdeps/sh/pthread_spin_init.c: New file.
10893 * sysdeps/sh/pthread_spin_lock.c: New file.
10894 * sysdeps/sh/pthread_spin_trylock.S: New file.
10895 * sysdeps/sh/pthread_spin_unlock.S: New file.
10896 * sysdeps/sh/pthreaddef.h: New file.
10897 * sysdeps/sh/tcb-offsets.sym: New file.
10898 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10899 * sysdeps/sh/tls.h: New file.
10900 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10901 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10902 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10903 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10904 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10905 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10906 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10907 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10908 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10909 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10910 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10911 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10912 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10913 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10914 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10915 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10916 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10917 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10918 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10919 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10920 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10921 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10922 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10923 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10924 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10925 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10926 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10927 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10928 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10929 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10931 2003-02-08 Ulrich Drepper <drepper@redhat.com>
10933 * tst-cond2.c: Rearrange code to not rely on behavior undefined
10934 according to POSIX.
10936 * tst-basic2.c (do_test): Lock mutex before creating the thread.
10938 2003-02-07 Ulrich Drepper <drepper@redhat.com>
10940 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10941 (TLS_GET_FS): New #define.
10942 (TLS_SET_FS): New #define.
10943 Correct value of __NR_set_thread_area.
10945 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10947 2003-02-06 Ulrich Drepper <drepper@redhat.com>
10949 * Makefile (tests): Add tst-popen1.
10950 * tst-popen1.c: New file.
10952 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10953 but inactive generalization.
10954 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10955 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10956 Minor optimization, remove one instruction.
10957 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10959 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
10961 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10963 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
10965 * init.c (__NR_set_tid_address): Add #ifdef for s390.
10966 * sysdeps/pthread/pthread_barrier_wait.c: New file.
10967 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10968 * sysdeps/pthread/pthread_cond_signal.c: New file.
10969 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10970 * sysdeps/pthread/pthread_cond_wait.c: New file.
10971 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10972 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10973 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10974 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10975 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10976 * sysdeps/s390/Makefile: New file.
10977 * sysdeps/s390/bits/atomic.h: New file.
10978 * sysdeps/s390/pthread_spin_init.c: New file.
10979 * sysdeps/s390/pthread_spin_lock.c: New file.
10980 * sysdeps/s390/pthread_spin_trylock.c: New file.
10981 * sysdeps/s390/pthread_spin_unlock.c: New file.
10982 * sysdeps/s390/pthreaddef.h: New file.
10983 * sysdeps/s390/tcb-offsets.sym: New file.
10984 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10985 * sysdeps/s390/tls.h: New file.
10986 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10987 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10988 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10989 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10990 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10991 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10992 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10993 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10994 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10995 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10996 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10997 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10998 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10999 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11000 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11001 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11002 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11003 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11004 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11005 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11006 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11007 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11008 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11010 2003-02-04 Ulrich Drepper <drepper@redhat.com>
11012 * atomic.h: Add a couple more default implementations.
11013 (atomic_compare_and_exchange_acq): Use
11014 __arch_compare_and_exchange_32_acq in return value definition. It
11016 (atomic_bit_set): Renamed from atomic_set_bit.
11017 Add missing atomic_ prefixes.
11019 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11020 thread library is available, use correct value to mark initialized
11023 2003-02-03 Ulrich Drepper <drepper@redhat.com>
11025 * allocatestack.c (allocate_stack): Use __getpagesize instead of
11026 __sysconf to determine pagesize.
11028 * pthread_create.c: Include <atomic.h>.
11029 * allocatestack.c (allocate_stack): Implement coloring of the
11030 allocated stack memory. Rename pagesize to pagesize_m1. It's the
11031 size minus one. Adjust users.
11032 * sysdeps/i386/i686/Makefile: New file.
11034 2003-02-02 Ulrich Drepper <drepper@redhat.com>
11036 * allocatestack.c: Improve comment throughout the file.
11038 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11039 (__lll_lock_wait): Add branch prediction.
11040 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11041 (__lll_lock_wait): Likewise.
11042 (lll_unlock_wake_cb): Removed.
11044 2003-01-31 Ulrich Drepper <drepper@redhat.com>
11046 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11047 _POSIX_THREAD_PRIORITY_SCHEDULING.
11049 2003-01-30 Jakub Jelinek <jakub@redhat.com>
11051 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11052 Fix return type of ptr___pthread_getspecific.
11054 2003-01-29 Ulrich Drepper <drepper@redhat.com>
11056 * Makefile (tests): Add tst-umask1.
11057 (tst-umask1-ARGS): Define.
11058 * tst-umask1.c: New file.
11060 2003-01-28 Ulrich Drepper <drepper@redhat.com>
11062 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
11063 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11064 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11065 pthread_rwlock_unlock.
11066 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11067 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11068 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11069 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11070 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11072 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11073 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11075 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11076 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11077 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11079 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11080 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11082 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11083 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11084 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11086 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11087 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11089 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11091 * Makefile (libpthread-routines): Remove lowlevelcond and
11092 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11093 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11094 and pthread_cond_broadcast.
11095 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11096 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11097 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11098 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11099 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11100 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11101 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11102 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11103 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11104 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11105 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11106 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11107 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11108 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11109 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11110 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11111 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11112 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11113 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11114 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11115 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11116 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11117 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11118 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11119 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11120 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11121 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11122 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11123 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11124 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11125 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11127 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11128 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11129 of the code is moved to ...
11130 * sysdeps/pthread/createthread.c: ...here. New file.
11132 2003-01-27 Ulrich Drepper <drepper@redhat.com>
11134 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11135 (__new_sem_post): Clear %eax before returning.
11136 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11138 * Makefile (tests): Add tst-cleanup2.
11139 * tst-cleanup2.c: New file.
11141 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11142 Interpret first parameter correctly.
11144 2003-01-17 Ulrich Drepper <drepper@redhat.com>
11146 * Makefile (headers): Add bits/semaphore.h.
11148 2003-01-16 Jakub Jelinek <jakub@redhat.com>
11150 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11153 2003-01-14 Ulrich Drepper <drepper@redhat.com>
11155 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11156 must be used and mapping failed.
11157 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11159 * Makefile (CFLAGS-pthread_self.os): Define this, not
11160 CFLAGS-pthread_self.c.
11162 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11164 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11165 lll_unlock_wake_cb.
11167 * Makefile (libpthread-routines): Add version. Add rules to build
11168 version.os and banner.h.
11169 * version.c: New file.
11171 2003-01-13 Jakub Jelinek <jakub@redhat.com>
11173 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11174 the alias unconditional.
11175 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11177 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11179 * Makefile (CFLAGS-pthread_self.c): New definition.
11181 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11183 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11184 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11185 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11186 * init.c (__pthread_initialize_minimal_internal): Likewise.
11188 2003-01-07 Jakub Jelinek <jakub@redhat.com>
11190 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11192 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11193 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11194 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11195 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11196 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11197 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11199 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11201 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11202 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11203 * tst-cancel-wrappers.sh: Remove all exceptions.
11205 2003-01-05 Ulrich Drepper <drepper@redhat.com>
11207 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11208 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11210 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11211 Use __libc_pthread_functions array if SHARED.
11213 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11214 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11216 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11217 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11218 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11219 __libc_ptf_call instead of __libc_maybe_call.
11220 (PTF): New #define.
11221 (__libc_cleanup_region_start): Wrap function name with PTF call.
11222 (__libc_cleanup_region_end): Likewise.
11223 (__libc_cleanup_end): Likewise.
11225 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11226 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11227 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11228 * pthreadP.h: Add prototypes.
11230 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11231 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11232 __pthread_rwlock_unlock aliases.
11233 * pthreadP.h: Add prototypes for new aliases.
11235 * pthreadP.h (struct pthead_functions): Moved to...
11236 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11237 * init.c (pthread_functions): Add initializers for new elements.
11239 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11240 __pthread_cleanup_pop_restore aliases.
11241 * pthreadP.h: Add prototypes.
11243 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11244 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11245 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11246 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11247 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11248 * pthreadP.h: Adjust prototypes and callers.
11250 2003-01-04 Ulrich Drepper <drepper@redhat.com>
11252 * Makefile (tests): Add tst-cancel7.
11253 (tst-cancel7-ARGS): New variable.
11254 * tst-cancel7.c: New file.
11256 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11257 around gcc defficiencies.
11258 * old_pthread_cond_signal.c: Likewise.
11259 * old_pthread_cond_timedwait.c: Likewise.
11260 * old_pthread_cond_wait.c: Likewise.
11262 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11264 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11266 * Makefile (tests): Add tst-cond7.
11267 * tst-cond7.c: New file.
11269 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11270 (condvar_cleanup): Get condvar address from the right place.
11272 * atomic.h: Correct definitions of atomic_full_barrier,
11273 atomic_read_barrier, atomic_write_barrier.
11275 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11277 * old_pthread_cond_signal.c: Likewise.
11278 * old_pthread_cond_timedwait.c: Likewise.
11279 * old_pthread_cond_wait.c: Likewise.
11281 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11283 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11285 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11287 * pthreadP.h (pthread_cond_2_0_t): New type.
11288 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11289 Use new type for the 2.0 condvar function prototypes.
11290 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11291 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11293 * old_pthread_cond_destroy.c: Likewise.
11294 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11295 * old_pthread_cond_signal.c: Likewise.
11296 * old_pthread_cond_timedwait.c: Likewise.
11297 * old_pthread_cond_wait.c: Likewise.
11299 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11300 (__pthread_cond_wait): Don't save cancellation mode and seq value
11303 * herrno.c (__h_errno_location): Don't define as weak.
11305 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11307 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11308 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11309 and pthread_cond_wait.
11310 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11312 (__pthread_cond_broadcast_2_0): ... this.
11313 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11315 (__pthread_cond_destroy_2_0): ... this.
11316 * old_pthread_cond_init.c (__old_pthread_cond_init):
11318 (__pthread_cond_init_2_0): ... this.
11319 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11321 (__pthread_cond_signal_2_0): ... this.
11322 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11324 (__pthread_cond_wait_2_0): ... this.
11325 * pthread_cond_destroy.c: Include shlib-compat.h.
11326 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11327 * pthread_cond_init.c: Include shlib-compat.h.
11328 (pthread_cond_init): Change strong_alias into versioned_symbol.
11329 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11330 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11332 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11333 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11334 __pthread_cond_wait_2_0): New prototypes.
11335 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11336 __old_pthread_cond_init, __old_pthread_cond_signal,
11337 __old_pthread_cond_wait): Removed.
11338 * init.c: Include shlib-compat.h.
11339 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11340 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11341 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11342 ptr___pthread_cond_*_2_0 fields.
11343 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11344 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11346 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11347 LIBC_SIGACTION was not yet defined.
11348 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11349 [!defined LIBC_SIGACTION] (__sigaction): New function and
11351 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11352 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11354 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11356 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11358 2003-01-02 Ulrich Drepper <drepper@redhat.com>
11360 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11361 New, larger type definition.
11362 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11364 * Versions [libpthread]: Add definitions for new pthread_cond_*
11365 interfaces for version GLIBC_2.3.2.
11366 * pthread_cond_init.c: Update initialization for new type definition.
11367 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11368 pthread_cond_timedwait, pthread_cond_signal, and
11369 pthread_cond_broadcast. Add old_pthread_cond_init,
11370 old_pthread_cond_destroy, old_pthread_cond_wait,
11371 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11372 old_pthread_cond_broadcast.
11373 * old_pthread_cond_broadcast.c: New file.
11374 * old_pthread_cond_destroy.c: New file.
11375 * old_pthread_cond_init.c: New file.
11376 * old_pthread_cond_signal.c: New file.
11377 * old_pthread_cond_timedwait.c: New file.
11378 * old_pthread_cond_wait.c: New file.
11379 * pthreadP.h: Add prototypes for the compatibility interfaces.
11381 * pthread_cond_destroy.c: Don't include <errno.h>.
11383 2003-01-01 Ulrich Drepper <drepper@redhat.com>
11385 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11386 unnecessary zero offset when addressing MUTEX.
11388 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11390 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11392 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11393 for __register_atfork.
11395 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11397 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11398 instead of ASSEMBLER test macro.
11400 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11401 __libc_current_sigrtmax): Add libc_hidden_def.
11403 * sysdeps/pthread/list.h: Remove assert.h include.
11405 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11407 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11408 __pthread_initialize_minimal_internal not
11409 __pthread_initialize_minimal.
11411 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11413 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11414 __pthread_initialize_minimal as hidden.
11416 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11419 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11421 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11422 $(common-objpfx)format.lds, include that into the output script.
11424 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11426 2002-12-28 Andreas Jaeger <aj@suse.de>
11428 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11429 nsec resolution changes.
11430 (xstat64_conv): Likewise.
11431 (xstat32_conv): Likewise.
11432 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11433 struct kernel_stat.
11434 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11435 structs stat and stat64.
11436 * time/time.h (__timespec_defined): Define for __USE_MISC.
11437 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11439 2002-12-30 Jakub Jelinek <jakub@redhat.com>
11441 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11443 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11444 (pthread_exit): Use strong_alias to avoid warnings.
11445 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11446 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11447 ptr___pthread_attr_init_2_*.
11448 * init.c (pthread_functions): Adjust.
11450 2002-12-29 Ulrich Drepper <drepper@redhat.com>
11452 * forward.c: Make all functions available by default again. It
11453 caused too much trouble.
11455 * pt-siglongjmp.c: Removed.
11457 2002-12-28 Jakub Jelinek <jakub@redhat.com>
11459 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11460 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11461 * sysdeps/i386/Makefile: New file.
11462 * sysdeps/i386/tcb-offsets.sym: New file.
11463 * sysdeps/pthread/tcb-offsets.h: New file.
11464 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11465 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11467 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11468 __register_atfork...
11469 (GLIBC_2.3.2): ...here.
11471 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11473 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11474 pthread_attr_setstackaddr with __attribute_deprecated__.
11476 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11478 * pt-system.c (system): Remove cancellation handling.
11479 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11480 cancellation routines.
11482 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11484 * descr.h: Include <dl-sysdep.h>.
11485 (struct pthread): Move header.data.list to the back of the struct.
11486 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11487 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11488 (SYSINFO_OFFSEET): Likewise.
11490 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11492 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11494 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11495 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11496 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11497 (USE_DL_SYSINFO): Undef.
11499 2002-12-22 Jakub Jelinek <jakub@redhat.com>
11501 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11502 $(common-objpfx)libc.so.
11503 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11504 it is bigger than pipe buffer size even on arches with bigger
11506 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11508 2002-12-25 Ulrich Drepper <drepper@redhat.com>
11510 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11511 correct errno access for case that USE___THREAD is not defined.
11513 2002-12-24 Ulrich Drepper <drepper@redhat.com>
11515 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11516 Patch by Marijn Ros <marijn@mad.scientist.com>.
11518 2002-12-22 Roland McGrath <roland@redhat.com>
11520 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11522 2002-12-20 Ulrich Drepper <drepper@redhat.com>
11524 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11526 2002-12-19 Ulrich Drepper <drepper@redhat.com>
11528 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11529 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11530 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11532 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11534 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11535 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11536 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11537 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11538 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11539 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11540 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11541 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11543 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11545 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11547 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11549 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11551 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11552 that sysinfo is properly initialized.
11553 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11554 to 1 only for ld.so.
11556 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11557 RTLD_CORRECT_DYNAMIC_WEAK.
11559 2002-12-19 Jakub Jelinek <jakub@redhat.com>
11561 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11562 Use return 0 as 6th argument to FORWARD4.
11563 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11565 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11567 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11568 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11569 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11570 (INIT_SYSINFO): New #define.
11571 (TLS_TP_INIT): Use INIT_SYSINFO.
11572 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11573 At test to make sure SYSINFO_OFFSET value is correct.
11574 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11576 2002-12-18 Jakub Jelinek <jakub@redhat.com>
11578 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11579 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11580 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11581 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11582 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11583 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11584 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11586 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11588 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11589 macro instead of using int $0x80 directly.
11591 * sysdeps/pthread/bits/stdio-lock.h: New file.
11592 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11593 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11594 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11595 * Makefile (routines): Add libc-lowlevelmutex.
11597 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11598 __i686.get_pc_thunk.dx.
11600 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11602 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11603 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11604 ($(objpfx)tst-cancel-wrappers.out): New rule.
11605 * tst-cancel-wrappers.sh: New test.
11606 * tst-locale1.c: Include signal.h.
11607 (uselocale): Test static linking of __libc_current_sigrt*.
11609 2002-12-17 Ulrich Drepper <drepper@redhat.com>
11611 * Makefile (tests): Add tst-cancel6.
11612 * tst-cancel6.c: New file
11614 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11616 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11617 Define meaningfully for assembler as well.
11618 * pthreadP.h (struct pthread_functions): Remove
11619 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11620 and ptr_pthread_attr_init_2_1 fields.
11621 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11622 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11623 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11624 (FORWARD3): Define using FORWARD4.
11625 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11627 * pt-system.c: Remove duplicate stdlib.h include.
11629 2002-12-16 Ulrich Drepper <drepper@redhat.com>
11631 * sem_init.c: Define sem_init@GLIBC_2.0.
11632 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11633 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11635 * flockfile.c: Moved to...
11636 * sysdeps/pthread/flockfile.c: ...here. New file.
11637 * funlockfile.c: Moved to...
11638 * sysdeps/pthread/funlockfile.c: ...here. New file.
11639 * ftrylockfile.c: Moved to...
11640 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11642 2002-12-16 Jakub Jelinek <jakub@redhat.com>
11644 * libc-cancellation.c: Guard both function with
11645 #if !defined NOT_IN_libc.
11646 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11647 automatically provided pthread wrappers.
11648 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11649 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11651 * pt-open.c: Removed.
11652 * pt-fcntl.c: Removed.
11653 * pt-fsync.c: Removed.
11654 * pt-lseek.c: Removed.
11655 * pt-msgrcv.c: Removed.
11656 * pt-msgsnd.c: Removed.
11657 * pt-msync.c: Removed.
11658 * pt-nanosleep.c: Removed.
11659 * pt-open64.c: Removed.
11660 * pt-pause.c: Removed.
11661 * pt-pread.c: Removed.
11662 * pt-pread64.c: Removed.
11663 * pt-pwrite.c: Removed.
11664 * pt-pwrite64.c: Removed.
11665 * pt-read.c: Removed.
11666 * pt-recv.c: Removed.
11667 * pt-recvfrom.c: Removed.
11668 * pt-recvmsg.c: Removed.
11669 * pt-send.c: Removed.
11670 * pt-sendto.c: Removed.
11671 * pt-sigtimedwait.c: Removed.
11672 * pt-sigwait.c: Removed.
11673 * pt-wait.c: Removed.
11674 * pt-waitpid.c: Removed.
11675 * pt-write.c: Removed.
11676 * pt-accept.c: Removed.
11677 * pt-close.c: Removed.
11678 * pt-connect.c: Removed.
11679 * pt-lseek64.c: Removed.
11680 * pt-sendmsg.c: Removed.
11681 * pt-tcdrain.c: Removed.
11683 2002-12-15 Ulrich Drepper <drepper@redhat.com>
11685 * init.c (__pthread_initialize_minimal_internal): Renamed from
11686 __pthread_initialize_minimal. Make old name an alias. This
11687 converts a normal relocation into a relative relocation.
11689 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11691 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11692 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11693 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11694 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11695 pt-sigwaitinfo, pt-waitid, and pt-writev.
11696 * pt-creat.c: Removed.
11697 * pt-poll.c: Removed.
11698 * pt-pselect.c: Removed.
11699 * pt-readv.c: Removed.
11700 * pt-select.c: Removed.
11701 * pt-sigpause.c: Removed.
11702 * pt-sigsuspend.c: Removed.
11703 * pt-sigwaitinfo.c: Removed.
11704 * pt-waitid.c: Removed.
11705 * pt-writev.c: Removed.
11707 * init.c (pthread_functions): New variable.
11708 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11709 (or NULL) to __libc_pthread_init.
11710 * forward.c: Rewrite to use __libc:pthread_functions array to get
11711 function addresses.
11712 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11714 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11715 Take new parameter. Copy content of variable pointed to by it
11716 to __libc_pthread_init.
11718 * pthreadP.h (struct pthread_functions): New type.
11719 (__libc_pthread_init): Declare.
11721 * pthread_attr_destroy.c: Add namespace protected alias.
11722 * pthread_attr_getdetachstate.c: Likewise.
11723 * pthread_attr_getinheritsched.c: Likewise.
11724 * pthread_attr_getschedparam.c: Likewise.
11725 * pthread_attr_getschedpolicy.c: Likewise.
11726 * pthread_attr_getscope.c: Likewise.
11727 * pthread_attr_setdetachstate.c: Likewise.
11728 * pthread_attr_setinheritsched.c: Likewise.
11729 * pthread_attr_setschedparam.c: Likewise.
11730 * pthread_attr_setschedpolicy.c: Likewise.
11731 * pthread_attr_setscope.c: Likewise.
11732 * pthread_cond_broadcast.c: Likewise.
11733 * pthread_cond_destroy.c: Likewise.
11734 * pthread_cond_init.c: Likewise.
11735 * pthread_cond_signal.c: Likewise.
11736 * pthread_cond_wait.c: Likewise.
11737 * pthread_condattr_destroy.c: Likewise.
11738 * pthread_condattr_init.c: Likewise.
11739 * pthread_equal.c: Likewise.
11740 * pthread_exit.c: Likewise.
11741 * pthread_getschedparam.c: Likewise.
11742 * pthread_self.c: Likewise.
11743 * pthread_setcancelstate.c: Likewise.
11744 * pthread_setschedparam.c: Likewise.
11745 * pthread_mutex_destroy.c: Likewise.
11746 * pthread_mutex_init.c: Likewise.
11747 * pthreadP.h: Add prototypes for the aliases.
11749 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11750 multiple_threads member in correct TCB to 1.
11752 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11753 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11754 member of thread decriptor, otherwise return unconditionally 1.
11756 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11758 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11759 regular Linux version. Remove file.
11760 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11761 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11762 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11763 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11764 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11765 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11766 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11767 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11768 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11769 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
11770 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
11771 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
11772 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
11773 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
11774 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
11775 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
11776 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
11777 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
11778 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
11779 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
11780 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
11781 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
11782 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
11783 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
11784 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
11785 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
11786 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
11787 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
11788 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
11789 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
11791 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11793 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11794 * sysdeps/unix/sysv/linux/open.c: Removed.
11795 * sysdeps/unix/sysv/linux/fsync.c: Removed.
11796 * sysdeps/unix/sysv/linux/lseek.c: Removed.
11797 * sysdeps/unix/sysv/linux/msync.c: Removed.
11798 * sysdeps/unix/sysv/linux/read.c: Removed.
11799 * sysdeps/unix/sysv/linux/close.c: Removed.
11800 * sysdeps/unix/sysv/linux/creat.c: Removed.
11801 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11802 * sysdeps/unix/sysv/linux/pause.c: Removed.
11803 * sysdeps/unix/sysv/linux/select.c: Removed.
11804 * sysdeps/unix/sysv/linux/write.c: Removed.
11806 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11808 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11809 element in TCB to see whether locking is needed.
11811 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11812 MULTIPLE_THREADS_OFFSET value is correct.
11814 * sysdeps/unix/sysv/linux/close.c: New file.
11815 * sysdeps/unix/sysv/linux/connect.S: New file.
11816 * sysdeps/unix/sysv/linux/creat.c: New file.
11817 * sysdeps/unix/sysv/linux/fsync.c: New file.
11818 * sysdeps/unix/sysv/linux/llseek.c: New file.
11819 * sysdeps/unix/sysv/linux/lseek.c: New file.
11820 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11821 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11822 * sysdeps/unix/sysv/linux/msync.c: New file.
11823 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11824 * sysdeps/unix/sysv/linux/open.c: New file.
11825 * sysdeps/unix/sysv/linux/open64.c: New file.
11826 * sysdeps/unix/sysv/linux/pause.c: New file.
11827 * sysdeps/unix/sysv/linux/poll.c: New file.
11828 * sysdeps/unix/sysv/linux/pread.c: New file.
11829 * sysdeps/unix/sysv/linux/pread64.c: New file.
11830 * sysdeps/unix/sysv/linux/pselect.c: New file.
11831 * sysdeps/unix/sysv/linux/pwrite.c: New file.
11832 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11833 * sysdeps/unix/sysv/linux/readv.c: New file.
11834 * sysdeps/unix/sysv/linux/recv.S: New file.
11835 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11836 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11837 * sysdeps/unix/sysv/linux/select.c: New file.
11838 * sysdeps/unix/sysv/linux/send.S: New file.
11839 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11840 * sysdeps/unix/sysv/linux/sendto.S: New file.
11841 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11842 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11843 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11844 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11845 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11846 * sysdeps/unix/sysv/linux/system.c: New file.
11847 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11848 * sysdeps/unix/sysv/linux/wait.c: New file.
11849 * sysdeps/unix/sysv/linux/waitid.c: New file.
11850 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11851 * sysdeps/unix/sysv/linux/writev.c: New file.
11852 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11854 * pt-readv.c: Fix comment.
11856 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11858 * tst-cleanup1.c: Include stdlib.h.
11860 * tst-cancel5.c: New test.
11861 * Makefile (tests): Add tst-cancel5.
11862 (tst-cancel5): Link against libc.so libpthread.so in that order.
11864 2002-12-13 Ulrich Drepper <drepper@redhat.com>
11866 * forward.c (test_loaded): Prevent recursive calls.
11868 * Makefile (routines): Add libc-cancellation.
11869 * libc-cancellation.c: New file.
11870 * descr.h (struct pthread): Add multiple_threads field.
11871 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11872 new thread descriptor to 1.
11873 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11874 Initialize multiple_thread field after successful thread creation.
11875 * cancellation.c (__do_cancel): Move to pthreadP.h.
11876 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11877 (__pthread_disable_asynccancel): Add internal_function attribute.
11878 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11879 * pthread_setcancelstate.c: Likewise.
11880 * pthread_setcanceltype.c: Likewise.
11881 * pthread_exit.c: Likewise.
11882 * pthreadP.h (CANCELLATION_P): Likewise.
11883 (__do_cancel): Define as static inline.
11884 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11885 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11887 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11888 fields. Define MULTIPLE_THREADS_OFFSET.
11889 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11891 * sysdeps/unix/sysv/linux/accept.S: New file.
11892 * sysdeps/unix/sysv/linux/read.c: New file.
11893 * sysdeps/unix/sysv/linux/write.c: New file.
11894 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11895 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11896 initialization of __libc_locking_needed.
11897 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11898 __libc_locking_needed, use multiple_threads field in TCB.
11899 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11901 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11903 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11905 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11907 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11908 access to __libc_locking_needed for PIC.
11910 2002-12-12 Jakub Jelinek <jakub@redhat.com>
11912 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11913 declare for libc.so.
11914 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11916 (__libc_lock_lock): Put into statement expression.
11917 (__libc_lock_unlock): Remove trailing semicolon.
11918 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11920 2002-12-12 Roland McGrath <roland@redhat.com>
11922 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11923 "m" constraint to refer to __libc_locking_needed. Declare it here.
11925 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11927 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11928 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11929 Initialize __libc_locking_needed.
11930 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11931 instead of __register_pthread_fork_handler.
11932 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11933 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11934 fork-gen with libc_pthread_init.
11935 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11936 of __register_pthread_fork_handler.
11937 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11938 of __register_pthread_fork_handler.
11939 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11940 __libc_locking_needed to determine whether lock prefix can be avoided.
11941 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11943 2002-12-11 Ulrich Drepper <drepper@redhat.com>
11945 * Makefile (tests): Add tst-cleanup1.
11946 * tst-cleanup1.c: New file.
11947 * cancellation.c (__cleanup_thread): Removed.
11948 (__do_cancel): Remove call to __cleanup_thread.
11949 * pthreadP.h: Remove __cleanup_thread prorotype.
11951 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11952 Remember function and argument even if cancellation handler
11953 function is not available.
11954 (__libc_cleanup_region_end): Execute registered function directly if
11955 pthread functions are not available.
11956 (__libc_cleanup_end): Likewise.
11958 * init.c (__pthread_initialize_minimal): Fix initialization in
11959 static lib by preventing gcc from being too clever.
11961 2002-12-10 Ulrich Drepper <drepper@redhat.com>
11963 * init.c (__pthread_initialize_minimal): Remove unneccesary
11966 * Makefile (tests): We can run tst-locale2 now.
11968 2002-12-09 Ulrich Drepper <drepper@redhat.com>
11970 * Versions: Remove duplicated sigwait entry.
11972 2002-12-08 Ulrich Drepper <drepper@redhat.com>
11974 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11977 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11979 * pthreadP.h: Declare __pthread_enable_asynccancel and
11980 __pthread_disable_asynccancel.
11981 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11982 (CANCEL_RESET): Use __pthread_disable_asynccancel.
11983 * cancellation.c (__pthread_enable_asynccancel): New function.
11984 (__pthread_disable_asynccancel): New function.
11985 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11986 * pt-close.c: Likewise.
11987 * pt-connect.c: Likewise.
11988 * pt-creat.c: Likewise.
11989 * pt-fcntl.c: Likewise.
11990 * pt-fsync.c: Likewise.
11991 * pt-lseek.c: Likewise.
11992 * pt-lseek64.c: Likewise.
11993 * pt-msgrcv.c: Likewise.
11994 * pt-msgsnd.c: Likewise.
11995 * pt-msync.c: Likewise.
11996 * pt-nanosleep.c: Likewise.
11997 * pt-open.c: Likewise.
11998 * pt-open64.c: Likewise.
11999 * pt-pause.c: Likewise.
12000 * pt-poll.c: Likewise.
12001 * pt-pread.c: Likewise.
12002 * pt-pread64.c: Likewise.
12003 * pt-pselect.c: Likewise.
12004 * pt-pwrite.c: Likewise.
12005 * pt-pwrite64.c: Likewise.
12006 * pt-read.c: Likewise.
12007 * pt-readv.c: Likewise.
12008 * pt-recv.c: Likewise.
12009 * pt-recvfrom.c: Likewise.
12010 * pt-recvmsg.c: Likewise.
12011 * pt-select.c: Likewise.
12012 * pt-send.c: Likewise.
12013 * pt-sendmsg.c: Likewise.
12014 * pt-sendto.c: Likewise.
12015 * pt-sigpause.c: Likewise.
12016 * pt-sigsuspend.c: Likewise.
12017 * pt-sigtimedwait.c: Likewise.
12018 * pt-sigwait.c: Likewise.
12019 * pt-sigwaitinfo.c: Likewise.
12020 * pt-system.c: Likewise.
12021 * pt-tcdrain.c: Likewise.
12022 * pt-wait.c: Likewise.
12023 * pt-waitid.c: Likewise.
12024 * pt-waitpid.c: Likewise.
12025 * pt-write.c: Likewise.
12026 * pt-writev.c: Likewise.
12027 * pthread_join.c: Likewise.
12028 * pthread_timedjoin.c: Likewise.
12030 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12031 (__xpg_sigpause): New function.
12032 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12034 2002-12-07 Ulrich Drepper <drepper@redhat.com>
12036 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12038 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12039 _GI_pthread_cleanup_pop to pthreadP.h.
12041 * ftrylockfile.c: Use _IO_lock_trylock instead of
12042 pthread_mutex_trylock.
12044 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12045 (CANCEL_RESET): Likewise.
12046 (__pthread_setcanceltype_): Declare.
12047 (__pthread_mutex_lock_internal): Declare.
12048 (__pthread_mutex_unlock_internal): Declare.
12049 (__pthread_once_internal): Declare.
12050 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12051 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12053 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12054 and pthread_mutex_unlock.
12055 * pthread_cond_wait.c: Likewise.
12056 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12057 * pthread_mutex_unlock.c: Likewise.
12059 * pthread_setcanceltype.c: Add additional alias
12060 __pthread_setcanceltype.
12062 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12063 * sem_open.c (sem_open): Likewise.
12064 Use __libc_open, __libc_write, and __libc_close instead of
12065 open, write, and close respectively.
12067 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12068 Rewrite as statement expression since it must return a value.
12070 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12071 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12074 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12075 alias __pthread_once_internal.
12077 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12079 2002-12-06 Ulrich Drepper <drepper@redhat.com>
12081 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12082 * tst-stdio1.c: New file.
12083 * tst-stdio2.c: New file.
12085 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12087 * Makefile (tests): Comment out tst-locale2 for now.
12088 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12090 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12092 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12093 Use _IO_lock_init instead of explicit assignment.
12095 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12096 Define __libc_lock_* and __libc_lock_recursive macros with
12097 lowlevellock macros, not pthread mutexes.
12099 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
12100 of pthread_mutex_lock.
12101 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
12102 instead of pthread_mutex_unlock.
12104 2002-12-06 Roland McGrath <roland@redhat.com>
12106 * allocatestack.c (__stack_user): Use uninitialized defn.
12107 * init.c (__pthread_initialize_minimal): Initialize it here.
12109 2002-12-05 Roland McGrath <roland@redhat.com>
12111 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12113 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12115 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12116 missing & here too.
12118 2002-12-05 Ulrich Drepper <drepper@redhat.com>
12120 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12122 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12123 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12124 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12125 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12126 for __libc_lock_* macros.
12127 * Makefile (routines): Add libc-lowlevellock.
12129 2002-10-09 Roland McGrath <roland@redhat.com>
12131 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12132 Under [__PIC__], call the function via the pointer fetched for
12133 comparison rather than a call by name that uses the PLT.
12134 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12135 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12136 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12137 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12138 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12140 2002-12-04 Roland McGrath <roland@redhat.com>
12142 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12144 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12145 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12147 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12149 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12151 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12152 a completely opaque, non-integer type.
12153 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12155 2002-12-05 Jakub Jelinek <jakub@redhat.com>
12157 * sysdeps/i386/tls.h: Include stdlib.h.
12158 * sysdeps/x86_64/tls.h: Likewise.
12160 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12162 * Makefile (tests): Add tst-locale2.
12163 (tests-static): Likewise.
12164 * tst-locale2.c: New file.
12166 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12167 volatile and add memory clobbers to lock operations.
12169 2002-12-03 Ulrich Drepper <drepper@redhat.com>
12171 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12172 * sysdeps/i386/i486/bits/atomic.h: New file.
12173 * sysdeps/i386/i586/bits/atomic.h: New file.
12174 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12175 include i486 version.
12176 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12177 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12178 Patch by Marijn Ros <marijn@mad.scientist.com>.
12180 * allocatestack.c (get_cached_stack): Don't crash if we first
12181 found a stack with a larger size then needed.
12182 Reported by Hui Huang <hui.huang@sun.com>.
12184 * Makefile (tests): Add tst-sysconf.
12185 * tst-sysconf.c: New file.
12187 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12188 PTHREAD_THREADS_MAX.
12190 2002-12-02 Roland McGrath <roland@redhat.com>
12192 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12193 Declare using hidden_proto instead of attribute_hidden, so there are
12194 non-.hidden static symbols for gdb to find.
12195 (__pthread_keys): Likewise.
12196 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12197 * allocatestack.c (__stack_user): Likewise.
12198 * pthread_create.c (__pthread_keys): Likewise.
12199 (__nptl_threads_events, __nptl_last_event): Make these static instead
12201 * pthread_key_create.c (__pthread_pthread_keys_max,
12202 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12204 2002-12-02 Ulrich Drepper <drepper@redhat.com>
12206 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12208 * tst-locale1.c: New file.
12210 * pthread_cond_timedwait.c: Include <stdlib.h>.
12212 * Makefile (tests): Add tst-fork2 and tst-fork3.
12213 * tst-fork2.c: New file.
12214 * tst-fork3.c: New file.
12216 2002-11-28 Ulrich Drepper <drepper@redhat.com>
12218 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12220 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12221 require it to 200112L.
12223 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12224 instruction only if HAVE_CMOV is defined.
12225 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12227 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12229 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12231 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12233 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12235 2002-11-27 Ulrich Drepper <drepper@redhat.com>
12237 * sysdeps/x86_64/bits/atomic.h: New file.
12239 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12242 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12243 possible since gettid cannot fail.
12245 * sysdeps/x86_64/pthreaddef.h: New file.
12247 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12249 * sysdeps/x86_64/pthread_spin_init.c: New file.
12250 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12251 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12252 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12254 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12255 Add missing lock prefix. Minute optimization.
12257 * tst-spin2.c (main): Also check successful trylock call.
12259 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12260 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12262 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12263 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12265 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12266 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12267 value in case of an error. Add support for INTERNAL_SYSCALL.
12269 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12270 value in case of an error.
12272 * sysdeps/x86_64/tls.h: New file.
12274 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12276 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12277 takes the array member name and the index as parameters.
12278 (THREAD_SETMEM_NC): Likewise.
12279 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12280 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12283 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12284 to decide which code to use.
12285 (THREAD_SETMEM_NC): Likewise.
12287 * allocatestack.c (queue_stack): Don't remove stack from list here.
12288 Do it in the caller. Correct condition to prematurely terminate
12289 loop to free stacks.
12290 (__deallocate_stack): Remove stack from list here.
12292 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12294 * Makefile (tests): Add tst-stack1.
12295 * tst-stack1.c: New file.
12297 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12300 * pthread_attr_getstack.c: Return bottom of the thread area.
12302 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12304 * Makefile (libpthread-routines): Add pt-allocrtsig and
12305 pthread_kill_other_threads.
12306 * pt-allocrtsig.c: New file.
12307 * pthread_kill_other_threads.c: New file.
12308 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12309 all three functions.
12310 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12312 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12313 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12314 and __libc_allocate_rtsig_private.
12315 * Versions (libpthread): Export pthread_kill_other_threads_np,
12316 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12318 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12320 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12321 the end of the stack. Adjust computations.
12322 When mprotect call fails dequeue stack and free it.
12323 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12325 * pthread_getattr_np.c: Likewise.
12327 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12330 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12332 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12333 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12335 2002-11-22 Ulrich Drepper <drepper@redhat.com>
12337 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12338 * pthread_setspecific.c: Likewise.
12340 2002-11-21 Ulrich Drepper <drepper@redhat.com>
12342 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12343 definitions. Get them from the official place.
12344 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12346 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12347 Use new CLONE_ flags in clone() calls.
12349 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12350 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12352 * Versions: Add pthread_* functions for libc.
12353 * forward.c: New file.
12355 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12357 * herrno.c: New file.
12360 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12361 sem_trywait, and sem_timedwait. Add herrno and res.
12362 * sem_init.c: Don't initialize lock and waiters members.
12363 * sem_open.c: Likewise.
12364 * sem_post.c: Removed.
12365 * sem_wait.c: Removed.
12366 * sem_trywait.c: Removed.
12367 * sem_timedwait.c: Removed.
12368 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12369 Includes full implementations of sem_post, sem_wait, sem_trywait,
12371 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12372 for new implementation.
12373 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12374 and waiters fields.
12376 * tst-sem3.c: Improve error message.
12377 * tst-signal3.c: Likewise.
12379 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12380 to tell the kernel about the termination futex and to initialize tid
12381 member. Don't initialize main_thread.
12382 * descr.h (struct pthread): Remove main_thread member.
12383 * cancelllation.c (__do_cancel): Remove code handling main thread.
12384 The main thread is not special anymore.
12386 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12387 size of the stacks to stack_cache_actsize.
12389 * pt-readv.c: Add missing "defined".
12390 * pt-sigwait.c: Likewise.
12391 * pt-writev.c: Likewise.
12393 2002-11-09 Ulrich Drepper <drepper@redhat.com>
12395 * Versions: Export __connect from libpthread.
12396 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12398 * Makefile (libpthread-routines): Add pt-raise.
12399 * sysdeps/unix/sysv/linux/raise.c: New file.
12400 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12401 * sysdeps/generic/pt-raise.c: New file.
12403 * pthread_cond_init.c: Initialize all data elements of the condvar
12404 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12406 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12407 * pthread_create.c: Likewise.
12409 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12410 * tst-key1.c: New file.
12411 * tst-key2.c: New file.
12412 * tst-key3.c: New file.
12414 * Versions: Export pthread_detach for version GLIBC_2.0.
12415 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12417 2002-11-08 Ulrich Drepper <drepper@redhat.com>
12419 * pthread_key_create.c: Terminate search after an unused key was found.
12420 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12422 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12423 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12425 2002-10-10 Ulrich Drepper <drepper@redhat.com>
12427 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12428 dynamic lookup for errno in PIC.
12430 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12431 release the stack lock as soon as possible.
12432 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12433 the static TLS block.
12434 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12436 * cancellation.c: Renamed from cancelation.c.
12437 * Makefile: Adjust accordingly.
12438 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12439 * cleanup_defer.c: Use CANCELLATION_P.
12440 * pthread_testcancel.c: Likewise.
12441 * descr.h: Fix spelling in comments.
12442 * init.c: Likewise.
12443 * pthread_getattr_np.c: Likewise.
12444 * pthread_getschedparam.c: Likewise.
12445 * pthread_setschedparam.c: Likewise.
12446 * Versions: Likewise.
12448 * pt-pselect.c: New file.
12449 * Makefile (libpthread-routines): Add pt-pselect.
12450 * Versions: Add pselect.
12452 * tst-cancel4.c: New file.
12453 * Makefile (tests): Add tst-cancel4.
12455 2002-10-09 Ulrich Drepper <drepper@redhat.com>
12457 * pthread_mutex_lock.c: Always record lock ownership.
12458 * pthread_mutex_timedlock.c: Likewise.
12459 * pthread_mutex_trylock.c: Likewise.
12461 * pt-readv.c: New file.
12462 * pt-writev.c: New file.
12463 * pt-creat.c: New file.
12464 * pt-msgrcv.c: New file.
12465 * pt-msgsnd.c: New file.
12466 * pt-poll.c: New file.
12467 * pt-select.c: New file.
12468 * pt-sigpause.c: New file.
12469 * pt-sigsuspend.c: New file.
12470 * pt-sigwait.c: New file.
12471 * pt-sigwaitinfo.c: New file.
12472 * pt-waitid.c: New file.
12473 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12474 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12475 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12476 * Versions: Add all the new functions.
12478 * tst-exit1.c: New file.
12479 * Makefile (tests): Add tst-exit1.
12481 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12483 2002-10-08 Ulrich Drepper <drepper@redhat.com>
12485 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12487 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12488 call. pthread_join is an official cancellation point.
12489 * pthread_timedjoin.c: Likewise.
12491 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12492 and the condvar's mutex are retrieved.
12493 * pthread_cond_timedwait.c: Likewise.
12494 Reported by dice@saros.East.Sun.COM.
12496 2002-10-07 Ulrich Drepper <drepper@redhat.com>
12498 * pthreadP.h: Cut out all type definitions and move them...
12499 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12500 * pthreadP.h: Include <internaltypes.h>.
12502 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12503 performance tweaks.
12505 * sem_trywait.c: Shuffle #includes around to get right order.
12506 * sem_timedwait.c: Likewise.
12507 * sem_post.c: Likewise.
12508 * sem_wait.c: Likewise.
12510 * nptl 0.3 released.
12512 * Makefile (tests): Add tst-signal3.
12513 * tst-signal3.c: New file.
12515 2002-10-05 Ulrich Drepper <drepper@redhat.com>
12517 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12518 the asms modify the sem object.
12519 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12521 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12522 the actual members.
12523 * pthreadP.h (struct sem): New type. Actual semaphore type.
12524 * semaphoreP.h: Include pthreadP.h.
12525 * sem_getvalue.c: Adjust to sem_t change.
12526 * sem_init.c: Likewise.
12527 * sem_open.c: Likewise.
12528 * sem_post.c: Likewise.
12529 * sem_timedwait.c: Likewise.
12530 * sem_trywait.c: Likewise.
12531 * sem_wait.c: Likewise.
12533 2002-10-04 Ulrich Drepper <drepper@redhat.com>
12535 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12536 * tst-basic2.c: New file.
12537 * tst-exec1.c: New file.
12538 * tst-exec2.c: New file.
12539 * tst-exec3.c: New file.
12541 * tst-fork1.c: Remove extra */.
12543 * nptl 0.2 released. The API for IA-32 is complete.