1 2012-11-02 H.J. Lu <hongjiu.lu@intel.com>
3 * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
4 (__128bits): New struct typedef.
5 (tcbhead_t): Replace __m128 with __128bits.
7 2012-10-30 Aurelien Jarno <aurelien@aurel32.net>
8 Joseph Myers <joseph@codesourcery.com>
10 * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
12 2012-10-28 David S. Miller <davem@davemloft.net>
14 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
15 Define when we have v9 instructions available.
16 * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
17 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
19 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
21 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
22 to libpthread-routines.
24 2012-10-25 Roland McGrath <roland@hack.frob.com>
26 * tst-cond-except.c (TEST_FUNCTION): New macro.
28 2012-10-25 Joseph Myers <joseph@codesourcery.com>
30 * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
32 * tst-tls6.sh: Use /bin/bash not /bin/sh.
34 2012-10-25 Roland McGrath <roland@hack.frob.com>
36 * tst-basic2.c (do_test): Return RESULT, not always zero.
38 * tst-cond25.c: Include <stdint.h>
39 (waiter): Add casts to uintptr_t between casting integer<->pointer.
40 (timed_waiter): Likewise.
41 (do_test_wait): Likewise.
42 * tst-cond-except.c (thr): Likewise.
43 (do_test): Use prototype definition.
45 2012-10-24 Joseph Myers <joseph@codesourcery.com>
46 Jim Blandy <jimb@codesourcery.com>
48 * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
50 * tst-tls6.sh (test_wrapper_env): New variable. Use it to run
51 programs with LD_PRELOAD set.
53 2012-10-24 Roland McGrath <roland@hack.frob.com>
55 * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
56 ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
57 ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
58 ($(objpfx)tst-rwlock14): Likewise.
60 2012-10-24 Joseph Myers <joseph@codesourcery.com>
62 * Makefile (tests): Remove tst-oddstacklimit.
63 (test-srcs): New variable.
64 (tst-oddstacklimit-ENV): Remove.
65 [$(run-built-tests) = yes] (tests): Depend on
66 $(objpfx)tst-oddstacklimit.out.
67 [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
69 * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
70 setrlimit before executing tst-basic1 test passed to --command.
72 2012-10-23 Joseph Myers <joseph@codesourcery.com>
74 * Makefile [$(cross-compiling) = no]: Change condition to
75 [$(run-built-tests) = yes].
77 2012-10-23 Jim Blandy <jimb@codesourcery.com>
78 Joseph Myers <joseph@codesourcery.com>
80 * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
81 (tst-exec4-ARGS): Likewise.
82 (tst-stackguard1-ARGS): Likewise.
84 2012-10-21 Jim Blandy <jimb@codesourcery.com>
85 Joseph Myers <joseph@codesourcery.com>
87 * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
88 tst-cancel-wrappers.sh.
89 * tst-cancel-wrappers.sh: Use nm program given as first argument,
92 2012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
94 * tst-cond25.c (do_test_wait): Don't check for return value from
97 2012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
100 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
101 (__condvar_tw_cleanup): Adjust the mutex data structure if it
102 was locked by FUTEX_WAIT_REQUEUE_PI.
103 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
104 (__condvar_w_cleanup): Likewise.
105 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
106 (__condvar_cleanup2): Likewise.
107 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
108 (__condvar_cleanup1): Likewise.
110 2012-10-10 Carlos O'Donell <carlos@systemhalted.org>
112 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
113 defined __EXCEPTIONS) && defined __USE_GNU]
114 (pthread_cleanup_push_defer_np): Fix formatting.
116 2012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
119 * Makefile (tests): New test case tst-cond25.
120 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
121 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
122 (__condvar_tw_cleanup): Lock mutex only if we don't already
124 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
125 (__condvar_w_cleanup): Likewise.
126 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
127 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
128 (__condvar_cleanup2): Lock mutex only if we don't already
130 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
131 (__condvar_cleanup1): Likewise.
132 * tst-cond25.c: New test case.
134 2012-10-09 Roland McGrath <roland@hack.frob.com>
136 * sysdeps/pthread/configure: Regenerated.
137 * sysdeps/x86_64/configure: Regenerated.
139 2012-10-05 David S. Miller <davem@davemloft.net>
142 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
143 (DB_THREAD_SELF): Use constants for the register offsets. Correct
144 the case of a 64-bit debugger with a 32-bit inferior.
146 2012-10-05 H.J. Lu <hongjiu.lu@intel.com>
149 * Makefile (tests-static): Add tst-cancel24-static,
150 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
151 tst-sem11-static and tst-sem12-static.
153 (LDLIBS-tst-cancel24-static): New macro.
154 * tst-cancel24-static.cc: New file.
155 * tst-cond8-static.c: Likewise.
156 * tst-mutex8-static.c: Likewise.
157 * tst-mutexpi8-static.c: Likewise.
158 * tst-sem11-static.c: Likewise.
159 * tst-sem12-static.c: Likewise.
161 2012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
164 * Makefile (tests): New test case tst-cond24.
165 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
166 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
167 (__pthread_cond_timedwait): Unlock mutex before going back to
169 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
170 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
171 return from futex_wait.
172 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
173 (__pthread_cond_timedwait): Unlock mutex before going back to
174 wait in PI case. Set requeue_pi flag only if wait returned 0.
175 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
176 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
177 return from futex_wait.
178 * tst-cond24.c: New test case.
180 2012-10-04 Roland McGrath <roland@hack.frob.com>
182 * pthread_create.c (start_thread): Use __madvise, not madvise.
184 2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
186 * sysdeps/i386/tls.h: Update copyright years.
188 2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
190 * pthread_create.c (start_thread): Fix clone flag name in
191 comment to CLONE_CHILD_CLEARTID.
192 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
193 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
194 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
195 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
196 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
197 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
199 2012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
202 * Makefile (tests): Add tst-cond-except.
203 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
204 (__pthread_cond_timedwait): Mark instructions where %ebx is
205 incremented in PI case.
206 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
207 for the marked PI case instructions.
208 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
209 (__pthread_cond_wait): Mark instructions where %ebx is
210 incremented in PI case.
211 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
212 for the marked PI case instructions.
213 * tst-cond-except.c: New test case.
215 2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
217 * tst-tls6.sh: Add "set -e".
218 * Makefile: Do not specify -e option when running testsuite
221 * tst-tls6.sh: Add copyright header.
223 2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
225 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
226 to uint64_t for 64-bit store.
227 (THREAD_SETMEM_NC): Likewise.
229 2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
231 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
233 (THREAD_SETMEM_NC): Likewise.
235 2012-09-14 Jeff Law <law@redhat.com>
238 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
240 2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
243 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
246 2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
248 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
249 (LDLIBS-tst-cancel24): This.
251 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
254 * Makefile (tests-static): Add tst-cancel21-static.
256 * tst-cancel21-static.c: New file.
258 2012-09-01 Joseph Myers <joseph@codesourcery.com>
260 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
261 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
262 [__NR_clock_getres]: Make code unconditional.
263 (pthread_getcpuclockid): Remove code left unreachable by removal
266 2012-08-31 Joseph Myers <joseph@codesourcery.com>
269 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
270 atomic_compare_and_exchange_bool_rel.
271 * tst-sem14.c: New file.
272 * Makefile (tests): Add tst-sem14.
274 2012-08-15 Roland McGrath <roland@hack.frob.com>
276 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
278 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
279 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
281 2012-08-16 Joseph Myers <joseph@codesourcery.com>
283 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
284 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
285 * pthread_condattr_setclock.c (pthread_condattr_setclock)
286 [!__ASSUME_POSIX_TIMERS]: Likewise.
287 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
288 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
289 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
290 [!__ASSUME_POSIX_TIMERS]: Likewise.
291 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
292 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
293 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
295 [!__NR-timer_create]: Remove conditional code.
296 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
297 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
299 [!__NR_timer_delete]: Remove conditional code.
300 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
301 * sysdeps/unix/sysv/linux/timer_getoverr.c
302 [__NR_timer_getoverrun]: Make code unconditional.
303 [!__NR_timer_getoverrun]: Remove conditional code.
304 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
305 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
306 Make code unconditional.
307 [!__NR_timer_gettime]: Remove conditional code.
308 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
309 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
310 Make code unconditional.
311 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
312 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
313 Make code unconditional.
314 [!__NR_timer_settime]: Remove conditional code.
315 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
316 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
317 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
320 2012-08-15 Tom de Vries <vries@codesourcery.com>
321 Maxim Kuvyrkov <maxim@codesourcery.com>
323 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
324 (__libc_lock_trylock): Allow pre-existing definitions.
326 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
328 * pthread_spin_lock.c: New file.
329 * pthread_spin_trylock.c: New file.
331 2012-08-08 Joseph Myers <joseph@codesourcery.com>
333 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
335 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
336 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
338 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
339 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
340 Make code unconditional.
341 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
342 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
343 __NR_tgkill]: Make code unconditional.
344 (raise) [__ASSUME_TGKILL]: Likewise.
345 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
346 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
347 [__ASSUME_TGKILL]: Make code unconditional.
348 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
349 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
350 __NR_tgkill]: Make code unconditional.
351 (raise) [__ASSUME_TGKILL]: Likewise.
352 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
354 2012-08-07 Joseph Myers <joseph@codesourcery.com>
356 * sysdeps/pthread/createthread.c (create_thread)
357 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
359 2012-08-03 Joseph Myers <joseph@codesourcery.com>
361 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
363 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
365 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
367 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
368 (pagesize): New static variable.
369 (allocate_and_test): Return MEM. Rename parameter to TARGET.
370 (check_stack_top): New local variables MEM and PAGEMASK. Cap
371 stack size to MAX_STACK_SIZE. Call allocate_and_test for
372 halfway up the stack top page. Verify that the top page was
374 (do_test): Get pagesize using sysconf.
376 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
378 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
380 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
381 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
384 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
386 * tst-pthread-getattr.c: Revert last change.
388 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
390 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
393 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
395 (check_stack_top): Read valued written into STACKADDR in
396 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
398 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
400 * nptl-init.c (sighandler_setxid): Fix the comment that
403 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
405 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
406 (__lll_robust_timedlock_wait): Simplify CFI directives.
408 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
411 * Makefile (tests): Add test case.
412 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
413 the __libc_stack_end page from stacksize. Truncate stacksize to
414 make it page aligned when it is computed from RLIMIT_STACK.
415 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
418 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
421 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
424 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
425 Jakub Jelinek <jakub@redhat.com>
428 * sysdeps/pthread/pthread.h
429 [!(defined __GNUC__ && defined __EXCEPTIONS)]
430 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
431 __libc_unlikely instead of __builtin_expect.
433 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
436 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
437 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
438 * sysdeps/unix/sysv/linux/i386/Implies: New file.
439 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
440 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
442 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
443 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
445 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
447 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
450 * nptl-init.c (pthread_functions): Remove use of INTUSE and
452 (__pthread_initialize_minimal_internal): Likewise.
453 * sem_open.c: Likewise.
454 * sem_unlink.c: Likewise.
455 * pthreadP.h: Replace _internal aliases by hidden_proto
457 * pthread_getspecific.c: Replace _internal alias by hidden_def.
458 * pthread_key_create.c: Likewise.
459 * pthread_mutex_destroy.c: Likewise.
460 * pthread_mutex_init.c: Likewise.
461 * pthread_mutex_lock.c: Likewise.
462 * pthread_mutex_unlock.c: Likewise.
463 * pthread_once.c: Likewise.
464 * pthread_rwlock_rdlock.c: Likewise.
465 * pthread_rwlock_unlock.c: Likewise.
466 * pthread_rwlock_wrlock.c: Likewise.
467 * pthread_setspecific.c: Likewise.
468 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
470 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
472 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
474 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
475 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
476 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
477 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
478 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
479 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
480 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
481 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
482 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
483 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
485 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
487 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
490 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
492 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
493 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
495 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
496 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
498 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
499 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
500 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
501 (pthread_barrier_wait): Likewise.
502 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
503 (__pthread_cond_broadcast): Likewise.
504 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
505 (__pthread_cond_signal): Likewise.
506 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
507 (__pthread_cond_timedwait): Likewise.
508 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
510 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
511 (__pthread_rwlock_rdlock): Likewise.
512 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
513 (pthread_rwlock_timedrdlock): Likewise.
514 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
515 (pthread_rwlock_timedwrlock): Likewise.
516 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
517 (__pthread_rwlock_unlock): Likewise.
518 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
519 (__pthread_rwlock_wrlock): Likewise.
520 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
521 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
522 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
524 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
526 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
529 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
530 __libc_stack_end rounded to the end of containing page as the
533 2012-05-25 Rayson Ho <rho@redhat.com>
535 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
537 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
538 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
539 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
540 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
541 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
542 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
543 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
544 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
546 2012-05-25 Rayson Ho <rho@redhat.com>
547 Roland McGrath <roland@hack.frob.com>
549 * DESIGN-systemtap-probes.txt: New file.
550 * pthread_cond_broadcast.c: SystemTap probes.
551 * pthread_cond_init.c: Likewise.
552 * pthread_cond_signal.c: Likewise.
553 * pthread_cond_wait.c: Likewise.
554 * pthread_cond_destroy.c: Likewise.
555 * pthread_create.c: Likewise.
556 * pthread_join.c: Likewise.
557 * pthread_mutex_destroy.c: Likewise.
558 * pthread_mutex_init.c: Likewise.
559 * pthread_mutex_lock.c: Likewise.
560 * pthread_mutex_timedlock.c: Likewise.
561 * pthread_mutex_unlock.c: Likewise.
562 * pthread_rwlock_destroy.c: Likewise.
563 * pthread_rwlock_rdlock.c: Likewise.
564 * pthread_rwlock_unlock.c: Likewise.
565 * pthread_rwlock_wrlock.c: Likewise.
566 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
567 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
568 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
569 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
570 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
571 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
572 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
573 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
575 2012-05-24 Roland McGrath <roland@hack.frob.com>
577 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
579 2012-05-17 Andreas Jaeger <aj@suse.de>
581 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
582 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
583 only for older kernels.
585 2012-05-15 Joseph Myers <joseph@codesourcery.com>
587 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
590 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
592 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
593 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
594 (lll_robust_lock): Likewise.
595 (lll_cond_lock): Likewise.
596 (lll_robust_cond_lock): Likewise.
597 (lll_timedlock): Likewise.
598 (lll_robust_timedlock): Likewise.
599 (lll_unlock): Likewise.
600 (lll_robust_unlock): Likewise.
602 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
604 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
605 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
607 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
609 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
611 (__gcc_personality_v0): Replace 8-byte data alignment with
612 LP_SIZE alignment and .quad with ASM_ADDR.
614 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
616 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
618 (__gcc_personality_v0): Replace 8-byte data alignment with
619 LP_SIZE alignment and .quad with ASM_ADDR.
621 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
623 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
624 NWAITERS, which is unsigned long int.
626 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
628 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
629 (__gcc_personality_v0): Replace 8-byte data alignment with
630 LP_SIZE alignment and .quad with ASM_ADDR.
632 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
634 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
635 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
636 __vdso_clock_gettime pointer into RAX_LP.
637 (__gcc_personality_v0): Replace 8-byte data alignment with
638 LP_SIZE alignment and .quad with ASM_ADDR.
640 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
642 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
643 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
644 __vdso_clock_gettime pointer into RAX_LP.
645 (__gcc_personality_v0): Replace 8-byte data alignment with
646 LP_SIZE alignment and .quad with ASM_ADDR.
648 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
650 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
651 LP_OP(cmp) and R8_LP on dep_mutex pointer.
653 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
655 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
656 to update pointer in memory. Load pointer into RDI_LP.
658 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
660 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
661 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
663 (LLL_STUB_UNWIND_INFO_END): Likewise.
664 (lll_timedlock): Load timeout pointer into RDX_LP.
665 (lll_robust_timedlock): Likewise.
667 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
668 Jakub Jelinek <jakub@redhat.com>
671 * Makefile (tests): Add test cases.
672 * descr.h (struct pthread): Add a comment describing multiple_threads.
673 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
675 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
676 before setting cancelstate of the thread.
677 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
678 (__libc_multiple_threads): Add explanatory comment.
679 * tst-cancel-self-cancelstate.c: New test case.
680 * tst-cancel-self-canceltype.c: Likewise.
681 * tst-cancel-self-cleanup.c: Supporting file for test cases.
682 * tst-cancel-self-testcancel.c: New test case.
683 * tst-cancel-self.c: Likewise.
684 * vars.c: Expand comment to include single-process case.
686 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
688 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
689 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
692 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
694 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
696 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
697 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
699 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
701 * shlib-versions: Move x86_64-.*-linux.* entry to ...
702 * sysdeps/x86_64/64/shlib-versions: Here. New file.
703 * sysdeps/x86_64/x32/shlib-versions: New file.
705 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
707 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
708 __SIZEOF_PTHREAD_XXX_T.
709 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
710 (pthread_mutex_t): Likewise.
711 (pthread_rwlock_t): Likewise.
712 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
715 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
717 * sysdeps/x86_64/x32/tls.h: New file.
719 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
721 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
723 (THREAD_SETMEM_NC): Likewise.
725 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
727 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
730 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
732 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
733 (__cleanup_fct_attribute): Check __x86_64__ instead of
736 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
738 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
739 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
740 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
741 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
742 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
744 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
746 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
747 instead of __WORDSIZE.
749 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
752 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
754 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
756 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
757 (__pthread_cond_timedwait): Use CFI directives.
758 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
759 (__pthread_cond_wait): Likewise.
760 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
761 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
763 2012-05-03 David S. Miller <davem@davemloft.net>
765 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
766 always have to return 0, especially for the pthread_spin_init
768 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
770 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
771 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
773 2012-05-02 David S. Miller <davem@davemloft.net>
775 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
776 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
777 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
778 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
779 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
780 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
781 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
782 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
783 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
784 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
785 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
786 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
787 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
788 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
789 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
790 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
791 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
792 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
794 2012-05-02 Allan McRae <allan@archlinux.org>
796 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
797 (LDFLAGS-tst-cancel24): Likewise.
799 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
801 * sysdeps/i386/pthread_spin_lock.S: New.
802 * sysdeps/i386/pthread_spin_lock.c: Delete.
803 * sysdeps/x86_64/pthread_spin_lock.S: New.
804 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
806 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
808 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
809 run when cross-compiling.
811 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
813 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
814 instead of libgcc_s.h.
816 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
818 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
820 2012-03-27 David S. Miller <davem@davemloft.net>
822 * tst-cond16.c (do_test): Use a thread stack size which is either
823 PTHREAD_STACK_MIN or the page size, whichever is larger.
824 * tst-cond18.c (do_test): Likewise.
826 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
828 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
829 register char * __asm__("rsp") to get stack frame.
831 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
833 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
836 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
838 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
841 2012-03-16 David S. Miller <davem@davemloft.net>
844 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
846 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
849 2012-03-15 David S. Miller <davem@davemloft.net>
852 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
854 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
857 * pt-crti.S: Replace FSF snail mail address with URL.
859 2012-03-09 Joseph Myers <joseph@codesourcery.com>
861 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
862 Do not define before including <time.h>.
864 2012-03-08 David S. Miller <davem@davemloft.net>
866 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
868 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
870 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
871 Check for timestamp before the Epoch.
873 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
876 * tst-sem13.c (do_test): Add another test case.
877 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
878 Fix updating nwaiters.
880 2012-03-07 Joseph Myers <joseph@codesourcery.com>
883 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
884 link test to a compile test.
885 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
887 * sysdeps/pthread/configure: Regenerated.
889 2012-03-07 Ulrich Drepper <drepper@gmail.com>
891 * Makefile (distribute): Remove variable.
893 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
895 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
896 superfluous assignment.
897 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
899 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
900 (sem_timedwait): Likewise.
902 2012-03-06 Ulrich Drepper <drepper@gmail.com>
904 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
905 installed headers to...
906 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
908 2012-03-06 David S. Miller <davem@davemloft.net>
910 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
911 atomic_increment and remove unused local variable.
912 (__old_sem_post): Likewise.
914 2012-02-27 David S. Miller <davem@davemloft.net>
916 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
917 non-existing __pthread_attr.
918 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
919 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
920 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
921 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
922 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
924 2012-02-26 Ulrich Drepper <drepper@gmail.com>
926 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
928 * sysdeps/pthread/pthread.h: Define __need_timespec before including
930 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
932 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
933 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
934 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
935 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
936 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
938 2012-02-21 Joseph Myers <joseph@codesourcery.com>
941 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
943 [crti.S not in sysdirs] (omit-deps): Do not append.
944 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
945 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
946 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
947 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
948 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
949 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
950 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
951 [crti.S in sysdirs] (extra-objs): Append unconditionally.
952 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
954 * sysdeps/pthread/pt-initfini.c: Remove file.
956 2012-02-16 Richard Henderson <rth@twiddle.net>
958 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
959 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
961 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
963 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
965 2012-02-16 David S. Miller <davem@davemloft.net>
967 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
969 2012-02-15 Marek Polacek <polacek@redhat.com>
971 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
973 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
975 Replace FSF snail mail address with URLs, as per GNU coding standards.
977 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
979 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
981 2012-02-08 Joseph Myers <joseph@codesourcery.com>
983 Support crti.S and crtn.S provided directly by architectures.
984 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
985 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
986 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
987 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
988 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
989 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
990 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
991 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
992 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
993 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
994 * pt-crti.S: New file.
995 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
997 2012-02-03 Joseph Myers <joseph@codesourcery.com>
999 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1000 macros for PIC register setup.
1001 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1002 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1003 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1004 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1005 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1007 2012-01-11 Marek Polacek <polacek@redhat.com>
1009 * forward.c (FORWARD_NORETURN): Define macro.
1010 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1011 (__pthread_exit): Likewise.
1013 2012-01-10 Ulrich Drepper <drepper@gmail.com>
1015 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1017 * pthreadP.h: Add noreturn to __pthread_exit.
1018 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1020 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
1022 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1023 Call pthread_attr_setstacksize() with result of
1024 __pthread_get_minstack() to account for application TLS usage.
1026 2012-01-08 Marek Polacek <polacek@redhat.com>
1028 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1030 2012-01-07 Ulrich Drepper <drepper@gmail.com>
1033 * pthreadP.h: Use const instead of __const.
1034 * semaphore.h: Likewise.
1035 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1036 * sysdeps/pthread/bits/sigthread.h: Likewise.
1037 * sysdeps/pthread/pthread.h: Likewise.
1039 * Makefile: Remove elf=yes test, only ELF is supported.
1041 * shlib-versions: Remove entries for ports architectures.
1043 In case anyone cares, the IA-64 architecture could move to ports.
1044 * sysdeps/ia64/*: Removed.
1045 * sysdeps/unix/sysv/linux/ia64/*: Removed.
1047 2011-12-22 Ulrich Drepper <drepper@gmail.com>
1049 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1050 __pthread_get_minstack.
1051 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1054 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1055 through __pthread_get_minstack.
1056 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1057 directly from _rtld_global_ro.
1058 (__pthread_get_minstack): New function.
1059 * pthreadP.h: Declare __pthread_get_minstack.
1060 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1062 2011-12-21 Ulrich Drepper <drepper@gmail.com>
1065 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1066 Correct reading name from file.
1068 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
1070 * allocatestack.c (allocate_stack): Return errno on failure.
1072 2011-12-14 Jeff Law <law@redhat.com>
1075 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1077 2011-11-28 Andreas Schwab <schwab@redhat.com>
1079 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1080 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1081 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1083 2011-11-15 Ulrich Drepper <drepper@gmail.com>
1085 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1088 2011-10-29 Ulrich Drepper <drepper@gmail.com>
1091 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1092 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1093 path for kernels with FUTEX_CLOCK_REALTIME.
1094 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1096 2011-10-27 Andreas Schwab <schwab@redhat.com>
1099 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1100 for memory synchronization functions.
1101 * semaphore.h: Likewise.
1103 2011-10-24 Ulrich Drepper <drepper@gmail.com>
1105 * tst-cancel7.c: Avoid warning.
1106 * tst-mutex6.c: Likewise.
1107 * tst-mutex9.c: Likewise.
1108 * tst-mutexpi6.c: Likewise.
1110 2011-10-23 Ulrich Drepper <drepper@gmail.com>
1112 * sysdeps/i386/tls.h: Remove #include <list.h>.
1114 2011-10-15 Ulrich Drepper <drepper@gmail.com>
1116 * pthread_create.c (start_thread): Call __ctype_init.
1118 2011-09-15 Andreas Schwab <schwab@redhat.com>
1120 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1122 (list_add): Add atomic_write_barrier.
1123 * descr.h: Define __need_list_t before including <list.h>.
1124 * nptl-init.c: Include <list.h>
1125 * allocatestack.c: Likewise.
1127 2011-09-11 Ulrich Drepper <drepper@gmail.com>
1129 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1130 * sysdeps/ia64/tls.h: Likewise.
1131 * sysdeps/powerpc/tls.h: Likewise.
1132 * sysdeps/s390/tls.h: Likewise.
1133 * sysdeps/sh/tls.h: Likewise.
1134 * sysdeps/sparc/tls.h: Likewise.
1135 * sysdeps/x86_64/tls.h: Likewise.
1137 2011-09-10 Ulrich Drepper <drepper@gmail.com>
1139 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1141 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1143 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1144 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1145 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1146 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1147 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1148 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1149 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1150 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1151 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1152 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1153 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1154 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1156 * tst-tls1.c: Support for __thread is now mandatory.
1157 * tst-tls2.c: Likewise.
1158 * tst-tls3.c: Likewise.
1159 * tst-tls3mod.c: Likewise.
1160 * tst-tls4.c: Likewise.
1161 * tst-tls4moda.c: Likewise.
1162 * tst-tls4modb.c: Likewise.
1163 * tst-tls5.h: Likewise.
1165 2011-09-08 Ulrich Drepper <drepper@gmail.com>
1168 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1169 (pthread_rwlock_timedwrlock): Use correct macro in test.
1170 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1172 2011-09-06 Ulrich Drepper <drepper@gmail.com>
1174 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1175 use gettimeofday vsyscall, just call gettimeofday.
1176 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1177 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1178 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1180 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1182 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1183 Simplify __vdso_clock_gettime use.
1185 2011-09-05 David S. Miller <davem@davemloft.net>
1187 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1189 (sem_timedwait): Call it to force an exception region around
1190 the async cancel enable and the futex operation.
1191 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1192 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1193 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1194 (__new_sem_wait): Call it to force an exception region around
1195 the async cancel enable and the futex operation.
1196 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1197 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1199 2011-08-31 Andreas Schwab <schwab@redhat.com>
1201 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1204 2011-08-20 David S. Miller <davem@davemloft.net>
1206 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1208 2011-08-14 Roland McGrath <roland@hack.frob.com>
1210 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1211 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1213 2011-08-08 Andreas Schwab <schwab@redhat.com>
1215 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1217 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1218 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1220 2011-07-22 Ulrich Drepper <drepper@gmail.com>
1222 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1224 (__gcc_personality_v0): Likewise.
1225 (_Unwind_ForcedUnwind): Likewise.
1226 (_Unwind_GetCFA): Likewise.
1228 2011-07-14 Roland McGrath <roland@hack.frob.com>
1230 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1233 2011-06-30 Ulrich Drepper <drepper@gmail.com>
1235 * nptl-init.c (__nptl_set_robust): New function.
1236 (pthread_functions): Add reference.
1237 * npthreadP.h: Declare __nptl_set_robust.
1238 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1239 ptr_set_robust member.
1240 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1241 child if threads are used.
1243 2011-06-14 Andreas Jaeger <aj@suse.de>
1245 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1247 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1250 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1252 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1255 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1257 Patch partly by Robert Rex <robert.rex@exasol.com>.
1259 2011-01-19 Roland McGrath <roland@redhat.com>
1261 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1262 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1263 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1264 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1265 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1266 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1268 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1270 * Makefile (test-extras): Add tst-cleanup4aux.
1272 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1275 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1276 (__SETXID_2): Likewise.
1277 (__SETXID_3): Likewise.
1279 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1282 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1283 * alloca_cutoff.c: Add libc_hidden_def.
1285 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1288 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1289 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1290 of "struct pthread".
1292 2010-09-21 Andreas Schwab <schwab@redhat.com>
1294 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1295 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1296 (pthread_cleanup_push_defer_np): Likewise.
1298 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1300 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1303 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1304 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1306 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1307 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1309 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1311 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1313 2010-05-01 Alan Modra <amodra@gmail.com>
1315 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1316 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1317 to save temps. Correct cfi for possible later frame manipulation.
1318 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1319 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1320 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1321 (DOCARGS_6, UNDOCARGS_6): Likewise.
1322 (CENABLE, CDISABLE): Add nops for non-shared calls.
1324 2010-07-06 Andreas Schwab <schwab@redhat.com>
1326 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1329 2010-07-03 Ulrich Drepper <drepper@redhat.com>
1331 * tst-abstime.c (do_test): Some more cleanups
1333 2010-07-02 Ulrich Drepper <drepper@redhat.com>
1335 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1337 2010-07-01 Andreas Schwab <schwab@redhat.com>
1338 Ulrich Drepper <drepper@redhat.com>
1340 * Makefile (tests): Add tst-abstime.
1341 * tst-abstime.c: New file.
1342 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1343 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1344 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1345 (__lll_timedlock_wait): Likewise.
1346 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1347 (__lll_robust_timedlock_wait): Likewise.
1348 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1349 (__pthread_cond_timedwait): Likewise.
1350 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1351 (pthread_rwlock_timedrdlock): Likewise.
1352 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1353 (pthread_rwlock_timedwrlock): Likewise.
1354 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1357 2010-07-01 Ulrich Drepper <drepper@redhat.com>
1359 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1361 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1363 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1364 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1366 2010-04-09 Ulrich Drepper <drepper@redhat.com>
1369 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1370 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1371 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1373 * Makefile (libpthread-routines): Add pthread_getname and
1375 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1377 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1379 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1380 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1381 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1382 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1384 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1386 * pthread_cond_timedwait.c: Add check for
1387 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1388 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1391 2010-03-09 Ulrich Drepper <drepper@redhat.com>
1393 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1394 and the call fails wake eventually waiting setxid threads. Don't free
1395 stack here if we try starting a thread.
1396 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1397 if the clone call failed.
1399 2010-03-08 Andreas Schwab <schwab@redhat.com>
1401 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1402 * allocatestack.c (get_cached_stack): Set setxid_futex.
1403 (allocate_stack): Likewise.
1405 2010-03-05 Andreas Schwab <schwab@redhat.com>
1406 Ulrich Drepper <drepper@redhat.com>
1408 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1409 it is creating a thread or it is just being created.
1410 * pthread_create.c (start_thread): Wake setxid thread if it is
1412 (__pthread_create_2_1): Initialize setxid_futex.
1413 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1416 2010-01-15 Ulrich Drepper <drepper@redhat.com>
1418 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1420 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1422 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
1424 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1425 Fix pthread_cond_timedwait with requeue-PI.
1426 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1427 Fix pthread_cond_wait with requeue-PI.
1429 2010-01-14 Ulrich Drepper <drepper@redhat.com>
1431 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1432 and pthread_mutexattr_setrobust for GLIBC_2.12.
1433 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1434 * pthread_mutexattr_getrobust.c: Define alias
1435 pthread_mutexattr_getrobust.
1436 * pthread_mutexattr_setrobust.c: Define alias
1437 pthread_mutexattr_setrobust.
1439 2010-01-12 Ulrich Drepper <drepper@redhat.com>
1441 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1443 2010-01-08 Ulrich Drepper <drepper@redhat.com>
1445 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1447 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1449 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1450 call __gmon_start__.
1451 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1453 2009-12-17 Ulrich Drepper <drepper@redhat.com>
1455 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1458 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1460 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1461 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1462 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1463 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1464 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1465 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1466 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1467 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1469 2009-12-12 Ulrich Drepper <drepper@redhat.com>
1471 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1472 Don't update nwaiters after invalid timeout is recognized.
1474 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1476 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1479 2009-11-27 Andreas Schwab <schwab@redhat.com>
1481 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1482 THREAD_SELF->cancelhandling after returning from futex call.
1484 2009-11-24 Ulrich Drepper <drepper@redhat.com>
1486 * tst-sem13.c: New file.
1487 * Makefile (tests): Add tst-sem13.
1489 2009-11-22 Roland McGrath <roland@redhat.com>
1491 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1492 instead of recapitulating its contents.
1494 2009-11-18 Ulrich Drepper <drepper@redhat.com>
1496 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1497 optimizations and cleanups.
1499 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1501 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1502 Remove redundant code. Fix cfi offsets.
1503 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1506 2009-11-17 Ulrich Drepper <drepper@redhat.com>
1508 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1509 reduce size of unwind info.
1511 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1513 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1514 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1516 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1519 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1521 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1523 2009-10-30 Ulrich Drepper <drepper@redhat.com>
1525 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1528 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1529 steps to avoid races with creation and terminations.
1530 * nptl-init.c (sighandler_setxid): Adjust.
1531 Patch by Daniel Jacobowitz.
1533 2009-09-07 Andreas Schwab <schwab@redhat.com>
1535 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1537 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
1538 Joseph Myers <joseph@codesourcery.com>
1541 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1542 Initialize the sigev_notify field for newly created timer to make sure
1543 the timer gets deleted from the active timer's list upon timer_delete.
1545 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
1547 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1548 Correct a logic error.
1550 2009-08-25 Ulrich Drepper <drepper@redhat.com>
1552 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1553 of the field in local variables.
1554 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1555 variable and don't unconditionally clear it.
1557 2009-08-24 Ulrich Drepper <drepper@redhat.com>
1559 * pthread_create.c (start_thread): Hint to the kernel that memory for
1560 the stack can be reused. We do not mark all the memory. The part
1561 still in use and some reserve are kept.
1563 2009-08-23 Ulrich Drepper <drepper@redhat.com>
1565 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1567 2009-08-11 Ulrich Drepper <drepper@redhat.com>
1569 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1572 2009-08-10 Ulrich Drepper <drepper@redhat.com>
1574 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1576 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1578 2009-08-10 Andreas Schwab <schwab@redhat.com>
1580 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1581 (__pthread_cond_signal): Don't clobber register used for syscall
1584 2009-08-08 Ulrich Drepper <drepper@redhat.com>
1586 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1587 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1589 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1590 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1593 2009-08-07 Ulrich Drepper <drepper@redhat.com>
1595 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1596 enabled by the special *_asynccancel functions.
1597 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1598 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1600 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1602 2009-08-04 Ulrich Drepper <drepper@redhat.com>
1604 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1605 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1606 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1607 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1608 since we can assume the special __*_{en,dis}able_asynccancel
1610 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1611 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1612 and PTHREAD_CANCELED.
1614 2009-07-31 Ulrich Drepper <drepper@redhat.com>
1616 * descr.h: Better definition of *_BITMASK macros for cancellation.
1618 2009-07-29 Ulrich Drepper <drepper@redhat.com>
1620 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1622 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1623 dynamic linker might have to save.
1624 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1625 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1628 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1630 2009-07-28 Ulrich Drepper <drepper@redhat.com>
1632 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1634 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1635 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1636 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1637 requeue_pi for robust mutexes.
1638 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1639 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1640 Don't only skip __pthread_mutex_cond_lock. Call instead
1641 __pthread_mutex_cond_lock_adjust.
1642 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1644 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1645 optimization of PI mutex handling.
1647 2009-07-27 Ulrich Drepper <drepper@redhat.com>
1650 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1651 instead of of _acq variants of cmpxchg.
1653 2009-07-23 Ulrich Drepper <drepper@redhat.com>
1655 * sysdeps/x86_64/configure.in: New file.
1657 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1658 path when not using absolute timeout futex.
1660 2009-07-20 Ulrich Drepper <drepper@redhat.com>
1662 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1663 optimizations of last changes.
1664 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1666 2009-07-19 Ulrich Drepper <drepper@redhat.com>
1668 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1669 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1670 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1671 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1672 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1673 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1674 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1675 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1677 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1678 (__pthread_cond_timedwait): Make more robust.
1680 2009-07-18 Ulrich Drepper <drepper@redhat.com>
1682 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1683 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1684 directly use absolute timeout.
1686 * tst-sem5.c (do_test): Add test for premature timeout.
1687 * Makefile: Linu tst-sem5 with librt.
1689 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1690 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1691 directly use absolute timeout.
1692 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1693 (pthread_rwlock_timedrdlock): Likewise.
1695 * tst-cond11.c (run_test): Add test to check that the timeout is
1698 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1699 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1700 directly use absolute timeout.
1702 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1703 (__pthread_cond_wait): Convert to using exception handler instead of
1704 registered unwind buffer.
1705 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1706 (__pthread_cond_timedwait): Likewise.
1708 2009-07-17 Ulrich Drepper <drepper@redhat.com>
1710 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1711 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1712 use absolute timeout.
1714 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1715 handling of uncontested semaphore.
1717 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1718 (__condvar_cleanup): Rewrite to use cfi directives instead of
1719 hand-coded unwind tables.
1720 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1722 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1723 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1726 2009-06-12 Ulrich Drepper <drepper@redhat.com>
1728 * Makefile (libpthread-routines): Add pthread_sigqueue.
1729 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1730 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1731 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1733 2009-06-11 Ulrich Drepper <drepper@redhat.com>
1736 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1737 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1739 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1741 2009-05-16 Ulrich Drepper <drepper@redhat.com>
1743 * libc-cancellation.c: Move __libc_cleanup_routine to...
1744 * libc-cleanup.c: ...here. New file.
1745 * Makefile (routines): Add libc-cleanup.
1747 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1749 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1750 * sysdeps/pthread/librt-cancellation.c: Likewise.
1753 * nptl-init.c: Renamed from init.c.
1754 * Makefile: Change all occurences of init.c to nptl-init.c.
1756 2009-05-15 Ulrich Drepper <drepper@redhat.com>
1758 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1759 to test when deciding on the delay.
1760 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1761 * pthread_cancel.c: Close race between deciding on sending a signal
1762 and setting the CANCELING_BIT bit.
1764 * cancellation.c (__pthread_disable_asynccancel): Don't return if
1766 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1768 2009-04-27 Ulrich Drepper <drepper@redhat.com>
1770 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1772 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1773 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1774 * sysdeps/i386/tls.h: Likewise.
1775 (tcbhead_t): Add __private_tm member.
1777 2009-04-26 Ulrich Drepper <drepper@redhat.com>
1779 * sem_open.c (sem_open): Rewrite initialization of initsem to
1782 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1783 Avoid warning by using may_alias attribute on ptrhack.
1785 2009-04-22 Ulrich Drepper <drepper@redhat.com>
1788 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1789 Check policy and priority for validity.
1790 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1792 2009-03-15 Ulrich Drepper <drepper@redhat.com>
1794 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1795 (__pthread_cond_timedwait): Change to use cfi directives instead of
1796 hand-coded unwind sections.
1798 2009-03-10 Ulrich Drepper <drepper@redhat.com>
1800 * init.c (nptl_freeres): Compile only for SHARED.
1802 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1804 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1805 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1806 FUTEX_BITSET_MATCH_ANY.
1808 2009-02-27 Roland McGrath <roland@redhat.com>
1810 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1811 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1813 2009-02-26 Ulrich Drepper <drepper@redhat.com>
1815 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1816 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1817 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1820 2009-02-25 Ulrich Drepper <drepper@redhat.com>
1822 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1825 2009-02-24 Ulrich Drepper <drepper@redhat.com>
1827 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1828 Unify name of include protector macro.
1830 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1832 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1833 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1835 2009-01-29 Ulrich Drepper <drepper@redhat.com>
1837 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1840 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1841 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1842 * init.c (nptl_freeres): New function.
1843 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1844 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1845 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1847 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1848 load DSO. Assign last.
1849 (__unwind_freeres): New function.
1851 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1852 for better debugging. No need to use stack_list_add here.
1854 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1856 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1857 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1858 instead of computing relative timeout.
1859 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1860 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1862 2009-01-25 Ulrich Drepper <drepper@redhat.com>
1864 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1866 2009-01-08 Ulrich Drepper <drepper@redhat.com>
1868 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1869 (list_add_tail): Removed.
1871 2009-01-07 Ulrich Drepper <drepper@redhat.com>
1873 * (in_flight_stack): New variable.
1874 (stack_list_del): New function. Use instead of list_del.
1875 (stack_list_add): New function. Use instead of list_add when adding to
1876 stack_cache and stack_used lists.
1877 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1878 when the fork call interrupted another thread.
1880 2009-01-04 Ulrich Drepper <drepper@redhat.com>
1882 * init.c (__pthread_initialize_minimal_internal): Optimize test
1883 FUTEX_CLOCK_REALTIME a bit.
1885 2009-01-03 Ulrich Drepper <drepper@redhat.com>
1887 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1888 only passing five parameters to FUTEX_WAIT_BITSET call.
1890 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1891 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1892 instead of computing relative timeout.
1894 2009-01-02 Ulrich Drepper <drepper@redhat.com>
1896 * init.c (__pthread_initialize_minimal_internal): Check for
1897 FUTEX_CLOCK_REALTIME flag.
1898 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1899 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1902 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1903 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1904 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1905 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1906 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1907 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1909 2008-12-09 Ulrich Drepper <drepper@redhat.com>
1911 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1912 loop body instead of ; to avoid gcc warnings.
1913 (pthread_cleanup_pop_restore_np): Likewise.
1914 Patch by Caolán McNamara <caolanm@redhat.com>.
1916 2008-12-09 Jakub Jelinek <jakub@redhat.com>
1918 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1919 fast path here, for robust/PI/PP mutexes call
1920 __pthread_mutex_lock_full. Don't use switch, instead use a series
1921 of ifs according to their probability.
1922 (__pthread_mutex_lock_full): New function.
1923 * pthread_mutex_unlock.c: Include assert.h.
1924 (__pthread_mutex_unlock_usercnt): Handle only the
1925 fast path here, for robust/PI/PP mutexes call
1926 __pthread_mutex_unlock_full. Don't use switch, instead use a series
1927 of ifs according to their probability.
1928 (__pthread_mutex_unlock_full): New function.
1929 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1930 (__pthread_mutex_lock_full): Define.
1932 2008-12-08 Ulrich Drepper <drepper@redhat.com>
1934 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1935 implementation. Add necessary padding and.
1936 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1939 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1941 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1942 and FUTEX_WAKE_BITSET.
1944 2008-12-02 Ulrich Drepper <drepper@redhat.com>
1946 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1947 and FUTEX_WAKE_BITSET.
1948 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1949 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1950 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1951 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1953 2008-11-25 Roland McGrath <roland@redhat.com>
1955 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1956 Subdirectories moved to ports repository as
1957 sysdeps/.../nptl subdirectories.
1959 2008-11-12 Jakub Jelinek <jakub@redhat.com>
1962 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1964 * pthread_cond_init.c (__pthread_cond_init): Fix
1965 cond->__data.__nwaiters initialization.
1966 * Makefile (tests): Add tst-cond23.
1967 * tst-cond23.c: New test.
1969 2008-11-07 Jakub Jelinek <jakub@redhat.com>
1971 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1973 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1976 2008-11-01 Ulrich Drepper <drepper@redhat.com>
1979 * pthread_mutex_lock.c: Add support for private PI mutexes.
1980 * pthread_mutex_timedlock.c: Likewise.
1981 * pthread_mutex_trylock.c: Likewise.
1982 * pthread_mutex_unlock.c: Likewise.
1983 Patch mostly by Ben Jackson <ben@ben.com>.
1985 2008-10-31 Ulrich Drepper <drepper@redhat.com>
1988 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1989 Increase stack size for helper thread.
1991 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1993 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1994 assembly with a clobber list for access registers a0 and a1.
1996 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1998 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1999 to force runp->refcntr to be read from memory.
2001 2008-09-08 Richard Guenther <rguenther@suse.de>
2003 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2004 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2005 lll_timedlock, lll_robust_timedlock, lll_unlock,
2006 lll_robust_unlock): Promote private to int.
2008 2008-08-15 Ulrich Drepper <drepper@redhat.com>
2010 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2011 ARCH_RETRY_MMAP definitions.
2012 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2013 Define MAP_STACK when not defined.
2014 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
2015 handling of ARCH_RETRY_MMAP.
2017 2008-07-30 Ulrich Drepper <drepper@redhat.com>
2019 * tst-align2.c (f): Print message that f is reached.
2021 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
2024 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2025 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2027 2008-07-25 Ulrich Drepper <drepper@redhat.com>
2029 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2030 SOCK_CLOEXEC if possible.
2032 2008-05-29 Ulrich Drepper <drepper@redhat.com>
2034 * Makefile (tests): Add tst-rwlock2a.
2035 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2036 * tst-rwlock2a.c: New file.
2038 2008-06-12 Ulrich Drepper <drepper@redhat.com>
2040 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2042 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
2044 * sysdeps/pthread/pthread.h: Fix typo in comment.
2046 2008-05-28 Ulrich Drepper <drepper@redhat.com>
2048 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2049 of CPU set to the kernel.
2051 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2053 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2055 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2056 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2057 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2058 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2059 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2060 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2062 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
2064 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2066 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2068 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2070 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2073 2008-05-26 Ulrich Drepper <drepper@redhat.com>
2075 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2077 2008-05-20 Jakub Jelinek <jakub@redhat.com>
2079 David S. Miller <davem@davemloft.net>
2081 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2083 2008-05-10 Ulrich Drepper <drepper@redhat.com>
2085 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2086 __pshared correctly.
2087 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2089 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2091 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2093 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2095 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2097 2008-04-14 David S. Miller <davem@davemloft.net>
2099 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2100 (__old_sem_wait): Fix argument to lll_futex_wait().
2102 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2104 * pthread_create.c: Require pthread_mutex_trylock and
2105 pthread_key_delete for libgcc.
2107 2008-04-08 Jakub Jelinek <jakub@redhat.com>
2110 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2111 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2112 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2114 2008-03-27 Ulrich Drepper <drepper@redhat.com>
2116 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2117 <linux/limits.h> has defined it.
2118 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2119 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2120 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2121 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2123 2008-03-18 Jakub Jelinek <jakub@redhat.com>
2125 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2127 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2128 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2130 2008-03-14 Ulrich Drepper <drepper@redhat.com>
2132 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2133 HAVE_DL_DISCOVER_OSVERSION.
2134 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2135 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2137 2008-03-07 Ulrich Drepper <drepper@redhat.com>
2140 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2141 _POSIX_CHOWN_RESTRICTED value to zero.
2143 2008-01-31 Roland McGrath <roland@redhat.com>
2145 * Makefile (omit-deps): Variable removed.
2147 2008-01-30 Ulrich Drepper <drepper@redhat.com>
2149 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2150 unnecessary addr32 prefix.
2152 2008-01-29 Roland McGrath <roland@redhat.com>
2154 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2156 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2158 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2160 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2162 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2164 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2165 (__lll_lock_wait_private): Fix typo.
2166 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2167 (pthread_barrier_wait): Likewise. Adjust XADD use.
2168 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2170 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2171 (pthread_rwlock_timedrdlock): Return correct return value.
2172 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2173 (pthread_rwlock_timedwrlock): Likewise.
2175 2008-01-15 Ulrich Drepper <drepper@redhat.com>
2177 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2178 thread returns the program exits with an error code.
2180 2008-01-10 Ulrich Drepper <drepper@redhat.com>
2182 * pthread-errnos.sym: Add EOVERFLOW.
2183 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2184 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2185 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2186 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2188 2007-12-14 Ulrich Drepper <drepper@redhat.com>
2190 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2191 parameter. Passed it as permission to mmap.
2192 * allocatestack.c (allocate_stack): Pass prot as second parameter
2195 2007-12-12 Ulrich Drepper <drepper@redhat.com>
2197 * tst-basic7.c: Allocate memory for the stack.
2200 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2201 (__pthread_cond_timedwait): Don't use VDSO.
2202 Patch by Michal Januszewski.
2204 2007-12-07 Ulrich Drepper <drepper@redhat.com>
2207 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2208 Allow label before pthread_cleanup_pop.
2209 (pthread_cleanup_pop_restore_np): Likewise.
2211 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2213 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2214 Store 2 before returning ETIMEDOUT.
2216 2007-11-23 Ulrich Drepper <drepper@redhat.com>
2218 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2219 Store 2 before returning ETIMEDOUT.
2220 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2221 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2222 (__lll_lock_wait_private): Optimize.
2223 (__lll_lock_wait): Likewise.
2225 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2227 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2228 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2229 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2231 2007-11-08 Ulrich Drepper <drepper@redhat.com>
2234 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2235 If we time out, try one last time to lock the futex to avoid
2236 losing a wakeup signal.
2237 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2238 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2241 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2244 2007-11-07 Ulrich Drepper <drepper@redhat.com>
2247 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2248 mmap failed to EAGAIN.
2249 * Makefile (tests): Add tst-basic7.
2250 * tst-basic7.c: New file.
2252 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2254 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2255 Use __linkin_atfork.
2257 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2259 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2260 missing line continuations.
2261 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2262 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2264 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2267 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2268 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2269 (struct timer): Add next element.
2270 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2271 enqueue timer structure into __active_timer_sigev_thread list.
2272 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2273 remove timer struct from __active_timer_sigev_thread.
2274 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2275 Before using timer structure make sure it is still on the
2276 __active_timer_sigev_thread list. Keep lock until done.
2277 Define __active_timer_sigev_thread and
2278 __active_timer_sigev_thread_lock.
2280 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2282 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2283 Redefine thread_atfork for use of ATFORK_MEM.
2284 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2285 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2287 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2288 Use atomic operation when removing first element of list.
2290 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2292 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2293 routine instead of an alias to __new_sem_post.
2295 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2297 * init.c (__pthread_initialize_minimal): Initialize word to appease
2300 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2302 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2303 libc.so just clear NAME.
2304 (__libc_rwlock_fini): Nop inside of libc.so.
2305 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2308 2007-09-02 Ulrich Drepper <drepper@redhat.com>
2310 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2311 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2313 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2315 2007-08-21 Ulrich Drepper <drepper@redhat.com>
2318 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2319 reclaimed stack if necessary.
2320 * Makefile (tests): Add tst-tsd6.
2321 * tst-tsd6.c: New file.
2323 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2325 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2326 Add private argument.
2328 2007-08-20 Ulrich Drepper <drepper@redhat.com>
2330 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2331 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2333 2007-08-16 Jakub Jelinek <jakub@redhat.com>
2335 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2336 (__lll_robust_timedlock): Pass private as last argument to
2337 __lll_robust_timedlock_wait.
2338 (__lll_unlock): Fix a pasto.
2340 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2342 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2343 sparc_old_sem): New structs.
2344 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2345 (__sem_wait_cleanup): New function.
2346 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2347 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2348 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2350 (__old_sem_wait): New function.
2351 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2352 nptl/sysdeps/unix/sysv/linux/sparc version.
2353 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2355 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2356 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2357 (__new_sem_trywait): Use sparc_old_sem structure.
2358 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2359 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2360 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2361 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2362 lll_futex_timed_wait.
2363 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2364 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2365 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2367 (__old_sem_post): New function.
2368 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2369 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2370 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2371 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2372 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2373 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2375 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2377 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2378 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2379 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2380 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2381 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2382 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2383 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2385 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2386 kernel-features.h and tcb-offsets.h.
2387 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2388 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2390 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2392 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2393 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2395 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2396 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2397 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2398 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2399 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2400 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2401 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2403 2007-08-14 Jakub Jelinek <jakub@redhat.com>
2405 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2406 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2407 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2408 lll_futex_timed_wait.
2410 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2411 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2412 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2413 __lll_robust_unlock, __lll_wait_tid): Likewise.
2415 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2417 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2419 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2420 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2421 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2422 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2423 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2424 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2425 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2426 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2428 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2429 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2430 process private. Switch DW_CFA_advance_loc1 and some
2431 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2432 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2433 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2434 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2435 process private. Switch DW_CFA_advance_loc{1,2} and some
2436 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2437 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2438 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2439 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2441 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2442 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2443 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2445 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2446 (__pthread_cond_broadcast): Compare %r8 instead of
2447 dep_mutex-cond_*(%rdi) with $-1.
2448 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2449 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2452 2007-08-13 Ulrich Drepper <drepper@redhat.com>
2454 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2456 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2458 * allocatestack.c: Include kernel-features.h.
2459 * pthread_create.c: Likewise.
2460 * pthread_mutex_init.c: Likewise.
2462 * pthread_cond_timedwait.c: Likewise.
2463 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2464 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2465 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2466 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2467 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2468 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2469 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2471 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2473 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2474 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2475 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2476 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2478 2007-08-12 Jakub Jelinek <jakub@redhat.com>
2480 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2481 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2482 byte elements. One of them is the new __shared element.
2483 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2484 adjust names of other padding elements.
2485 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2486 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2487 byte elements. One of them is the new __shared element.
2488 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2489 adjust names of other padding elements.
2490 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2491 Renamed __pad1 element to __shared, adjust names of other padding
2493 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2494 (pthread_rwlock_t): Likewise.
2495 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2498 2007-08-09 Anton Blanchard <anton@samba.org>
2500 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2502 2007-08-12 Ulrich Drepper <drepper@redhat.com>
2504 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2505 <kernel-features.h>.
2506 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2508 2007-08-11 Ulrich Drepper <drepper@redhat.com>
2510 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2511 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2512 dealing with robust mutexes.
2513 * pthread_mutex_timedlock.c: Likewise.
2514 * pthread_mutex_trylock.c: Likewise.
2515 * pthread_mutex_unlock.c: Likewise.
2516 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2518 2007-08-06 Jakub Jelinek <jakub@redhat.com>
2520 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2521 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2522 (PTHREAD_MUTEX_PSHARED): Define.
2523 * pthread_mutex_init.c (__pthread_mutex_init): Set
2524 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2526 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2527 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2528 as second argument to lll_lock.
2529 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2530 instead of its __data.__lock field.
2531 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2532 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2534 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2535 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2536 instead of mutex->__data.__kind directly, pass
2537 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2538 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2539 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2540 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2541 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2542 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2543 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2544 of mutex->__data.__kind directly.
2545 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2546 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2547 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2548 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2549 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2550 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2552 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2553 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2554 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2556 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2557 Take mutex as argument instead of its __data.__lock field, pass
2558 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2559 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2560 __data.__lock field.
2561 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2562 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2563 to lll_robust_cond_lock.
2564 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2565 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2566 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2567 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2568 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2569 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2571 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2572 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2574 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2575 pshared variable, pass it to lll_lock, lll_unlock,
2576 lll_futex_timedwait and lll_futex_wake.
2577 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2578 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2580 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2581 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2583 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2584 lll_futex_wake_unlock): Likewise.
2585 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2587 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2588 lll_futex_wake_unlock): Likewise.
2589 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2591 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2592 lll_futex_wake_unlock): Likewise.
2593 (lll_futex_wake): Fix a typo.
2594 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2595 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2596 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2597 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2598 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2599 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2600 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2601 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2602 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2603 (__pthread_cond_timedwait): Likewise.
2604 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2605 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2607 2007-08-05 Jakub Jelinek <jakub@redhat.com>
2609 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2610 Don't use CGOTSETUP and CGOTRESTORE macros.
2611 (CGOTSETUP, CGOTRESTORE): Remove.
2612 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2615 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2617 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2618 definitions for private futexes.
2619 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2620 kernel-features.h and lowlevellock.h. Use private futexes if
2622 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2623 (__lll_mutex_lock_wait): Rename to
2624 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2625 (__lll_mutex_timedlock_wait): Rename to ...
2626 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2627 Don't compile in for libc.so.
2628 (__lll_mutex_unlock_wake): Rename to ...
2629 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2630 (__lll_timedwait_tid): Use __NR_gettimeofday.
2631 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2632 the header from assembler. Renamed all lll_mutex_* resp.
2633 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2634 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2635 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2637 (__lll_lock_wait_private): Add prototype.
2638 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2639 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2640 __lll_unlock_wake): Likewise.
2641 (lll_lock): Add private argument. Call __lll_lock_wait_private
2642 if private is constant LLL_PRIVATE.
2643 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2644 lll_timedlock, lll_robust_timedlock): Add private argument.
2645 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2646 if private is constant LLL_PRIVATE.
2647 (lll_robust_unlock, lll_robust_dead): Add private argument.
2648 (lll_lock_t): Remove.
2649 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2650 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2651 lll_cond_wake, lll_cond_broadcast): Remove.
2652 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2653 kernel-features.h and lowlevellock.h.
2654 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2655 (LOAD_FUTEX_WAIT): Define.
2656 (__lll_robust_mutex_lock_wait): Rename to ...
2657 (__lll_robust_lock_wait): ... this. Add private argument.
2658 Use LOAD_FUTEX_WAIT macro.
2659 (__lll_robust_mutex_timedlock_wait): Rename to ...
2660 (__lll_robust_timedlock_wait): ... this. Add private argument.
2661 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2662 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2664 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2665 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2666 __lll_mutex_{lock,unlock}_*.
2667 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2668 lowlevellock.h and pthread-errnos.h.
2669 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2670 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2671 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2672 __lll_mutex_{lock,unlock}_*.
2673 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2674 lowlevellock.h and pthread-errnos.h.
2675 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2676 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2677 __lll_mutex_{lock,unlock}_*.
2678 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2680 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2681 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2682 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2683 (__condvar_tw_cleanup): Likewise.
2684 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2686 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2687 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2688 __lll_mutex_{lock,unlock}_*.
2689 ( __condvar_w_cleanup): Likewise.
2690 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2691 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2692 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2694 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2695 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2696 __lll_mutex_{lock,unlock}_*.
2697 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2699 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2700 FUTEX_PRIVATE_FLAG): Remove.
2701 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2702 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2703 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2705 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2706 FUTEX_PRIVATE_FLAG): Remove.
2707 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2708 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2709 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2711 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2712 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2713 __lll_mutex_{lock,unlock}_*.
2714 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2716 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2717 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2718 __lll_mutex_{lock,unlock}_*.
2719 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2720 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2721 (__new_sem_post): Use standard initial exec code sequences.
2722 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2724 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2725 FUTEX_PRIVATE_FLAG): Remove.
2726 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2727 exec code sequences.
2728 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2729 (__new_sem_trywait): Use standard initial exec code sequences.
2730 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2731 (__new_sem_wait): Use standard initial exec code sequences.
2733 2007-07-31 Anton Blanchard <anton@samba.org>
2735 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2736 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2737 atomic_full_barrier.
2739 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2741 * allocatestack.c (stack_cache_lock): Change type to int.
2742 (get_cached_stack, allocate_stack, __deallocate_stack,
2743 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2744 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2745 as second argument to lll_lock and lll_unlock macros on
2747 * pthread_create.c (__find_in_stack_list): Likewise.
2748 (start_thread): Similarly with pd->lock. Use lll_robust_dead
2749 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2751 * descr.h (struct pthread): Change lock and setxid_futex field
2753 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2754 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2755 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2756 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2758 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2759 * pthread_cond_init.c (__pthread_cond_init): Likewise.
2760 * pthreadP.h (__attr_list_lock): Change type to int.
2761 * pthread_attr_init.c (__attr_list_lock): Likewise.
2762 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2763 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2765 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2766 also for lll_futex_{wake,wait}.
2767 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2769 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2770 LLL_SHARED as second argument to lll_{,un}lock.
2771 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2772 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2773 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2774 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2776 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2777 as second argument to lll_{,un}lock macros on pd->lock.
2778 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2779 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2780 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2781 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2783 * sysdeps/pthread/createthread.c (do_clone, create_thread):
2785 * pthread_once.c (once_lock): Change type to int.
2786 (__pthread_once): Pass LLL_PRIVATE as second argument to
2787 lll_{,un}lock macros on once_lock.
2788 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2789 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2790 rwlock->__data.__shared as second argument to them and similarly
2792 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2794 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2796 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2797 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2798 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2799 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2800 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2801 to lll_{,un}lock macros on __sem_mappings_lock.
2802 * sem_open.c (check_add_mapping): Likewise.
2803 (__sem_mappings_lock): Change type to int.
2804 * semaphoreP.h (__sem_mappings_lock): Likewise.
2805 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2806 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2807 instead of lll_*mutex_*, pass LLL_SHARED as last
2809 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2810 pass LLL_SHARED as last argument.
2811 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2812 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2813 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2814 pass LLL_SHARED as last argument.
2815 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2816 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2817 LLL_SHARED as last argument.
2818 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2819 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2821 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2822 __libc_lock_lock_recursive, __libc_lock_unlock,
2823 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2824 argument to lll_{,un}lock.
2825 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2826 _IO_lock_unlock): Likewise.
2827 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2829 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2830 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2832 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2833 free_mem): Likewise.
2834 (__fork_lock): Change type to int.
2835 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2836 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2837 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2839 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2840 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2841 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2843 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2844 pass it through to lll_futex_*wait, only compile in when
2846 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2847 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2848 argument and pass it through to lll_futex_*wait.
2849 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2850 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2851 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2852 inline functions to __lll_* resp. __lll_robust_*.
2853 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2854 (lll_mutex_dead): Add private argument.
2855 (__lll_lock_wait_private): New prototype.
2856 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2857 __lll_robust_lock_timedwait): Add private argument to prototypes.
2858 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2859 call __lll_lock_wait_private, otherwise pass private to
2861 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2862 __lll_robust_timedlock): Add private argument, pass it to
2863 __lll_*wait functions.
2864 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2865 call __lll_unlock_wake_private, otherwise pass private to
2867 (__lll_robust_unlock): Add private argument, pass it to
2868 __lll_robust_unlock_wake.
2869 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2870 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2871 argument, pass it through to __lll_* inline function.
2872 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2873 (lll_lock_t): Remove.
2874 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2875 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2876 lll_cond_wake, lll_cond_broadcast): Remove.
2877 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2878 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2879 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2880 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2881 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2882 the header from assembler. Renamed all lll_mutex_* resp.
2883 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2884 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2885 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2886 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2887 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2888 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2889 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2891 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2892 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2893 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2894 (lll_trylock): Likewise, use __lll_trylock_asm, pass
2895 MULTIPLE_THREADS_OFFSET as another asm operand.
2896 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2897 MULTIPLE_THREADS_OFFSET as last asm operand, call
2898 __lll_lock_wait_private if private is constant LLL_PRIVATE,
2899 otherwise pass private as another argument to __lll_lock_wait.
2900 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2901 lll_timedlock, lll_robust_timedlock): Add private argument, pass
2902 private as another argument to __lll_*lock_wait call.
2903 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2904 MULTIPLE_THREADS_OFFSET as another asm operand, call
2905 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2906 otherwise pass private as another argument to __lll_unlock_wake.
2907 (lll_robust_unlock): Add private argument, pass private as another
2908 argument to __lll_unlock_wake.
2909 (lll_robust_dead): Add private argument, use __lll_private_flag
2911 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2912 LLL_MUTEX_LOCK_INITIALIZER.
2913 (lll_lock_t): Remove.
2914 (LLL_LOCK_INITIALIZER_WAITERS): Define.
2915 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2916 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2917 lll_cond_wake, lll_cond_broadcast): Remove.
2918 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2919 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2920 2007-05-2{3,9} changes.
2921 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2922 kernel-features.h and lowlevellock.h.
2923 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2924 (LOAD_FUTEX_WAIT): Rewritten.
2925 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2927 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2928 (__lll_mutex_lock_wait): Rename to ...
2929 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
2930 %ecx, %ecx is now private argument. Don't compile in for libc.so.
2931 (__lll_mutex_timedlock_wait): Rename to ...
2932 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
2933 contains private argument. Don't compile in for libc.so.
2934 (__lll_mutex_unlock_wake): Rename to ...
2935 (__lll_unlock_wake): ... this. %ecx contains private argument.
2936 Don't compile in for libc.so.
2937 (__lll_timedwait_tid): Use __NR_gettimeofday.
2938 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2939 kernel-features.h and lowlevellock.h.
2940 (LOAD_FUTEX_WAIT): Define.
2941 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2943 (__lll_robust_mutex_lock_wait): Rename to ...
2944 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
2945 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
2947 (__lll_robust_mutex_timedlock_wait): Rename to ...
2948 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
2949 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2950 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2952 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2953 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2954 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2955 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2956 to __lll_lock_wait in %edx.
2957 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2958 Include lowlevellock.h and pthread-errnos.h.
2959 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2960 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2961 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2962 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2963 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2965 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2966 Include lowlevellock.h and pthread-errnos.h.
2967 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2968 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2969 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2970 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2971 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2973 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2974 Include lowlevellock.h.
2975 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2977 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2978 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2979 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2980 __lll_unlock_wake. Use __NR_gettimeofday.
2981 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2982 Include lowlevellock.h.
2983 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2984 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2985 to __lll_*, pass cond_lock address in %edx rather than %ecx to
2986 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2987 and __lll_unlock_wake.
2988 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2989 Include lowlevellock.h.
2990 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2991 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2992 MUTEX(%ebx) address in %edx rather than %ecx to
2993 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2994 and __lll_unlock_wake. Move return value from %ecx to %edx
2996 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2997 Include lowlevellock.h.
2998 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3000 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3001 MUTEX(%ebp) address in %edx rather than %ecx to
3002 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3003 and __lll_unlock_wake. Move return value from %ecx to %edx
3004 register. Use __NR_gettimeofday.
3005 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3006 Include lowlevellock.h.
3007 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3009 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3010 MUTEX(%ebp) address in %edx rather than %ecx to
3011 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3012 and __lll_unlock_wake. Move return value from %ecx to %edx
3013 register. Use __NR_gettimeofday.
3014 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3015 Include lowlevellock.h.
3016 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3017 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3018 MUTEX(%edi) address in %edx rather than %ecx to
3019 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3020 and __lll_unlock_wake.
3021 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3022 Include lowlevellock.h.
3023 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3024 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3025 MUTEX(%ebx) address in %edx rather than %ecx to
3026 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3027 and __lll_unlock_wake. Move return value from %ecx to %edx
3029 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3031 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3033 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3034 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3035 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3037 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3038 (sem_timedwait): Use __NR_gettimeofday.
3039 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3041 (LOCK): Don't define.
3042 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3044 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3045 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3047 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3048 2007-05-2{3,9} changes.
3049 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3050 kernel-features.h and lowlevellock.h.
3051 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3052 (LOAD_FUTEX_WAIT): Rewritten.
3053 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3054 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3055 (__lll_mutex_lock_wait): Rename to ...
3056 (__lll_lock_wait): ... this. %esi is now private argument.
3057 Don't compile in for libc.so.
3058 (__lll_mutex_timedlock_wait): Rename to ...
3059 (__lll_timedlock_wait): ... this. %esi contains private argument.
3060 Don't compile in for libc.so.
3061 (__lll_mutex_unlock_wake): Rename to ...
3062 (__lll_unlock_wake): ... this. %esi contains private argument.
3063 Don't compile in for libc.so.
3064 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3065 kernel-features.h and lowlevellock.h.
3066 (LOAD_FUTEX_WAIT): Define.
3067 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3068 (__lll_robust_mutex_lock_wait): Rename to ...
3069 (__lll_robust_lock_wait): ... this. %esi argument contains private.
3070 Use LOAD_FUTEX_WAIT macro.
3071 (__lll_robust_mutex_timedlock_wait): Rename to ...
3072 (__lll_robust_timedlock_wait): ... this. %esi argument contains
3073 private, use LOAD_FUTEX_WAIT macro.
3074 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3076 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3077 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3078 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3079 __lll_lock_wait and __lll_unlock_wake.
3080 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3081 Include lowlevellock.h and pthread-errnos.h.
3082 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3083 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3084 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3085 pass LLL_SHARED in %esi to both __lll_lock_wait and
3087 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3088 Include lowlevellock.h and pthread-errnos.h.
3089 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3090 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3091 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3092 pass LLL_SHARED in %esi to both __lll_lock_wait and
3094 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3095 Include lowlevellock.h.
3096 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3097 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3098 pass LLL_SHARED in %esi to both __lll_lock_wait and
3100 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3101 Include lowlevellock.h.
3102 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3103 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3104 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3105 and __lll_unlock_wake.
3106 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3107 Include lowlevellock.h.
3108 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3110 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3111 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3112 and __lll_unlock_wake.
3113 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3114 Include lowlevellock.h.
3115 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3117 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3118 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3119 and __lll_unlock_wake.
3120 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3121 Include lowlevellock.h.
3122 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3124 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3125 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3126 and __lll_unlock_wake.
3127 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3128 Include lowlevellock.h.
3129 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3131 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3132 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3133 and __lll_unlock_wake.
3134 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3135 Include lowlevellock.h.
3136 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3138 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3139 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3140 and __lll_unlock_wake.
3141 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3143 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3145 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3146 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3147 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3149 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3150 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3152 (LOCK): Don't define.
3153 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3155 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3156 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3157 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3158 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3159 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3160 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3161 (__lll_lock_wait_private): New function.
3162 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3163 it to lll_futex_*wait. Don't compile in for libc.so.
3164 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3166 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3167 (struct sparc_pthread_barrier): Remove.
3168 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3169 struct sparc_pthread_barrier. Pass
3170 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3171 and lll_futex_wait macros.
3172 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3174 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3175 Include sparc pthread_barrier_wait.c instead of generic one.
3177 2007-07-30 Jakub Jelinek <jakub@redhat.com>
3179 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3181 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3182 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3184 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3185 (pthread_rwlock_timedwrlock): Likewise.
3186 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3187 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3189 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3191 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3193 2007-07-26 Jakub Jelinek <jakub@redhat.com>
3195 * tst-locale2.c (useless): Add return statement.
3197 2007-07-24 Jakub Jelinek <jakub@redhat.com>
3199 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3200 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3201 * pthread_create.c (start_thread): Likewise.
3202 * init.c (sighandler_setxid): Likewise.
3203 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3204 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3205 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3206 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3207 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3208 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3209 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3210 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3211 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3213 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3215 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3217 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3218 __rtld_notify): Likewise.
3219 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3220 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3221 __pthread_once): Likewise.
3222 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3223 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3224 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3225 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3226 (lll_futex_wait): Add private argument, define as wrapper around
3227 lll_futex_timed_wait.
3228 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3229 use __lll_private_flag macro.
3230 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3231 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3232 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3233 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3234 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3235 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3236 (lll_futex_wait): Add private argument, define as wrapper around
3237 lll_futex_timed_wait.
3238 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3239 use __lll_private_flag macro.
3240 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3241 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3242 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3244 (lll_futex_timed_wait, lll_futex_wake): Use it.
3245 (lll_private_futex_wait, lll_private_futex_timed_wait,
3246 lll_private_futex_wake): Removed.
3247 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3248 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3249 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3250 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3251 (lll_futex_wait): Add private argument, define as wrapper around
3252 lll_futex_timed_wait.
3253 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3254 use __lll_private_flag macro.
3255 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3256 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3258 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3259 (lll_private_futex_wait, lll_private_futex_timed_wait,
3260 lll_private_futex_wake): Removed.
3261 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3262 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3263 (lll_private_futex_wait, lll_private_futex_timed_wait,
3264 lll_private_futex_wake): Removed.
3265 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3266 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3267 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3268 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3269 (lll_futex_wait): Add private argument, define as wrapper around
3270 lll_futex_timed_wait.
3271 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3272 use __lll_private_flag macro.
3273 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3274 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3276 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3278 (lll_futex_timed_wait, lll_futex_wake): Use it.
3279 (lll_private_futex_wait, lll_private_futex_timed_wait,
3280 lll_private_futex_wake): Removed.
3282 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3284 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3285 of the structure for sparc32.
3287 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3289 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3291 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3293 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3294 code used when private futexes are assumed.
3295 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3298 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3300 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3301 (__lll_private_flag): Define.
3302 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3303 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3305 (lll_private_futex_wait, lll_private_futex_timedwait,
3306 lll_private_futex_wake): Define as wrapper around non-_private
3308 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3309 (__lll_private_flag): Define.
3310 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3311 (lll_private_futex_wait, lll_private_futex_timedwait,
3312 lll_private_futex_wake): Define as wrapper around non-_private
3315 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3317 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3318 parameter to lll_futex_wait call.
3319 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3321 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3322 Replace lll_futex_wait with lll_private_futex_wait.
3323 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3324 Add LLL_SHARED parameter to lll_futex_wake().
3326 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3327 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3328 lll_private_futex_wake.
3329 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3330 bit from private parm before syscall.
3331 (lll_futex_timed_wait): Likewise.
3332 (lll_futex_wake): Likewise.
3333 (lll_futex_wake_unlock): Likewise.
3334 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3335 (lll_robust_mutex_unlock): Likewise.
3336 (lll_mutex_unlock_force): Likewise.
3337 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3339 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3341 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3342 compilation when unconditionally using private futexes.
3343 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3344 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3346 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3347 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3349 2007-07-17 Jakub Jelinek <jakub@redhat.com>
3351 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3354 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3356 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3359 2007-05-16 Roland McGrath <roland@redhat.com>
3361 * init.c (__nptl_initial_report_events): New variable.
3362 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3365 2007-06-22 Jakub Jelinek <jakub@redhat.com>
3367 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3368 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3370 2007-06-19 Ulrich Drepper <drepper@redhat.com>
3372 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3375 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3377 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3378 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3379 * pthread_mutex_timedlock.c: Likewise.
3380 * pthread_mutex_trylock.c: Likewise.
3381 * pthread_mutex_unlock.c: Likewise.
3383 2007-06-17 Andreas Schwab <schwab@suse.de>
3385 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3388 2007-06-17 Ulrich Drepper <drepper@redhat.com>
3390 * allocatestack.c (allocate_stack): Make code compile if
3391 __ASSUME_PRIVATE_FUTEX is set.
3393 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3395 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3396 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3397 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3398 (__pthread_rwlock_wrlock): Likewise.
3399 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3400 (pthread_rwlock_timedrdlock): Likewise.
3401 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3402 (pthread_rwlock_timedwrlock): Likewise.
3403 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3404 (__pthread_rwlock_unlock): Likewise.
3406 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3408 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3409 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3410 Split __flags into __flags, __shared, __pad1 and __pad2.
3411 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3412 futexes if they are available.
3413 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3414 in libc-lowlevellock.S allow using private futexes.
3415 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3416 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3417 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3418 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3419 lll_private_futex_timed_wait and lll_private_futex_wake.
3420 (lll_robust_mutex_unlock): Fix typo.
3421 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3422 field in futex command setup.
3423 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3424 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3425 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3426 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3427 if they are available. Remove clear_once_control.
3428 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3429 futexes if they are available.
3430 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3431 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3432 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3433 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3434 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3435 Wake only when there are waiters.
3436 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3437 support. Indicate that there are waiters. Remove unnecessary
3438 extra cancellation test.
3439 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3440 left-over duplication of __sem_wait_cleanup.
3442 2007-06-07 Ulrich Drepper <drepper@redhat.com>
3444 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3445 parameter to lll_futex_wait, lll_futex_timed_wait, and
3446 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3447 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3448 lll_private_futex_wake.
3449 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3450 * allocatestack.c: Adjust use of lll_futex_* macros.
3452 * lowlevellock.h: Likewise.
3453 * pthread_barrier_wait.c: Likewise.
3454 * pthread_cond_broadcast.c: Likewise.
3455 * pthread_cond_destroy.c: Likewise.
3456 * pthread_cond_signal.c: Likewise.
3457 * pthread_cond_timedwait.c: Likewise.
3458 * pthread_cond_wait.c: Likewise.
3459 * pthread_create.c: Likewise.
3460 * pthread_mutex_lock.c: Likewise.
3461 * pthread_mutex_setprioceiling.c: Likewise.
3462 * pthread_mutex_timedlock.c: Likewise.
3463 * pthread_mutex_unlock.c: Likewise.
3464 * pthread_rwlock_timedrdlock.c: Likewise.
3465 * pthread_rwlock_timedwrlock.c: Likewise.
3466 * pthread_rwlock_unlock.c: Likewise.
3467 * sysdeps/alpha/tls.h: Likewise.
3468 * sysdeps/i386/tls.h: Likewise.
3469 * sysdeps/ia64/tls.h: Likewise.
3470 * sysdeps/powerpc/tls.h: Likewise.
3471 * sysdeps/pthread/aio_misc.h: Likewise.
3472 * sysdeps/pthread/gai_misc.h: Likewise.
3473 * sysdeps/s390/tls.h: Likewise.
3474 * sysdeps/sh/tls.h: Likewise.
3475 * sysdeps/sparc/tls.h: Likewise.
3476 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3477 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3478 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3479 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3480 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3481 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3482 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3483 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3484 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3485 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3487 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3488 * sysdeps/x86_64/tls.h: Likewise.
3490 2007-05-29 Ulrich Drepper <drepper@redhat.com>
3492 * pthread_getattr_np.c: No need to install a cancellation handler,
3493 this is no cancellation point.
3494 * pthread_getschedparam.c: Likewise.
3495 * pthread_setschedparam.c: Likewise.
3496 * pthread_setschedprio.c: Likewise.
3497 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3499 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3500 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3501 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3502 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3503 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3504 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3505 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3506 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3507 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3508 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3509 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3510 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3512 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3513 whether there are more than one thread makes no sense here since
3514 we only call the slow path if the locks are taken.
3515 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3517 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3518 COND_NWAITERS_SHIFT.
3519 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3521 * pthread_cond_init.c: Likewise.
3522 * pthread_cond_timedwait.c: Likewise.
3523 * pthread_cond_wait.c: Likewise.
3524 * pthread_condattr_getclock.c: Likewise.
3525 * pthread_condattr_setclock.c: Likewise.
3526 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3527 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3528 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3529 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3530 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3532 2007-05-28 Jakub Jelinek <jakub@redhat.com>
3534 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3537 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3539 (THREAD_GSCOPE_GET_FLAG): Remove.
3540 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3541 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3543 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3544 (THREAD_GSCOPE_GET_FLAG): Remove.
3545 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3546 instead of THREAD_GSCOPE_GET_FLAG.
3547 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3549 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3550 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3551 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3552 THREAD_GSCOPE_WAIT): Define.
3553 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3554 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3555 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3556 THREAD_GSCOPE_WAIT): Define.
3557 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3558 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3559 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3560 THREAD_GSCOPE_WAIT): Define.
3561 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3562 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3563 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3564 THREAD_GSCOPE_WAIT): Define.
3566 2007-05-24 Richard Henderson <rth@redhat.com>
3568 * descr.h (struct pthread): Add header.gscope_flag.
3569 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3570 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3571 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3572 THREAD_GSCOPE_WAIT): Define.
3574 2007-05-27 Ulrich Drepper <drepper@redhat.com>
3576 * init.c: Make it compile with older kernel headers.
3578 * tst-initializers1.c: Show through exit code which test failed.
3580 * pthread_rwlock_init.c: Also initialize __shared field.
3581 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3582 element in rwlock structure into four byte elements. One of them is
3583 the new __shared element.
3584 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3586 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3587 __shared, adjust names of other padding elements.
3588 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3589 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3590 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3591 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3593 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3594 futex to use private operations if possible.
3595 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3597 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3599 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3600 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3601 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3602 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3604 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3606 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3607 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3609 2007-05-26 Ulrich Drepper <drepper@redhat.com>
3611 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3612 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3613 * pthread_rwlock_timedrdlock.c: Likewise.
3614 * pthread_rwlock_tryrdlock.c: Likewise.
3616 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3619 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3620 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3621 duplication of __sem_wait_cleanup.
3623 * allocatestack.c: Revert last change.
3625 * sysdeps/i386/tls.h: Likewise.
3626 * sysdeps/x86_64/tls.h: Likewise.
3627 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3629 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3631 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3633 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3634 * pthread_barrier_init.c: Set private flag if pshared and private
3635 futexes are supported.
3636 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3637 private field in futex command setup.
3638 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3640 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3642 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3644 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3645 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3646 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3647 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3648 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3650 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3651 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3652 fields in the structure.
3653 (__old_sem_init): New function.
3654 * sem_open.c: Initialize all fields of the structure.
3655 * sem_getvalue.c: Adjust for renamed element.
3656 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3657 (gen-as-const-headers): Add structsem.sym.
3658 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3659 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3660 struct new_sem. Add struct old_sem.
3661 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3662 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3663 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3664 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3665 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3666 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3667 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3668 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3669 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3670 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3671 * tst-sem10.c: New file.
3672 * tst-sem11.c: New file.
3673 * tst-sem12.c: New file.
3674 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3677 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3678 Jakub Jelinek <jakub@redhat.com>
3680 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3681 Move __pthread_enable_asynccancel right before futex syscall.
3682 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3685 2007-05-24 Jakub Jelinek <jakub@redhat.com>
3687 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3688 THREAD_COPY_PRIVATE_FUTEX): Define.
3689 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3690 THREAD_COPY_PRIVATE_FUTEX): Define.
3691 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3692 * init.c (__pthread_initialize_minimal_internal): Use
3693 THREAD_SET_PRIVATE_FUTEX.
3695 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3696 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3697 THREAD_GSCOPE_FLAG_WAIT): Define.
3698 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3699 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3700 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3702 (THREAD_GSCOPE_GET_FLAG): Define.
3703 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3704 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3705 instead of ->header.gscope_flag directly.
3707 2007-05-23 Ulrich Drepper <drepper@redhat.com>
3709 * init.c (__pthread_initialize_minimal_internal): Check whether
3710 private futexes are available.
3711 * allocatestack.c (allocate_stack): Copy private_futex field from
3712 current thread into the new stack.
3713 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3714 futexes if they are available.
3715 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3716 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3717 in libc-lowlevellock.S allow using private futexes.
3718 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3719 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3721 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3722 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3723 if they are available.
3724 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3725 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3726 * sysdeps/i386/tcb-offsets.sym: Likewise.
3727 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3728 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3730 2007-05-21 Ulrich Drepper <drepper@redhat.com>
3732 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3733 Remove ptr_wait_lookup_done again.
3734 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3735 (__pthread_initialize_minimal_internal): Initialize
3736 _dl_wait_lookup_done pointer in _rtld_global directly.
3737 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3738 Remove code to code _dl_wait_lookup_done.
3739 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3742 2007-05-21 Jakub Jelinek <jakub@redhat.com>
3744 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3745 pthread_mutex_init failed with ENOTSUP.
3747 2007-05-19 Ulrich Drepper <drepper@redhat.com>
3749 * allocatestack.c (__wait_lookup_done): New function.
3750 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3751 Add ptr_wait_lookup_done.
3752 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3753 * pthreadP.h: Declare __wait_lookup_done.
3754 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3755 Define macros to implement reference handling of global scope.
3756 * sysdeps/x86_64/tls.h: Likewise.
3757 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3758 Initialize GL(dl_wait_lookup_done).
3760 2007-05-17 Ulrich Drepper <drepper@redhat.com>
3763 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3765 * pthread_mutex_timedlock.c: Likewise.
3766 * pthread_mutex_trylock.c: Likewise.
3767 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3769 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3770 * tst-robust9.c: New file.
3771 * tst-robustpi9.c: New file.
3773 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3774 unnecessary extra cancellation test.
3776 2007-05-14 Ulrich Drepper <drepper@redhat.com>
3778 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3779 extra cancellation test.
3780 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3782 2007-05-10 Ulrich Drepper <drepper@redhat.com>
3784 * descr.h (struct pthread): Rearrange members to fill hole in
3787 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3788 (__pthread_setaffinity_new): If syscall was successful and
3789 RESET_VGETCPU_CACHE is defined, use it before returning.
3790 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3792 2007-05-10 Jakub Jelinek <jakub@redhat.com>
3795 * tst-align2.c: Include stackinfo.h.
3796 * tst-getpid1.c: Likewise.
3798 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
3801 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3802 * tst-getpid1.c (do_test): Likewise.
3805 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3806 (allocate_stack): Likewise.
3808 2007-05-07 Ulrich Drepper <drepper@redhat.com>
3810 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3811 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3812 (__lll_robust_timedlock_wait): Likewise.
3813 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3815 2007-05-06 Mike Frysinger <vapier@gentoo.org>
3818 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3819 * tst-cancel4.c (tf_fdatasync): New test.
3821 2007-04-27 Ulrich Drepper <drepper@redhat.com>
3824 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3825 check mutexes like normal mutexes.
3828 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3829 Initialize the whole sigevent structure to appease valgrind.
3831 2007-04-25 Ulrich Drepper <drepper@redhat.com>
3833 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3834 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3836 2007-04-06 Ulrich Drepper <drepper@redhat.com>
3838 * tst-locale1.c: Avoid warnings.
3839 * tst-locale2.c: Likewise.
3841 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3843 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3844 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3846 2007-03-16 Jakub Jelinek <jakub@redhat.com>
3848 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3849 __extern_always_inline where appropriate.
3850 * sysdeps/pthread/pthread.h: Likewise.
3852 2007-03-13 Richard Henderson <rth@redhat.com>
3854 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3855 separate cfi regions for the two subsections.
3857 2007-02-25 Ulrich Drepper <drepper@redhat.com>
3859 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3860 new thread, don't just decrement it.
3861 Patch by Suzuki K P <suzuki@in.ibm.com>.
3863 2007-02-21 Ulrich Drepper <drepper@redhat.com>
3865 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3866 PTHFCT_CALL definition.
3868 2007-02-18 Ulrich Drepper <drepper@redhat.com>
3870 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3871 available, don't use it.
3873 2007-02-09 Jakub Jelinek <jakub@redhat.com>
3875 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3876 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3877 call into the kernel to delay.
3879 2007-01-18 Ulrich Drepper <drepper@redhat.com>
3881 * tst-initializers1.c: We want to test the initializers as seen
3882 outside of libc, so undefined _LIBC.
3884 * pthread_join.c (cleanup): Avoid warning.
3886 2007-01-17 Ulrich Drepper <drepper@redhat.com>
3888 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3889 (__lll_timedwait_tid): Add unwind info.
3891 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3892 function table, mangle the pointers.
3893 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3894 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3895 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3896 demangle pointers before use.
3897 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3899 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3900 * sysdeps/pthread/setxid.h: Likewise.
3902 2007-01-12 Ulrich Drepper <drepper@redhat.com>
3904 * tst-rwlock7.c: Show some more information in case of correct
3907 2007-01-11 Ulrich Drepper <drepper@redhat.com>
3909 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3910 (lll_futex_timed_wait): Undo part of last change, don't negate
3913 2007-01-10 Ulrich Drepper <drepper@redhat.com>
3915 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
3916 FUTEX_CMP_REQUEUE and lll_futex_requeue.
3918 2006-12-28 David S. Miller <davem@davemloft.net>
3920 * shlib-versions: Fix sparc64 linux target specification.
3922 2007-01-10 Jakub Jelinek <jakub@redhat.com>
3924 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3925 Adjust include path for pthread_barrier_wait.c move.
3927 2006-12-21 Jakub Jelinek <jakub@redhat.com>
3929 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3930 tid isn't reread from pd->tid in between ESRCH test and the syscall.
3932 2006-12-06 Jakub Jelinek <jakub@redhat.com>
3934 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3935 6 argument cancellable syscalls.
3936 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3937 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3938 6 argument cancellable syscalls.
3939 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3941 2006-12-09 Ulrich Drepper <drepper@redhat.com>
3943 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3944 (__rtld_mrlock_initialize): Add missing closing parenthesis.
3946 2006-10-30 Jakub Jelinek <jakub@redhat.com>
3948 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3949 __sync_lock_release instead of __sync_lock_release_si.
3951 2006-10-29 Jakub Jelinek <jakub@redhat.com>
3953 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3955 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3956 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3957 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3958 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3959 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3960 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3961 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3962 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3963 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3964 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3965 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3967 2006-10-27 Ulrich Drepper <drepper@redhat.com>
3969 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3970 * pthread_barrier_wait.c: ...here.
3971 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3972 * pthread_cond_broadcast.c: ...here.
3973 * sysdeps/pthread/pthread_cond_signal.c: Move to...
3974 * pthread_cond_signal.c: ...here.
3975 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3976 * pthread_cond_timedwait.c: ...here.
3977 * sysdeps/pthread/pthread_cond_wait.c: Move to...
3978 * pthread_cond_wait.c: ...here.
3979 * sysdeps/pthread/pthread_once.c: Move to...
3980 * pthread_once.c: ...here.
3981 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3982 * pthread_rwlock_rdlock.c: ...here.
3983 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3984 * pthread_rwlock_timedrdlock.c: ...here.
3985 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3986 * pthread_rwlock_timedwrlock.c: ...here.
3987 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3988 * pthread_rwlock_unlock.c: ...here.
3989 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3990 * pthread_rwlock_wrlock.c: ...here.
3991 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3992 * pthread_spin_destroy.c: ...here.
3993 * sysdeps/pthread/pthread_spin_init.c: Move to...
3994 * pthread_spin_init.c: ...here.
3995 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3996 * pthread_spin_unlock.c: ...here.
3997 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3998 * pthread_getcpuclockid.c: ...here.
4000 * init.c: USE_TLS support is now always enabled.
4001 * tst-tls5.h: Likewise.
4002 * sysdeps/alpha/tls.h: Likewise.
4003 * sysdeps/i386/tls.h: Likewise.
4004 * sysdeps/ia64/tls.h: Likewise.
4005 * sysdeps/powerpc/tls.h: Likewise.
4006 * sysdeps/s390/tls.h: Likewise.
4007 * sysdeps/sh/tls.h: Likewise.
4008 * sysdeps/sparc/tls.h: Likewise.
4009 * sysdeps/x86_64/tls.h: Likewise.
4011 2006-10-27 Jakub Jelinek <jakub@redhat.com>
4013 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4014 __rtld_mrlock_change): Update oldval if atomic compare and exchange
4017 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4018 Define to THREAD_SELF->header.multiple_threads.
4019 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4021 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4023 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4024 (SINGLE_THREAD_P): Likewise.
4025 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4026 (SINGLE_THREAD_P): Likewise.
4027 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4028 (SINGLE_THREAD_P): Likewise.
4029 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4030 (SINGLE_THREAD_P): Likewise.
4031 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4033 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4034 (SINGLE_THREAD_P): Likewise.
4035 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4036 (SINGLE_THREAD_P): Likewise.
4037 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4040 2006-10-26 Jakub Jelinek <jakub@redhat.com>
4042 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4043 by default rather than 2_3_3.
4045 2006-10-17 Jakub Jelinek <jakub@redhat.com>
4047 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4048 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4049 atomic_* instead of catomic_* macros.
4051 2006-10-12 Ulrich Drepper <drepper@redhat.com>
4054 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4055 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4056 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4057 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4058 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4059 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4060 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4061 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4062 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4063 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4064 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4065 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4066 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4068 2006-10-11 Ulrich Drepper <drepper@redhat.com>
4070 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4071 cancelable syscalls with six parameters.
4073 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4074 operations instead of atomic_*.
4076 2006-10-09 Ulrich Drepper <drepper@redhat.com>
4078 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4080 2006-10-07 Ulrich Drepper <drepper@redhat.com>
4082 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4083 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4084 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4086 * pthread_attr_setstack.c: Allow overwriting the version number of the
4088 * pthread_attr_setstacksize.c: Likewise.
4089 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4091 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4092 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4094 2006-09-24 Ulrich Drepper <drepper@redhat.com>
4097 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4098 Patch by Petr Baudis.
4100 2006-09-18 Jakub Jelinek <jakub@redhat.com>
4102 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4104 * tst-cancel2.c (tf): Loop as long as something was written.
4106 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4108 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4109 mutexes wake all mutexes.
4110 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4111 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4112 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4114 2006-09-12 Ulrich Drepper <drepper@redhat.com>
4116 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4117 to guarantee the thread is always canceled.
4119 2006-09-08 Jakub Jelinek <jakub@redhat.com>
4121 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4123 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4124 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4125 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4126 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4127 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4129 2006-09-08 Ulrich Drepper <drepper@redhat.com>
4132 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4133 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4134 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4135 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4136 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4137 * Makefile (tests): Add tst-cond22.
4138 * tst-cond22.c: New file.
4140 2006-09-05 Ulrich Drepper <drepper@redhat.com>
4143 * descr.h (struct pthread): Add parent_cancelhandling.
4144 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4145 cancelhandling value to child.
4146 * pthread_create.c (start_thread): If parent thread was canceled
4147 reset the SIGCANCEL mask.
4148 * Makefile (tests): Add tst-cancel25.
4149 * tst-cancel25.c: New file.
4151 2006-09-05 Jakub Jelinek <jakub@redhat.com>
4152 Ulrich Drepper <drepper@redhat.com>
4154 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4155 counterp if it is already zero.
4156 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4158 2006-03-04 Jakub Jelinek <jakub@redhat.com>
4159 Roland McGrath <roland@redhat.com>
4161 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4162 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4163 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4164 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4165 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4166 lll_robust_mutex_timedlock, lll_mutex_unlock,
4167 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4168 Add _L_*_ symbols around the subsection.
4169 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4170 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4172 2006-03-03 Jakub Jelinek <jakub@redhat.com>
4173 Roland McGrath <roland@redhat.com>
4175 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4176 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4177 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4178 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4179 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4180 lll_robust_mutex_timedlock, lll_mutex_unlock,
4181 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4182 Add _L_*_ symbols around the subsection.
4183 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4184 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4186 2006-08-31 Ulrich Drepper <drepper@redhat.com>
4188 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4189 change because it can disturb too much existing code. If real hard
4190 reader preference is needed we'll introduce another type.
4191 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4192 (pthread_rwlock_timedwrlock): Likewise.
4193 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4196 2006-08-30 Ulrich Drepper <drepper@redhat.com>
4198 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4200 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4201 (pthread_rwlock_timedwrlock): Likewise.
4202 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4205 2006-08-25 Jakub Jelinek <jakub@redhat.com>
4207 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4208 Only define ifdef SHARED.
4210 2006-08-23 Ulrich Drepper <drepper@redhat.com>
4212 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4213 (free_stacks): ...here.
4214 (__free_stack_cache): New function.
4215 * pthreadP.h: Declare __free_stack_cache.
4216 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4218 * init.c (pthread_functions): Initialize ptr_freeres.
4219 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4220 New freeres function.
4222 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4225 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4227 2006-08-20 Ulrich Drepper <drepper@redhat.com>
4229 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4230 _XOPEN_REALTIME_THREADS.
4232 2006-08-15 Jakub Jelinek <jakub@redhat.com>
4234 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4235 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4236 HAVE_CLOCK_GETTIME_VSYSCALL.
4237 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4239 2006-08-14 Jakub Jelinek <jakub@redhat.com>
4241 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4242 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4243 * descr.h (struct priority_protection_data): New type.
4244 (struct pthread): Add tpp field.
4245 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4246 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4247 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4248 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4250 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4251 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4252 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4253 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4255 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4257 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4258 * pthread_mutexattr_getprioceiling.c
4259 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4260 in the SCHED_FIFO priority range.
4261 * pthread_mutexattr_setprioceiling.c
4262 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4263 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4264 if mutex is not TPP. Ceiling is now in __data.__lock.
4265 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4266 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4267 is now in __data.__lock. Add locking.
4268 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4269 * Makefile (libpthread-routines): Add tpp.
4270 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4271 * tst-tpp.h: New file.
4272 * tst-mutexpp1.c: New file.
4273 * tst-mutexpp6.c: New file.
4274 * tst-mutexpp10.c: New file.
4275 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4276 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4278 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4281 * pthread_join.c (pthread_join): Account for self being canceled
4282 when checking for deadlocks.
4283 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4284 (tf1): Don't print anything after pthread_join returns, this would be
4285 another cancellation point.
4287 * tst-join6.c: New file.
4288 * Makefile (tests): Add tst-join6.
4290 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4293 * pthread_setspecific.c (__pthread_setspecific): Check
4294 out-of-range index before checking for unused key.
4296 * sysdeps/pthread/gai_misc.h: New file.
4298 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4300 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4301 file. Don't use sysctl.
4302 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4303 overwrite the file if this is likely not true.
4305 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4307 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4308 * Makefile (tests): Add tst-getpid3.
4309 * tst-getpid3.c: New file.
4311 2006-07-30 Roland McGrath <roland@redhat.com>
4313 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4315 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4316 (pause_not_cancel): New macro.
4317 (nanosleep_not_cancel): New macro.
4318 (sigsuspend_not_cancel): New macro.
4319 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4320 nanosleep_not_cancel macro from <not-cancel.h>.
4321 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4322 macro from <not-cancel.h>.
4324 2006-07-28 Ulrich Drepper <drepper@redhat.com>
4325 Jakub Jelinek <jakub@redhat.com>
4327 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4328 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4329 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4330 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4331 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4332 * pthread_mutex_lock.c: Likewise.
4333 * pthread_mutex_timedlock.c: Likewise.
4334 * pthread_mutex_trylock.c: Likewise.
4335 * pthread_mutex_unlock.c: Likewise.
4336 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4338 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4339 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4340 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4341 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4342 pthread-pi-defines.sym.
4343 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4344 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4345 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4346 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4347 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4348 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4349 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4350 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4351 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4352 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4353 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4354 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4355 * tst-mutex2.c: Likewise.
4356 * tst-mutex3.c: Likewise.
4357 * tst-mutex4.c: Likewise.
4358 * tst-mutex5.c: Likewise.
4359 * tst-mutex6.c: Likewise.
4360 * tst-mutex7.c: Likewise.
4361 * tst-mutex7a.c: Likewise.
4362 * tst-mutex8.c: Likewise.
4363 * tst-mutex9.c: Likewise.
4364 * tst-robust1.c: Likewise.
4365 * tst-robust7.c: Likewise.
4366 * tst-robust8.c: Likewise.
4367 * tst-mutexpi1.c: New file.
4368 * tst-mutexpi2.c: New file.
4369 * tst-mutexpi3.c: New file.
4370 * tst-mutexpi4.c: New file.
4371 * tst-mutexpi5.c: New file.
4372 * tst-mutexpi6.c: New file.
4373 * tst-mutexpi7.c: New file.
4374 * tst-mutexpi7a.c: New file.
4375 * tst-mutexpi8.c: New file.
4376 * tst-mutexpi9.c: New file.
4377 * tst-robust1.c: New file.
4378 * tst-robust2.c: New file.
4379 * tst-robust3.c: New file.
4380 * tst-robust4.c: New file.
4381 * tst-robust5.c: New file.
4382 * tst-robust6.c: New file.
4383 * tst-robust7.c: New file.
4384 * tst-robust8.c: New file.
4385 * Makefile (tests): Add the new tests.
4387 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4388 * pthread_mutex_destroy.c: Remove unneeded label.
4390 2006-07-01 Ulrich Drepper <drepper@redhat.com>
4392 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4393 computations to compile time.
4395 2006-06-04 Ulrich Drepper <drepper@redhat.com>
4397 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4399 2006-05-15 Ulrich Drepper <drepper@redhat.com>
4401 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4403 2006-05-11 Ulrich Drepper <drepper@redhat.com>
4405 * pthread_key_create.c (__pthread_key_create): Do away with
4406 __pthread_keys_lock.
4408 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4409 (__kernel_cpumask_size): Mark as hidden.
4410 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4412 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4413 * semaphoreP.h (__sem_mappings_lock): Likewise.
4415 2006-05-10 Ulrich Drepper <drepper@redhat.com>
4417 * pthread_atfork.c: Mark __dso_handle as hidden.
4419 2006-05-09 Ulrich Drepper <drepper@redhat.com>
4422 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4423 the reload problem. Change the one path in pthread_cancel_init
4424 which causes the problem. Force gcc to reload. Simplify callers.
4425 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4426 (_Unwind_GetBSP): Undo last patch.
4428 2006-05-07 Ulrich Drepper <drepper@redhat.com>
4430 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4431 function pointer is reloaded after pthread_cancel_init calls.
4434 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4435 pointers are reloaded after pthread_cancel_init calls.
4437 2006-05-01 Ulrich Drepper <drepper@redhat.com>
4439 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4442 2006-04-27 Ulrich Drepper <drepper@redhat.com>
4444 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4445 Allocate new object which is passed to timer_sigev_thread so that
4446 the timer can be deleted before the new thread is scheduled.
4448 2006-04-26 Roland McGrath <roland@redhat.com>
4450 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4452 2006-04-08 Ulrich Drepper <drepper@redhat.com>
4454 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4455 suffix for conditional jumps.
4456 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4457 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4458 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4459 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4460 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4461 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4463 * init.c (sigcancel_handler): Compare with correct PID even if the
4464 thread is in the middle of a fork call.
4465 (sighandler_setxid): Likewise.
4466 Reported by Suzuki K P <suzuki@in.ibm.com> .
4468 2006-04-07 Jakub Jelinek <jakub@redhat.com>
4470 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4472 2006-04-06 Ulrich Drepper <drepper@redhat.com>
4474 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4475 fails [Coverity CID 105].
4477 2006-04-05 Ulrich Drepper <drepper@redhat.com>
4479 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4481 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4484 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4485 Define __lll_rel_instr using lwsync.
4487 2006-03-27 Ulrich Drepper <drepper@redhat.com>
4489 * allocatestack.c (allocate_stack): Always initialize robust_head.
4490 * descr.h: Define struct robust_list_head.
4491 (struct pthread): Use robust_list_head in robust mutex list definition.
4492 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4493 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4494 (__pthread_initialize_minimal_internal): Register robust_list with
4496 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4497 Declare __set_robust_list_avail.
4498 * pthread_create.c (start_thread): Register robust_list of new thread.
4499 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4501 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4502 number of users, it's unreliable.
4503 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4504 set_robust_list syscall is available.
4505 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4506 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4507 Set robust_head.list_op_pending before trying to lock a robust mutex.
4508 * pthread_mutex_timedlock.c: Likewise.
4509 * pthread_mutex_trylock.c: Likewise.
4510 * pthread_mutex_unlock.c: Likewise for unlocking.
4511 * Makefile (tests): Add tst-robust8.
4512 * tst-robust8.c: New file.
4514 2006-03-08 Andreas Schwab <schwab@suse.de>
4516 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4517 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4519 2006-03-05 Roland McGrath <roland@redhat.com>
4521 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4522 and $config_os doesn't match *linux*.
4524 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
4526 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4527 Use __syscall_error.
4528 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4529 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4530 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4531 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4532 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4533 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4535 2006-03-02 Ulrich Drepper <drepper@redhat.com>
4537 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4539 2006-03-01 Ulrich Drepper <drepper@redhat.com>
4541 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4542 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4544 (__lll_robust_timedlock_wait): Likewise.
4545 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4546 (__lll_robust_lock_wait): Likewise.
4547 (__lll_robust_timedlock_wait): Likewise.
4548 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4549 (__lll_robust_lock_wait): Likewise.
4550 (__lll_robust_timedlock_wait): Likewise.
4552 2006-03-01 Jakub Jelinek <jakub@redhat.com>
4554 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4555 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4556 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4557 lll_robust_mutex_unlock): Define.
4558 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4560 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4562 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4563 instead of <clone.S>.
4565 2006-02-27 Jakub Jelinek <jakub@redhat.com>
4567 * Makefile (libpthread-routines): Add
4568 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4569 and pthread_mutex_[sg]etprioceiling.
4570 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4571 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4572 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4573 pthread_mutex_setprioceiling.
4574 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4575 PTHREAD_PRIO_PROTECT): New enum values.
4576 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4577 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4578 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4580 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4581 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4582 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4584 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4585 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4586 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4587 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4588 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4589 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4590 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4592 * pthread_mutex_getprioceiling.c: New file.
4593 * pthread_mutex_setprioceiling.c: New file.
4594 * pthread_mutexattr_getprioceiling.c: New file.
4595 * pthread_mutexattr_setprioceiling.c: New file.
4596 * pthread_mutexattr_getprotocol.c: New file.
4597 * pthread_mutexattr_setprotocol.c: New file.
4599 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4601 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4603 2006-02-27 Roland McGrath <roland@redhat.com>
4605 * sysdeps/pthread/Subdirs: List nptl here too.
4606 * configure (libc_add_on_canonical): New variable.
4608 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4610 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4611 self to get main source tree's file.
4612 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4613 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4614 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4615 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4616 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4617 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4618 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4619 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4620 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4621 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4622 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4623 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4624 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4626 * Makefile: Use $(sysdirs) in vpath directive.
4628 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4629 (CPPFLAGS-timer_routines.c): Likewise.
4631 * Makeconfig (includes): Variable removed.
4633 2006-02-26 Roland McGrath <roland@redhat.com>
4635 * sysdeps/generic/pt-raise.c: Moved to ...
4636 * pt-raise.c: ... here.
4637 * sysdeps/generic/lowlevellock.h: Moved to ...
4638 * lowlevellock.h: ... here.
4640 2006-02-23 Roland McGrath <roland@redhat.com>
4642 * descr.h (struct pthread): Add final member `end_padding'.
4643 (PTHREAD_STRUCT_END_PADDING): Use it.
4645 2006-02-20 Roland McGrath <roland@redhat.com>
4647 * sysdeps/mips: Directory removed, saved in ports repository.
4648 * sysdeps/unix/sysv/linux/mips: Likewise.
4650 2006-02-18 Ulrich Drepper <drepper@redhat.com>
4652 * tst-robust1.c: Add second mutex to check that the mutex list is
4655 2006-02-17 Jakub Jelinek <jakub@redhat.com>
4657 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4658 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4659 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4660 lll_robust_mutex_unlock): New macros.
4661 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4662 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4663 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4664 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4665 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4667 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4669 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4671 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4673 2006-02-17 Ulrich Drepper <drepper@redhat.com>
4675 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4676 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4677 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4678 (lll_robust_mutex_unlock): Likewise.
4680 2006-02-13 Jakub Jelinek <jakub@redhat.com>
4682 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4683 Set robust_list.__next rather than robust_list.
4684 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4685 (__pthread_list_t): New typedef.
4686 (pthread_mutex_t): Replace __next and __prev fields with __list.
4687 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4688 (__pthread_list_t): New typedef.
4689 (pthread_mutex_t): Replace __next and __prev fields with __list.
4690 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4691 (__pthread_list_t, __pthread_slist_t): New typedefs.
4692 (pthread_mutex_t): Replace __next and __prev fields with __list.
4693 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4694 (__pthread_list_t, __pthread_slist_t): New typedefs.
4695 (pthread_mutex_t): Replace __next and __prev fields with __list.
4696 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4697 (__pthread_list_t, __pthread_slist_t): New typedefs.
4698 (pthread_mutex_t): Replace __next and __prev fields with __list.
4699 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4700 (__pthread_slist_t): New typedef.
4701 (pthread_mutex_t): Replace __next field with __list.
4703 2006-02-15 Ulrich Drepper <drepper@redhat.com>
4705 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4706 PTHREAD_MUTEX_OWNERDEAD.
4707 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4708 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4709 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4710 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4711 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4712 to PTHREAD_MUTEX_INCONSISTENT.
4713 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4714 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4715 * pthread_mutex_trylock.c: Likewise.
4716 * pthread_mutex_timedlock.c: Likewise.
4717 * pthread_mutex_unlock.c: Likewise.
4718 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4719 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4720 lowlevelrobustlock.sym.
4721 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4722 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4724 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4725 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4726 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4727 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4728 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4730 2006-02-12 Ulrich Drepper <drepper@redhat.com>
4732 * allocatestack.c (allocate_stack): Initialize robust_list.
4733 * init.c (__pthread_initialize_minimal_internal): Likewise.
4734 * descr.h (struct xid_command): Pretty printing.
4735 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4736 robust_list. Adjust macros.
4737 * pthread_create.c (start_thread): Adjust robust_list handling.
4738 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4739 but the owner for all robust mutex types.
4740 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4741 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
4742 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4743 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4745 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4746 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4748 2006-02-08 Jakub Jelinek <jakub@redhat.com>
4750 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4751 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4753 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4755 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4757 (lll_futex_timed_wait): Define.
4759 2006-01-19 Ulrich Drepper <drepper@redhat.com>
4761 * tst-cancel4.c: Test ppoll.
4763 2006-01-18 Andreas Jaeger <aj@suse.de>
4766 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4767 (pthread_mutex_t): Follow changes for other archs. Based on patch
4768 by Jim Gifford <patches@jg555.com>.
4770 2006-01-13 Richard Henderson <rth@redhat.com>
4772 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4774 2006-01-10 Roland McGrath <roland@redhat.com>
4776 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4777 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4778 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4779 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4780 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4781 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4782 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4783 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4784 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4785 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4787 2006-01-09 Roland McGrath <roland@redhat.com>
4789 * tst-initializers1-c89.c: New file.
4790 * tst-initializers1-c99.c: New file.
4791 * tst-initializers1-gnu89.c: New file.
4792 * tst-initializers1-gnu99.c: New file.
4793 * Makefile (tests): Add them.
4794 (CFLAGS-tst-initializers1-c89.c): New variable.
4795 (CFLAGS-tst-initializers1-c99.c): New variable.
4796 (CFLAGS-tst-initializers1-gnu89.c): New variable.
4797 (CFLAGS-tst-initializers1-gnu99.c): New variable.
4799 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4800 Use __extension__ on anonymous union definition.
4801 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4802 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4803 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4804 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4805 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4807 2006-01-08 Jakub Jelinek <jakub@redhat.com>
4809 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4810 Don't give the union a name because it changes the mangled name.
4811 Instead name the struct for __data.
4812 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4814 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4817 2006-01-09 Jakub Jelinek <jakub@redhat.com>
4819 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4820 stack bias to mc_ftp field.
4822 2006-01-07 Ulrich Drepper <drepper@redhat.com>
4824 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4825 being too clever and reloading the futex value where it shouldn't.
4827 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4829 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4832 2006-01-06 Jakub Jelinek <jakub@redhat.com>
4834 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4837 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4839 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4840 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4841 rename in tcbhead_t.
4843 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4844 Don't give the union a name because it changes the mangled name.
4845 Instead name the struct for __data.
4846 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4847 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4848 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4849 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4850 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4851 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4853 2006-01-05 Ulrich Drepper <drepper@redhat.com>
4855 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4857 (lll_futex_timed_wait): Define.
4858 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4859 * sysdeps/pthread/aio_misc.h: New file.
4861 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4863 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4865 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4867 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4868 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4869 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4871 2006-01-04 Ulrich Drepper <drepper@redhat.com>
4873 * tst-cancel24.cc: Use C headers instead of C++ headers.
4875 2006-01-03 Jakub Jelinek <jakub@redhat.com>
4877 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4878 sparc-linux configured glibc.
4879 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4880 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4881 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4882 atomic_compare_and_exchange_val_24_acq instead of
4883 atomic_compare_and_exchange_val_acq.
4884 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4885 instead of atomic_exchange_rel.
4886 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4887 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4889 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4891 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4892 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4893 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4894 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4895 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4896 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4898 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4900 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4901 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4902 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4904 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4906 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4908 2006-01-03 Ulrich Drepper <drepper@redhat.com>
4910 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4913 2006-01-02 Jakub Jelinek <jakub@redhat.com>
4915 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4916 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4917 THREAD_COPY_POINTER_GUARD): Define.
4918 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4919 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4921 2006-01-01 Ulrich Drepper <drepper@redhat.com>
4923 * version.c: Update copyright year.
4925 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4927 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4928 .eh_frame section, use cfi_* directives.
4929 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4931 2005-12-30 Ulrich Drepper <drepper@redhat.com>
4933 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4936 2005-12-29 Ulrich Drepper <drepper@redhat.com>
4938 * sysdeps/pthread/sigaction.c: Removed.
4939 * sigaction.c: New file.
4940 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4942 2005-12-28 Ulrich Drepper <drepper@redhat.com>
4944 * Makefile (tests): Add tst-signal7.
4945 * tst-signal7.c: New file.
4947 2005-12-27 Roland McGrath <roland@redhat.com>
4949 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4950 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4951 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4952 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4953 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4954 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4955 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4956 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4957 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4958 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4959 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4961 2005-12-27 Jakub Jelinek <jakub@redhat.com>
4963 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4964 and __prev field to pthread_mutex_t.
4965 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4966 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4967 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4968 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4969 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4972 2005-12-26 Ulrich Drepper <drepper@redhat.com>
4974 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4975 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4976 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4977 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4978 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4979 and PTHREAD_MUTEXATTR_FLAG_BITS.
4980 * descr.h (struct pthread): Add robust_list field and define
4981 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4982 * pthread_mutexattr_getrobust.c: New file.
4983 * pthread_mutexattr_setrobust.c: New file.
4984 * pthread_mutex_consistent.c: New file.
4985 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4986 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4987 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4988 Adjust pthread_mutex_t initializers.
4989 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4990 field to pthread_mutex_t.
4991 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4992 and __prev field to pthread_mutex_t.
4993 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4994 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4995 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4996 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4997 * pthread_mutexattr_gettype.c: Likewise.
4998 * pthread_mutexattr_setpshared.c: Likewise.
4999 * pthread_mutexattr_settype.c: Likewise.
5000 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5001 Initialize mutex kind according to robust flag.
5002 * pthread_mutex_lock.c: Implement local robust mutex.
5003 * pthread_mutex_timedlock.c: Likewise.
5004 * pthread_mutex_trylock.c: Likewise.
5005 * pthread_mutex_unlock.c: Likewise.
5006 * pthread_create.c (start_thread): Mark robust mutexes which remained
5008 * tst-robust1.c: New file.
5009 * tst-robust2.c: New file.
5010 * tst-robust3.c: New file.
5011 * tst-robust4.c: New file.
5012 * tst-robust5.c: New file.
5013 * tst-robust6.c: New file.
5014 * tst-robust7.c: New file.
5015 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5016 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5017 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5018 tst-robust5, tst-robust6, and tst-robust7.
5020 * tst-typesizes.c: New file.
5021 * Makefile (tests): Add tst-typesizes.
5023 * tst-once3.c: More debug output.
5025 2005-12-24 Ulrich Drepper <drepper@redhat.com>
5027 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5028 missing after last change.
5030 * version.c: Update copyright year.
5032 2005-12-23 Ulrich Drepper <drepper@redhat.com>
5034 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5035 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5036 * pthread_mutex_trylock.c: Likewise.
5037 * pthread_mutex_timedlock.c: Likewise.
5038 * pthread_mutex_unlock.c: Likewise.
5040 2005-12-22 Roland McGrath <roland@redhat.com>
5042 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5043 so that #include_next's search location is not reset to the -I..
5044 directory where <nptl/...> can be found.
5046 2005-12-22 Ulrich Drepper <drepper@redhat.com>
5049 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5050 Fix unwind info. Remove useless branch prediction prefix.
5051 * tst-cancel24.cc: New file.
5052 * Makefile: Add rules to build and run tst-cancel24.
5054 2005-12-21 Roland McGrath <roland@redhat.com>
5056 * libc-cancellation.c: Use <> rather than "" #includes.
5057 * pt-cleanup.c: Likewise.
5058 * pthread_create.c: Likewise.
5059 * pthread_join.c: Likewise.
5060 * pthread_timedjoin.c: Likewise.
5061 * pthread_tryjoin.c: Likewise.
5062 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5063 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5064 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5065 * unwind.c: Likewise.
5067 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5069 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5070 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5071 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5072 THREAD_COPY_POINTER_GUARD): Define.
5074 2005-12-19 Jakub Jelinek <jakub@redhat.com>
5076 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5078 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5079 THREAD_COPY_POINTER_GUARD): Define.
5080 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5081 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5082 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5083 THREAD_COPY_POINTER_GUARD): Define.
5084 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5085 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5086 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5087 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5088 Use PTR_DEMANGLE for B0 if defined.
5090 2005-12-17 Ulrich Drepper <drepper@redhat.com>
5092 * pthread_create.c (__pthread_create_2_1): Use
5093 THREAD_COPY_POINTER_GUARD if available.
5094 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5095 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5096 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5097 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5098 * sysdeps/x86_64/tls.h: Likewise.
5100 2005-12-15 Roland McGrath <roland@redhat.com>
5102 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5104 2005-12-13 Ulrich Drepper <drepper@redhat.com>
5106 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5108 * errno-loc.c: New file.
5110 2005-12-12 Roland McGrath <roland@redhat.com>
5112 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5113 adjustments before choosing stack size. Update minimum stack size
5114 calculation to match allocate_stack change.
5116 2005-12-12 Ulrich Drepper <drepper@redhat.com>
5118 * allocatestack.c (allocate_stack): Don't demand that there is an
5119 additional full page available on the stack beside guard, TLS, the
5122 2005-11-24 Ulrich Drepper <drepper@redhat.com>
5124 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5125 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5127 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5128 compiling 32-bit code we must define __cleanup_fct_attribute.
5130 005-11-24 Jakub Jelinek <jakub@redhat.com>
5133 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5134 __attribute__ instead of __attribute.
5135 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5136 (__cleanup_fct_attribute): Likewise.
5138 2005-11-17 Jakub Jelinek <jakub@redhat.com>
5140 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5141 a write barrier before writing libgcc_s_getcfa.
5143 2005-11-06 Ulrich Drepper <drepper@redhat.com>
5145 * sysdeps/unix/sysv/linux/configure: Removed.
5147 2005-11-05 Ulrich Drepper <drepper@redhat.com>
5149 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5150 optional init_array/fini_array support.
5152 2005-10-24 Roland McGrath <roland@redhat.com>
5154 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5155 versioned_symbol use.
5157 2005-10-16 Roland McGrath <roland@redhat.com>
5159 * init.c (__pthread_initialize_minimal_internal): Even when using a
5160 compile-time default stack size, apply the minimum that allocate_stack
5161 will require, and round up to page size.
5163 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5165 * Makefile ($(test-modules)): Remove static pattern rule.
5167 2005-10-14 Jakub Jelinek <jakub@redhat.com>
5168 Ulrich Drepper <drepper@redhat.com>
5170 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5171 alignment in callback function.
5172 * Makefile: Add rules to build and run tst-align3.
5173 * tst-align3.c: New file.
5175 2005-10-03 Jakub Jelinek <jakub@redhat.com>
5177 * allocatestack.c (setxid_signal_thread): Add
5178 INTERNAL_SYSCALL_DECL (err).
5180 2005-10-02 Jakub Jelinek <jakub@redhat.com>
5182 * allocatestack.c (setxid_signal_thread): Need to use
5183 atomic_compare_and_exchange_bool_acq.
5185 2005-10-01 Ulrich Drepper <drepper@redhat.com>
5186 Jakub Jelinek <jakub@redhat.com>
5188 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5190 (struct pthread): Move specific_used field to avoid padding.
5191 Add setxid_futex field.
5192 * init.c (sighandler_setxid): Reset setxid flag and release the
5194 * allocatestack.c (setxid_signal_thread): New function. Broken
5195 out of the bodies of the two loops in __nptl_setxid. For undetached
5196 threads check whether they are exiting and if yes, don't send a signal.
5197 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5198 * pthread_create.c (start_thread): For undetached threads, check
5199 whether setxid bit is set. If yes, wait until signal has been
5202 * allocatestack.c (STACK_VARIABLES): Initialize them.
5203 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5205 2004-09-02 Jakub Jelinek <jakub@redhat.com>
5207 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5208 waiters, awake all waiters on the associated mutex.
5210 2005-09-22 Roland McGrath <roland@redhat.com>
5212 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5213 ../sysdeps/x86_64/hp-timing.h).
5215 2005-08-29 Jakub Jelinek <jakub@redhat.com>
5217 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5218 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5219 (lll_futex_wake_unlock): Define.
5220 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5221 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5222 (lll_futex_wake_unlock): Define.
5223 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5224 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5225 (lll_futex_wake_unlock): Define.
5226 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5227 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5228 (lll_futex_wake_unlock): Define.
5229 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5230 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5231 (lll_futex_wake_unlock): Define.
5232 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5233 lll_futex_wake_unlock.
5234 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5235 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5236 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5237 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5238 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5239 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5241 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5243 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5244 Fix typo in register name.
5246 2005-08-23 Ulrich Drepper <drepper@redhat.com>
5248 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5249 Use __sigfillset. Document that sigfillset does the right thing wrt
5252 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5255 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5256 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5257 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5258 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5259 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5260 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5262 * Makefile (tests): Add tst-initializers1.
5263 (CFLAGS-tst-initializers1.c): Set.
5264 * tst-initializers1.c: New test.
5266 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5268 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5269 Make sure __flags are located at offset 48 from the start of the
5272 2005-07-02 Roland McGrath <roland@redhat.com>
5274 * Makeconfig: Comment fix.
5276 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5278 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5279 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5280 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5281 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5282 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5283 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5284 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5285 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5286 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5287 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5289 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5291 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5292 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5293 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5295 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5296 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5297 field. Put in sysinfo field unconditionally.
5298 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5299 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5300 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5301 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5303 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5304 * pthread_create.c (__pthread_create_2_1): Use
5305 THREAD_COPY_STACK_GUARD macro.
5306 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5308 * tst-stackguard1.c: New file.
5309 * tst-stackguard1-static.c: New file.
5311 2005-06-14 Alan Modra <amodra@bigpond.net.au>
5313 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5314 Invoke CGOTSETUP and CGOTRESTORE.
5315 (CGOTSETUP, CGOTRESTORE): Define.
5317 2005-05-29 Richard Henderson <rth@redhat.com>
5319 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5320 (tf_write, tf_writev): Use it.
5321 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5324 2005-05-23 Jakub Jelinek <jakub@redhat.com>
5326 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5327 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5328 __librt_*_asynccancel@local.
5330 2005-05-17 Alan Modra <amodra@bigpond.net.au>
5332 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5333 all occurrences of JUMPTARGET. Instead append @local to labels.
5335 2005-05-20 Jakub Jelinek <jakub@redhat.com>
5337 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5338 size/alignment of struct pthread rather than tcbhead_t.
5339 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5341 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5343 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5346 2005-05-19 Richard Henderson <rth@redhat.com>
5348 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5349 __sync_val_compare_and_swap, not explicit _si variant.
5350 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5352 2005-05-03 Ulrich Drepper <drepper@redhat.com>
5355 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5357 2005-05-03 Jakub Jelinek <jakub@redhat.com>
5359 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5360 .eh_frame section, use cfi_* directives.
5362 2005-04-27 Jakub Jelinek <jakub@redhat.com>
5364 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5367 2005-04-27 Ulrich Drepper <drepper@redhat.com>
5370 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5373 2005-04-27 Roland McGrath <roland@redhat.com>
5375 * Makefile (tests): Remove tst-clock2.
5377 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5378 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5379 translating to the kernel clockid_t for our own process/thread clock.
5381 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5383 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5385 * old_pthread_cond_init.c: Include <errno.h>.
5386 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5387 process shared or uses clock other than CLOCK_REALTIME.
5388 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5390 2005-04-13 David S. Miller <davem@davemloft.net>
5392 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5393 * sysdeps/sparc/sparc64/clone.S: New file.
5395 2005-04-05 Jakub Jelinek <jakub@redhat.com>
5398 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5399 __inline instead of inline.
5400 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5402 2005-03-31 Jakub Jelinek <jakub@redhat.com>
5404 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5405 functionally equivalent, but shorter instructions.
5406 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5407 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5408 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5410 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5411 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5412 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5413 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5414 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5415 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5416 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5418 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5419 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5420 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5421 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5422 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5424 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5426 * sysdeps/mips/Makefile: New file.
5427 * sysdeps/mips/nptl-sysdep.S: New file.
5428 * sysdeps/mips/tcb-offsets.sym: New file.
5429 * sysdeps/mips/pthread_spin_lock.S: New file.
5430 * sysdeps/mips/pthread_spin_trylock.S: New file.
5431 * sysdeps/mips/pthreaddef.h: New file.
5432 * sysdeps/mips/tls.h: New file.
5433 * sysdeps/mips/jmpbuf-unwind.h: New file.
5434 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5435 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5436 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5437 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5438 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5439 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5440 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5441 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5442 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5443 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5445 2005-03-23 Ulrich Drepper <drepper@redhat.com>
5448 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5451 2005-03-10 Jakub Jelinek <jakub@redhat.com>
5453 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5455 2005-02-25 Roland McGrath <roland@redhat.com>
5457 * alloca_cutoff.c: Correct license text.
5458 * tst-unload.c: Likewise.
5459 * sysdeps/pthread/allocalim.h: Likewise.
5460 * sysdeps/pthread/pt-initfini.c: Likewise.
5461 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5462 * sysdeps/pthread/bits/sigthread.h: Likewise.
5463 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5464 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5466 2005-02-16 Roland McGrath <roland@redhat.com>
5468 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5469 Use unsigned int * for ptr_nthreads.
5471 2005-02-14 Alan Modra <amodra@bigpond.net.au>
5474 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5477 2005-02-07 Richard Henderson <rth@redhat.com>
5480 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5483 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
5485 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5486 order of arguments in invocation of atomic_add_zero.
5488 2005-01-26 Jakub Jelinek <jakub@redhat.com>
5491 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5492 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5493 at least gotntpoff relocation and addition.
5494 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5496 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5498 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5501 2005-01-06 Ulrich Drepper <drepper@redhat.com>
5503 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5504 entry for static tls deallocation fix.
5505 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5506 also contains information whether the memory pointed to is static
5508 * sysdeps/i386/tls.h: Likewise.
5509 * sysdeps/ia64/tls.h: Likewise.
5510 * sysdeps/powerpc/tls.h: Likewise.
5511 * sysdeps/s390/tls.h: Likewise.
5512 * sysdeps/sh/tls.h: Likewise.
5513 * sysdeps/sparc/tls.h: Likewise.
5514 * sysdeps/x86_64/tls.h: Likewise.
5516 2004-12-27 Ulrich Drepper <drepper@redhat.com>
5518 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5520 2004-12-21 Jakub Jelinek <jakub@redhat.com>
5522 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5524 * Makefile (tests): Add tst-align2.
5525 * tst-align2.c: New test.
5526 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5527 -mpreferred-stack-boundary=4.
5529 2004-12-18 Roland McGrath <roland@redhat.com>
5531 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5532 New file removed withdrawn for the moment.
5534 2004-12-17 Richard Henderson <rth@redhat.com>
5536 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5537 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5539 2004-12-16 Ulrich Drepper <drepper@redhat.com>
5541 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5542 Increased PTHREAD_STACK_MIN.
5544 * tst-context1.c (stacks): Use bigger stack size.
5546 2004-12-16 Jakub Jelinek <jakub@redhat.com>
5548 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5549 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5551 2004-12-15 Jakub Jelinek <jakub@redhat.com>
5553 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5554 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5555 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5557 2004-12-15 Ulrich Drepper <drepper@redhat.com>
5559 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5561 2004-12-14 Ulrich Drepper <drepper@redhat.com>
5563 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5564 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5566 * tst-getpid1.c: If child crashes, report this first. Print which
5569 2004-12-09 Ulrich Drepper <drepper@redhat.com>
5571 * init.c (__pthread_initialize_minimal_internal): Also unblock
5574 2004-12-01 Jakub Jelinek <jakub@redhat.com>
5576 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5577 _POSIX_THREAD_CPUTIME): Define to 0.
5578 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5579 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5580 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5581 __timer_signal_thread_tclk): Remove.
5582 (init_module): Remove their initialization.
5583 (thread_cleanup): Remove their cleanup assertions.
5584 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5585 __timer_signal_thread_tclk): Remove.
5586 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5587 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5588 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5590 2004-12-07 Jakub Jelinek <jakub@redhat.com>
5592 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5593 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5595 * Makefile (tests): Add tst-getpid2.
5596 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5597 (do_test): Use it. Use __clone2 instead of clone on ia64.
5598 * tst-getpid2.c: New test.
5600 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5602 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5604 2004-12-04 Ulrich Drepper <drepper@redhat.com>
5606 * Makefile (tests): Add tst-getpid1.
5607 * tst-getpid1.c: New file.
5608 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5609 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5611 2004-12-02 Roland McGrath <roland@redhat.com>
5613 * Makefile (libpthread-nonshared): Variable removed.
5614 ($(objpfx)libpthread_nonshared.a): Target removed.
5615 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5616 These are now handled by generic magic from
5617 libpthread-static-only-routines being set.
5619 2004-11-27 Ulrich Drepper <drepper@redhat.com>
5621 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5622 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5623 _POSIX_THREAD_PRIO_PROTECT): Define.
5624 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5625 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5626 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5628 2004-11-26 Jakub Jelinek <jakub@redhat.com>
5630 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5631 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5632 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5633 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5634 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5635 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5636 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5638 2004-11-24 Ulrich Drepper <drepper@redhat.com>
5640 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5642 * Makefile (libpthread-routines): Add pthread_setschedprio.
5643 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5644 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5645 * pthread_setschedprio.c: New file.
5647 2004-11-20 Jakub Jelinek <jakub@redhat.com>
5649 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5650 * pthread_cancel.c (pthread_create): Likewise.
5652 * Makefile (libpthread-routines): Add vars.
5653 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5654 * init.c (__default_stacksize, __is_smp): Remove.
5656 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5657 and define a wrapper macro.
5658 (PTHREAD_STATIC_FN_REQUIRE): Define.
5659 * allocatestack.c (__find_thread_by_id): Undefine.
5660 * pthread_create (__pthread_keys): Remove.
5661 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5662 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5663 PTHREAD_STATIC_FN_REQUIRE.
5665 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5667 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5668 parameter to REGISTER macro.
5670 2004-11-17 Roland McGrath <roland@redhat.com>
5672 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5673 Make sure SIGCANCEL is blocked as well.
5675 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5677 * sysdeps/pthread/setxid.h: New file.
5678 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5679 (struct xid_command): Add forward decl.
5680 (struct pthread_functions): Change return type of __nptl_setxid hook
5682 * pthreadP.h (__nptl_setxid): Change return type to int.
5683 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5684 calling thread, return its return value and set errno on failure.
5685 * descr.h (struct xid_command): Change id type to long array.
5687 * Makefile: Add rules to build and test tst-setuid1 and
5689 * tst-setuid1.c: New test.
5690 * tst-setuid1-static.c: New test.
5692 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5694 * Makefile (tests): Add tst-exit3.
5695 * tst-exit3.c: New test.
5697 2004-11-09 Ulrich Drepper <drepper@redhat.com>
5699 * Makefile (tests): Add tst-exit2.
5700 * tst-exit2.c: New file.
5702 2004-11-09 Roland McGrath <roland@redhat.com>
5705 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5706 here, before calling clone.
5707 * pthread_create.c (start_thread): Don't do it here.
5709 2004-11-02 Jakub Jelinek <jakub@redhat.com>
5711 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5713 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5715 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5716 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5719 2004-10-28 Jakub Jelinek <jakub@redhat.com>
5721 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5722 if sched_priority is not between minprio and maxprio.
5724 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5726 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5727 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5729 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5730 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5732 2004-10-24 Ulrich Drepper <drepper@redhat.com>
5734 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5735 not-cancelable I/O functions.
5737 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5739 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5740 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5741 make sure 2 is stored in the futex and we looked at the old value.
5742 Fix a few other problems to return the correct value.
5744 2004-10-14 Richard Henderson <rth@redhat.com>
5746 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5749 2004-10-06 Jakub Jelinek <jakub@redhat.com>
5751 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5752 of pthread-functions.h and pthreaddef.h.
5753 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5755 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5756 Change __data.__nwaiters from int to unsigned int.
5758 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5759 sysconf (_SC_THREAD_CPUTIME) returns negative value.
5761 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5764 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5765 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5767 2004-10-06 Ulrich Drepper <drepper@redhat.com>
5769 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
5770 test fails, remove message queue.
5771 (tf_msgsnd): Likewise.
5773 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5775 * tst-clock1.c: Change #ifdef to #if defined.
5776 * tst-clock2.c: Likewise.
5777 * tst-cond11.c: Likewise.
5779 * sysdeps/pthread/timer_create.c (timer_create): Use
5780 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5781 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5784 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5786 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5787 _POSIX_THREAD_CPUTIME): Define to 0.
5789 2004-10-04 Ulrich Drepper <drepper@redhat.com>
5791 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5792 and _POSIX_THREAD_CPUTIME to zero.
5793 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5794 * tst-barrier2.c: Fix testing for POSIX feature.
5795 * tst-clock1.c: Likewise.
5796 * tst-clock2.c: Likewise.
5797 * tst-cond11.c: Likewise.
5798 * tst-cond4.c: Likewise.
5799 * tst-cond6.c: Likewise.
5800 * tst-flock2.c: Likewise.
5801 * tst-mutex4.c: Likewise.
5802 * tst-mutex9.c: Likewise.
5803 * tst-rwlock12.c: Likewise.
5804 * tst-rwlock4.c: Likewise.
5805 * tst-signal1.c: Likewise.
5806 * tst-spin2.c: Likewise.
5807 * sysdeps/pthread/posix-timer.h: Likewise.
5808 * sysdeps/pthread/timer_create.c: Likewise.
5809 * sysdeps/pthread/timer_routines.c: Likewise.
5811 2004-10-01 Ulrich Drepper <drepper@redhat.com>
5813 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5814 (__lll_mutex_timedlock_wait): Address futex correctly.
5816 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5817 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5818 make sure 2 is stored in the futex and we looked at the old value.
5819 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5820 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5821 which might very well made the code not working at all before.
5824 2004-09-28 Ulrich Drepper <drepper@redhat.com>
5826 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5827 allow SIGSETXID to be sent.
5828 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5829 for SIGSETXID to be defined.
5830 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5831 SIGSETXID cannot be blocked.
5833 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5834 Add __extension__ to long long types.
5835 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5836 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5837 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5838 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5839 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5840 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5841 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5843 2004-09-25 Ulrich Drepper <drepper@redhat.com>
5845 * descr.h (struct pthread): Add stopped_start field.
5846 * sysdeps/pthread/createthread.c (create_thread): Set
5847 start_stopped flag in descriptor for new thread appropriately.
5848 * pthread_create.c (start_thread): Only take lock to be stopped on
5849 startup if stopped_start flag says so.
5851 2004-09-24 Ulrich Drepper <drepper@redhat.com>
5853 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5854 is created detached and if yes, do not try to free the stack in case
5855 the thread creation failed.
5856 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5857 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5858 case there has been no error. [BZ #405]
5860 * pthread_create.c (start_thread): Don't wait for scheduler data
5861 etc to be set at the beginning of the function. The cancellation
5862 infrastructure must have been set up. And enable async
5863 cancellation before potentially going to sleep. [BZ #401]
5865 2004-09-20 Ulrich Drepper <drepper@redhat.com>
5867 * Versions: Remove exports for pthread_set*id_np functions.
5868 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5870 * Makefile: Don't build pthread_set*id code for now.
5872 2004-09-19 Ulrich Drepper <drepper@redhat.com>
5874 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5876 * allocatestack.c (__nptl_setxid): New function.
5877 * descr.h (struct xid_command): Define type.
5878 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5879 (sighandler_setxid): New function.
5880 (__pthread_initialize_minimal): Register sighandler_setxid for
5882 * pt-allocrtsig.c: Update comment.
5883 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
5884 Declare __nptl_setxid.
5885 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5886 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5887 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5888 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5889 and pthread_setresuid_np.
5890 * pthread_setgid_np.c: New file.
5891 * pthread_setuid_np.c: New file.
5892 * pthread_setegid_np.c: New file.
5893 * pthread_seteuid_np.c: New file.
5894 * pthread_setregid_np.c: New file.
5895 * pthread_setreuid_np.c: New file.
5896 * pthread_setresgid_np.c: New file.
5897 * pthread_setresuid_np.c: New file.
5898 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5899 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5900 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5901 and pthread_setresuid_np.
5902 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5903 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5904 pthread_setregid, and pthread_setresgid.
5906 2004-09-18 Ulrich Drepper <drepper@redhat.com>
5908 * allocatestack.c (allocate_stack): Return EAGAIN instead of
5909 ENOMEM when out of memory.
5911 2004-09-10 Roland McGrath <roland@redhat.com>
5914 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5915 code, since we don't try to use the broken CLONE_STOPPED any more.
5916 * pthread_create.c (start_thread): Likewise.
5918 2004-09-15 Richard Henderson <rth@redhat.com>
5920 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5922 2004-09-01 David Mosberger <davidm@hpl.hp.com>
5924 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5925 (__libc_unwind_longjmp): Delete macro and declare as function.
5926 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5927 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5929 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5930 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5931 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5933 2004-09-12 Ulrich Drepper <drepper@redhat.com>
5935 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5937 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5938 types also for __USE_XOPEN2K.
5939 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5940 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5941 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5942 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5943 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5944 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5945 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5948 2004-09-08 Ulrich Drepper <drepper@redhat.com>
5950 * sysdeps/pthread/pthread.h
5951 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5952 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5953 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5954 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5957 2004-09-07 Ulrich Drepper <drepper@redhat.com>
5959 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5960 PSEUDO to be used with . prefix.
5962 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5963 Use atomic_increment instead of atomic_exchange_and_add.
5964 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5966 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5968 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5971 * allocatestack.c (allocate_stack): Use atomic_increment_val
5972 instead of atomic_exchange_and_add.
5973 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5974 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5976 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5979 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5980 the initialization function might throw.
5982 2005-09-05 Richard Henderson <rth@redhat.com>
5984 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5985 Move definition inside libpthread, libc, librt check. Provide
5986 definition for rtld.
5988 2004-09-02 Ulrich Drepper <drepper@redhat.com>
5990 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5991 * sysdeps/i386/jmpbuf-unwind.h: Likewise
5992 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5993 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5994 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5995 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5996 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5997 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6000 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6001 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6002 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6004 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6005 Decrement __nwaiters. If pthread_cond_destroy has been called and
6006 this is the last waiter, signal pthread_cond_destroy caller and
6007 avoid using the pthread_cond_t structure after unlock.
6008 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6009 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6010 Read clock type from the least significant bits of __nwaiters instead
6012 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6013 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6015 2004-08-31 Jakub Jelinek <jakub@redhat.com>
6018 * Makefile (tests): Add tst-cond20 and tst-cond21.
6019 * tst-cond20.c: New test.
6020 * tst-cond21.c: New test.
6021 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6022 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6024 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6026 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6027 (pthread_cond_t): Likewise.
6028 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6030 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6032 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6034 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6035 (cond_nwaiters): New.
6037 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6038 if there are waiters not signalled yet.
6039 Wait until all already signalled waiters wake up.
6040 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6041 __nwaiters. If pthread_cond_destroy has been called and this is the
6042 last waiter, signal pthread_cond_destroy caller and avoid using
6043 the pthread_cond_t structure after unlock.
6044 (__pthread_cond_wait): Increment __nwaiters in the beginning,
6045 decrement it when leaving. If pthread_cond_destroy has been called
6046 and this is the last waiter, signal pthread_cond_destroy caller.
6047 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6048 Likewise. Read clock type from the least significant bits of
6049 __nwaiters instead of __clock.
6050 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6051 whether clock ID can be encoded in COND_CLOCK_BITS bits.
6052 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6053 clock type just from the last COND_CLOCK_BITS bits of value.
6054 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6055 instead of __clock, just from second bit of condattr's value.
6057 2004-08-30 Jakub Jelinek <jakub@redhat.com>
6059 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6060 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
6062 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6064 2004-08-15 Roland McGrath <roland@frob.com>
6066 * pthread_atfork.c: Update copyright terms including special exception
6067 for these trivial files, which are statically linked into executables
6068 that use dynamic linking for the significant library code.
6070 2004-08-09 Jakub Jelinek <jakub@redhat.com>
6072 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6073 pthread_rwlock_rdlock.
6074 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6075 Decrease __nr_readers_queued after reacquiring lock.
6076 * sysdeps/pthread/pthread_rwlock_timedrdlock
6077 (pthread_rwlock_timedrdlock): Likewise.
6078 Reported by Bob Cook <bobcook47@hotmail.com>.
6080 2004-08-11 Jakub Jelinek <jakub@redhat.com>
6082 * tst-rwlock14.c (tf): Read main thread handle from *ARG
6083 before pthread_barrier_wait.
6085 2004-08-07 Ulrich Drepper <drepper@redhat.com>
6087 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6088 Remove unnecessary exception handling data.
6090 2004-07-23 Jakub Jelinek <jakub@redhat.com>
6093 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6094 instead of clockid_t.
6096 2004-07-21 Roland McGrath <roland@redhat.com>
6098 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6100 2004-07-19 Roland McGrath <roland@redhat.com>
6102 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6104 2004-07-02 Roland McGrath <roland@redhat.com>
6106 * configure: Don't exit.
6108 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6110 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6111 (__pthread_cond_timedwait): Check for invalid nanosecond in
6114 2004-07-07 Ulrich Drepper <drepper@redhat.com>
6116 * Makefile: Add rules to build and run tst-fini1.
6117 * tst-fini1.c: New file.
6118 * tst-fini1mod.c: New file.
6120 2004-07-05 Ulrich Drepper <drepper@redhat.com>
6122 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6123 if no cancellation support is needed.
6124 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6125 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6126 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6127 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6128 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6129 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6130 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6131 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6132 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6134 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6135 only if not already defined.
6137 2004-07-05 Jakub Jelinek <jakub@redhat.com>
6139 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6140 constraint "m" instead of "0" for futex.
6142 * shlib-versions: Add powerpc64-.*-linux.*.
6144 2004-07-04 Jakub Jelinek <jakub@redhat.com>
6146 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6147 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6149 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6150 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6153 2004-06-29 Roland McGrath <roland@redhat.com>
6155 * Banner: NPTL no longer has its own version number.
6156 * Makefile (nptl-version): Variable removed.
6157 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6158 using $(version), the glibc version number.
6160 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6162 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6163 Fix branch offset for a PLT entry.
6164 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6166 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6168 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6170 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6173 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6175 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6178 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6180 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6181 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6183 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6184 (pthread_rwlock_timedrdlock): Likewise.
6186 2004-06-22 Jakub Jelinek <jakub@redhat.com>
6188 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6189 Set __r7 to val, not mutex.
6191 2004-06-27 Ulrich Drepper <drepper@redhat.com>
6193 * Makefile: Add rules to build tst-rwlock14.
6194 * tst-rwlock14.c: New file.
6196 2004-06-24 Boris Hu <boris.hu@intel.com>
6198 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6200 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6202 2004-06-19 Andreas Jaeger <aj@suse.de>
6204 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6205 assembler in last patch.
6207 2004-06-17 Ulrich Drepper <drepper@redhat.com>
6209 * sysdeps/pthread/pthread_cond_timedwait.c
6210 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6211 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6212 (__pthread_cond_timedwait): Check for invalid nanosecond in
6214 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6215 * tst-cond19.c: New file.
6216 * Makefile: Add rules to build and run tst-cond19.
6218 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6220 * tst-context1.c (GUARD_PATTERN): Defined.
6221 (tst_context_t): Define struct containing ucontext_t & guard words.
6222 (ctx): Declare as an array of tst_context_t.
6223 (fct): Verify uc_link & guard words are still valid.
6224 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6226 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6228 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6229 Add __data.__futex field, reshuffle __data.__clock.
6230 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6231 (__pthread_cond_signal): Increment __futex at the same time as
6232 __wakeup_seq or __total_seq. Pass address of __futex instead of
6233 address of low 32-bits of __wakeup_seq to futex syscall.
6234 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6235 (__pthread_cond_wait): Likewise. Pass __futex value from before
6236 releasing internal lock to FUTEX_WAIT.
6237 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6238 (__pthread_cond_timedwait): Likewise.
6239 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6240 (FUTEX_CMP_REQUEUE): Define.
6241 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6242 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6243 Pass __futex value from before the unlock and __futex address instead
6244 of address of low 32-bits of __wakeup_seq to futex syscall.
6245 Fallback to FUTEX_WAKE all on any errors.
6247 2004-06-08 Jakub Jelinek <jakub@redhat.com>
6249 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6251 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6252 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6253 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6254 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6255 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6257 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6259 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6260 Add memory clobber to inline assembly.
6261 (__lll_mutex_trylock): Likewise.
6262 (__lll_mutex_cond_trylock): Likewise.
6264 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6266 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6267 Pass val argument as 6th system call argument in %r7.
6269 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6271 * Makefile (tests): Add tst-cond16.
6272 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6273 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6274 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6275 Add __data.__futex field, reshuffle __data.__clock.
6276 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6277 (__pthread_cond_signal): Increment __futex at the same time as
6278 __wakeup_seq or __total_seq. Pass address of __futex instead of
6279 address of low 32-bits of __wakeup_seq to futex syscall.
6280 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6281 (__pthread_cond_wait): Likewise. Pass __futex value from before
6282 releasing internal lock to FUTEX_WAIT.
6283 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6284 (__pthread_cond_timedwait): Likewise.
6285 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6286 (FUTEX_CMP_REQUEUE): Define.
6287 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6288 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6289 Pass __futex value from before the unlock and __futex address instead
6290 of address of low 32-bits of __wakeup_seq to futex syscall.
6291 Fallback to FUTEX_WAKE all on any errors.
6292 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6294 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6295 internally. Return non-zero if error, zero if success.
6296 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6297 Add __data.__futex field, reshuffle __data.__clock.
6298 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6300 (lll_futex_requeue): Add val argument, return 1 unconditionally
6302 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6303 Add __data.__futex field, reshuffle __data.__clock.
6304 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6306 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6307 internally. Return non-zero if error, zero if success.
6308 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6309 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6310 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6312 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6313 internally. Return non-zero if error, zero if success.
6314 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6315 Add __data.__futex field, reshuffle __data.__clock.
6316 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6318 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6319 internally. Return non-zero if error, zero if success.
6320 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6321 Add __data.__futex field, reshuffle __data.__clock.
6322 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6323 Add __data.__futex field, reshuffle __data.__clock.
6324 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6325 Increment __futex at the same time as __wakeup_seq or __total_seq.
6326 Pass address of __futex instead of address of low 32-bits of
6327 __wakeup_seq to futex syscall.
6328 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6329 Pass __futex value from before releasing internal lock
6331 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6332 Likewise. Avoid unnecessary shadowing of variables.
6333 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6334 Set __futex to 2 * __total_seq. Pass __futex value from before the
6335 unlock and __futex address instead of address of low 32-bits of
6336 __wakeup_seq to futex_requeue macro, adjust for new return value
6338 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6339 (__pthread_cond_signal): Increment __futex at the same time as
6340 __wakeup_seq or __total_seq. Pass address of __futex instead of
6341 address of low 32-bits of __wakeup_seq to futex syscall.
6342 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6343 (__pthread_cond_wait): Likewise. Pass __futex value from before
6344 releasing internal lock to FUTEX_WAIT.
6345 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6346 (__pthread_cond_timedwait): Likewise.
6347 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6348 (FUTEX_CMP_REQUEUE): Define.
6349 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6350 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6351 Pass __futex value from before the unlock and __futex address instead
6352 of address of low 32-bits of __wakeup_seq to futex syscall.
6353 Fallback to FUTEX_WAKE all on any errors.
6355 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6357 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6358 Add nop to align the end of critical section.
6359 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6361 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6363 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6364 Add __broadcast_seq field.
6365 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6366 all waiters as woken with woken_seq and bump broadcast counter.
6367 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6368 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6369 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6370 Comment typo fixes. Avoid returning -ETIMEDOUT.
6372 2004-06-01 Ulrich Drepper <drepper@redhat.com>
6374 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6375 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6376 Reported by Kaz Kojima.
6378 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6380 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6382 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6384 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6385 __broadcast_seq with bc_seq after acquiring internal lock instead of
6388 2004-05-18 Jakub Jelinek <jakub@redhat.com>
6390 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6392 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6393 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6394 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6395 (pthread_cond_t): Add __data.__broadcast_seq field.
6396 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6397 (FRAME_SIZE): Define.
6398 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6400 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6402 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6404 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6405 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6408 2004-05-18 Ulrich Drepper <drepper@redhat.com>
6410 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6411 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6412 Add __broadcast_seq field.
6413 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6414 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6415 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6416 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6417 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6418 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6419 all waiters as woken with woken_seq and bump broadcast counter.
6420 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6421 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6422 __broadcast_seq field.
6423 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6424 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6425 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6426 * pthread_cond_init.c: Initialize __broadcast_seq field.
6427 * Makefile (tests): Add tst-cond17 and tst-cond18.
6428 Add .NOTPARALLEL goal.
6429 * tst-cond16.c: New file. From Jakub.
6430 * tst-cond17.c: New file. From Jakub.
6431 * tst-cond18.c: New file. From Jakub.
6433 2004-05-16 Ulrich Drepper <drepper@redhat.com>
6435 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6438 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6439 Parametrize frame size. Correct some unwind info.
6440 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6442 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6444 * tst-stack3.c: Note testing functionality beyond POSIX.
6446 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6448 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6449 Change conditional from ifdef to if.
6451 2004-04-23 Jakub Jelinek <jakub@redhat.com>
6453 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6454 SYSDEP_CANCEL_ERROR): Define.
6457 2004-05-01 Jakub Jelinek <jakub@redhat.com>
6459 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6461 2004-04-20 Jakub Jelinek <jakub@redhat.com>
6463 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6465 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6467 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6468 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6469 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6470 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6472 2004-04-19 Ulrich Drepper <drepper@redhat.com>
6474 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6475 thread has all signals blocked.
6477 2004-04-18 Andreas Jaeger <aj@suse.de>
6479 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6480 (SEM_VALUE_MAX): Add missing brace.
6482 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6484 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6486 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6487 * sysdeps/pthread/tst-mqueue8x.c: New test.
6488 * tst-cancel4.c: Update comment about message queues.
6490 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6491 return it_value { 0, 0 }.
6492 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6494 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6495 assertion for SIGEV_NONE.
6496 (thread_attr_compare): Compare all attributes, not just a partial
6499 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6501 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6503 2004-04-17 Ulrich Drepper <drepper@redhat.com>
6505 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6506 Just use a plain number.
6507 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6508 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6509 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6510 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6511 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6512 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6513 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6515 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6517 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6519 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6521 2004-04-15 Jakub Jelinek <jakub@redhat.com>
6523 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6524 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6525 of calling sigwaitinfo.
6527 2004-04-16 Ulrich Drepper <drepper@redhat.com>
6529 * allocatestack.c (allocate_stack): Set reported_guardsize
6531 * pthread_getattr_np.c (pthread_getattr_np): Use
6532 reported_guardsize instead of guardsize.
6533 * descr.h (struct pthread): Add reported_guardsize field.
6535 2004-04-13 Jakub Jelinek <jakub@redhat.com>
6537 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6539 2004-04-12 Ulrich Drepper <drepper@redhat.com>
6541 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6543 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6545 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6546 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6547 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6548 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6549 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6551 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6552 (_POSIX_MESSAGE_PASSING): Define.
6553 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6554 (_POSIX_MESSAGE_PASSING): Define.
6555 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6556 (_POSIX_MESSAGE_PASSING): Define.
6558 2004-04-04 Ulrich Drepper <drepper@redhat.com>
6560 * tst-context1.c (fct): Check whether correct stack is used.
6562 2004-04-03 Ulrich Drepper <drepper@redhat.com>
6564 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6565 matching constraints for asm mem parameters.
6567 * tst-clock2.c (tf): Don't define unless needed.
6569 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6571 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6574 2004-03-30 Ulrich Drepper <drepper@redhat.com>
6576 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6577 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6578 * pthreadP.h: Declare __nptl_deallocate_tsd.
6579 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6582 * Makefile (tests): Add tst-tsd5.
6583 * tst-tsd5.c: New file.
6585 2004-03-29 Ulrich Drepper <drepper@redhat.com>
6587 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6588 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6589 is SHLIB_COMPAT check.
6590 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6591 (__pthread_attr_getaffinity_old): Likewise.
6592 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6593 (__pthread_getaffinity_old): Likewise.
6594 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6595 (__pthread_setaffinity_old): Likewise.
6597 2004-03-26 Ulrich Drepper <drepper@redhat.com>
6599 * allocatestack.c (_make_stacks_executable): Call
6600 _dl_make_stack_executable first.
6602 2004-03-24 Roland McGrath <roland@redhat.com>
6604 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6605 constraint instead of "0".
6607 2004-03-24 Ulrich Drepper <drepper@redhat.com>
6609 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6610 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6612 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6613 code to avoid warning.
6615 2004-03-24 Andreas Jaeger <aj@suse.de>
6617 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6618 (__pthread_attr_setaffinity_old): Remove const.
6620 2004-03-23 Ulrich Drepper <drepper@redhat.com>
6622 * sysdeps/unix/sysv/linux/smp.h: New file.
6623 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6624 * init.c: Define __is_smp.
6625 (__pthread_initialize_minimal_internal): Call is_smp_system to
6626 initialize __is_smp.
6627 * pthreadP.h: Declare __is_smp.
6628 Define MAX_ADAPTIVE_COUNT is necessary.
6629 * pthread_mutex_init.c: Add comment regarding __spins field.
6630 * pthread_mutex_lock.c: Implement adaptive mutex type.
6631 * pthread_mutex_timedlock.c: Likewise.
6632 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6633 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6635 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6636 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6637 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6638 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6639 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6640 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6641 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6642 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6643 lll_mutex_cond_trylock.
6644 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6645 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6646 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6647 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6648 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6649 Define BUSY_WAIT_NOP.
6650 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6651 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6653 * tst-mutex5.c: Add support for testing adaptive mutexes.
6654 * tst-mutex7.c: Likewise.
6655 * tst-mutex5a.c: New file.
6656 * tst-mutex7a.c: New file.
6657 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6659 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6660 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6661 vgettimeofday call might destroy the content.
6663 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6666 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6667 No need to restrict type of ret. Make it int. Add comment.
6669 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6670 Remove unnecessary setne instruction.
6672 2004-03-22 Jakub Jelinek <jakub@redhat.com>
6674 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6675 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6676 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6677 If realloc fails, break out of the loop.
6679 2004-03-20 Andreas Jaeger <aj@suse.de>
6681 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6682 (__pthread_setaffinity_old): Fix interface.
6683 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6684 (__pthread_getaffinity_old): Likewise.
6686 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6687 (__pthread_setaffinity_new): Remove duplicate declaration.
6689 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6691 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6692 the return value to a safe register.
6693 (CDISABLE): Set the function argument correctly.
6695 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6697 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6698 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6699 Rewrite so that only one locked memory operation per round is needed.
6700 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6701 (pthread_barrier_wait): After wakeup, release lock only when the
6702 last thread stopped using the barrier object.
6703 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6704 (__pthread_cond_wait): Don't store mutex address if the current
6705 value is ~0l. Add correct cleanup support and unwind info.
6706 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6707 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6708 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6709 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6710 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6711 Add correct cleanup support and unwind info.
6712 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6713 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6714 information for syscall wrappers.
6716 2004-03-18 Ulrich Drepper <drepper@redhat.com>
6718 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6719 cpusetsize field, remove next.
6720 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6721 parameter for size of the CPU set.
6722 (pthread_setaffinity_np): Likewise.
6723 (pthread_attr_getaffinity_np): Likewise.
6724 (pthread_attr_setaffinity_np): Likewise.
6725 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6726 interface change, keep compatibility code.
6727 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6728 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6729 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6730 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6731 __pthread_getaffinity_np.
6732 * Versions: Add version for changed interfaces.
6733 * tst-attr3.c: Adjust test for interface change.
6734 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6735 increasing buffer sizes.
6736 * pthread_attr_destroy.c: Remove unused list handling.
6737 * pthread_attr_init.c: Likewise.
6739 2004-03-17 Roland McGrath <roland@redhat.com>
6741 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6742 first argument to clock_getres so we ever enable kernel timers.
6744 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
6746 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6748 2004-03-12 Richard Henderson <rth@redhat.com>
6750 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6751 oldvalue from CENABLE to CDISABLE.
6753 2004-03-12 Ulrich Drepper <drepper@redhat.com>
6755 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6756 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6757 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6758 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6760 2004-03-11 Richard Henderson <rth@redhat.com>
6762 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6763 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6764 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6766 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6768 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6769 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6770 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6772 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6774 * forward.c (__pthread_cond_broadcast_2_0,
6775 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6776 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6777 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6779 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6781 * sysdeps/sh/tcb-offsets.sym: Add PID.
6782 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6783 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6785 2004-03-10 Ulrich Drepper <drepper@redhat.com>
6787 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6788 include <sysdep-cancel.h>, vfork is no cancellation point.
6789 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6790 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6791 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6793 2004-03-10 Jakub Jelinek <jakub@redhat.com>
6795 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6797 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6798 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6800 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6802 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6803 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6804 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6805 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6806 of DO_CALL_VIA_BREAK. Work around a gas problem.
6808 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6809 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6810 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6811 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6812 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6813 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6815 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6816 a local register for saving old PID. Negate PID in parent upon exit.
6818 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6820 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6821 before syscall, set to the old value in the parent afterwards.
6822 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6823 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6825 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6826 before syscall, set to the old value in the parent afterwards.
6827 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6828 * sysdeps/s390/tcb-offsets.sym: Add PID.
6830 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6831 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6832 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6833 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6834 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6835 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6837 2004-03-10 Andreas Schwab <schwab@suse.de>
6839 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6840 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6841 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6843 2004-03-09 Jakub Jelinek <jakub@redhat.com>
6845 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6846 * tst-cancel21.c (do_one_test): Likewise.
6847 Reported by Gordon Jin <gordon.jin@intel.com>.
6849 2004-02-09 Jakub Jelinek <jakub@redhat.com>
6851 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6852 if non-zero and set to INT_MIN if zero.
6853 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6854 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6855 (SAVE_PID, RESTORE_PID): Define.
6857 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6858 Use relative path to avoid including NPTL i386/vfork.S.
6859 (SAVE_PID, RESTORE_PID): Define.
6860 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6861 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6862 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6864 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6865 * tst-vfork1.c: New test.
6866 * tst-vfork2.c: New test.
6867 * tst-vfork1x.c: New test.
6868 * tst-vfork2x.c: New test.
6870 2004-03-08 Ulrich Drepper <drepper@redhat.com>
6872 * sysdeps/i386/tcb-offsets.sym: Add PID.
6873 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6874 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6875 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6877 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
6879 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6881 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
6883 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6886 2004-03-07 Ulrich Drepper <drepper@redhat.com>
6888 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6891 * tst-once4.c: Remove unnecessary macro definition.
6893 * tst-mutex7.c (do_test): Limit thread stack size.
6894 * tst-once2.c (do_test): Likewise.
6895 * tst-tls3.c (do_test): Likewise.
6896 * tst-tls1.c (do_test): Likewise.
6897 * tst-signal3.c (do_test): Likewise.
6898 * tst-kill6.c (do_test): Likewise.
6899 * tst-key4.c (do_test): Likewise.
6900 * tst-join4.c (do_test): Likewise.
6901 * tst-fork1.c (do_test): Likewise.
6902 * tst-context1.c (do_test): Likewise.
6903 * tst-cond2.c (do_test): Likewise.
6904 * tst-cond10.c (do_test): Likewise.
6905 * tst-clock2.c (do_test): Likewise.
6906 * tst-cancel10.c (do_test): Likewise.
6907 * tst-basic2.c (do_test): Likewise.
6908 * tst-barrier4.c (do_test): Likewise.
6910 2004-03-05 Ulrich Drepper <drepper@redhat.com>
6912 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6914 2004-03-01 Ulrich Drepper <drepper@redhat.com>
6916 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6917 (__pthread_cond_timedwait): Optimize wakeup test.
6918 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6919 (__pthread_cond_wait): Likewise.
6920 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6921 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6924 2004-02-29 Ulrich Drepper <drepper@redhat.com>
6926 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6927 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
6928 the atomic instruction needed.
6929 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6930 (__lll_mutex_lock_wait): Likewise.
6932 2004-02-28 Ulrich Drepper <drepper@redhat.com>
6934 * Makefile (tests): Add tst-cond14 and tst-cond15.
6935 * tst-cond14.c: New file.
6936 * tst-cond15.c: New file.
6938 2004-02-27 Ulrich Drepper <drepper@redhat.com>
6940 * sysdeps/pthread/createthread.c (create_thread): Remove use of
6941 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
6942 needs to be implemented differently to be useful.
6944 2004-02-26 Ulrich Drepper <drepper@redhat.com>
6946 * pthread_attr_setschedparam.c: Don't test priority against limits
6947 here. Set ATTR_FLAG_SCHED_SET flag.
6948 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6949 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6950 from parent thread to child. If attribute is used and scheduling
6951 parameters are not inherited, copy parameters from attribute or
6952 compute them. Check priority value.
6953 * pthread_getschedparam.c: If the parameters aren't known yet get
6954 them from the kernel.
6955 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6956 ATTR_FLAG_POLICY_SET flag for thread.
6957 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6958 and ATTR_FLAG_POLICY_SET.
6960 * sysdeps/pthread/createthread.c: Use tgkill if possible.
6962 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6963 fail if stack address hasn't been set. Just return 0.
6965 2004-02-25 Ulrich Drepper <drepper@redhat.com>
6967 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
6968 libpthread for the files in this list.
6969 (CFLAGS-tst-unload): Removed.
6970 * tst-unload.c (do_test): Don't use complete path for
6973 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6976 2004-02-22 Ulrich Drepper <drepper@redhat.com>
6978 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6979 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6980 operation per round is needed.
6981 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6982 (__lll_mutex_lock_wait): Likewise.
6984 2004-02-20 Ulrich Drepper <drepper@redhat.com>
6986 * tst-cancel9.c (cleanup): Don't print to stderr.
6988 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6990 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6992 2004-02-20 Jakub Jelinek <jakub@redhat.com>
6994 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6995 (__syscall_error_handler2): Call CDISABLE.
6996 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6997 (__syscall_error_handler2): Call CDISABLE.
6999 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7000 Release lock before the loop, don't reacquire it.
7002 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7004 2004-02-19 Andreas Schwab <schwab@suse.de>
7006 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7009 2004-02-18 Ulrich Drepper <drepper@redhat.com>
7011 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7012 (pthread_barrier_wait): After wakeup, release lock only when the
7013 last thread stopped using the barrier object.
7014 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7015 (pthread_barrier_wait): Likewise.
7016 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7018 * Makefile (tests): Add tst-barrier4.
7019 * tst-barrier4.c: New file.
7021 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7022 (__pthread_cond_timedwait): Perform timeout test while holding
7023 internal lock to prevent wakeup race.
7024 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7025 * sysdeps/pthread/pthread_cond_timedwait.c
7026 (__pthread_cond_timedwait): Likewise.
7027 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7028 (__pthread_cond_timedwait): Likewise.
7030 2004-02-18 Jakub Jelinek <jakub@redhat.com>
7032 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7033 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7034 * Makefile (tests): Add tst-rwlock13.
7035 * tst-rwlock13.c: New test.
7037 2004-02-16 Ulrich Drepper <drepper@redhat.com>
7039 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7040 (__condvar_tw_cleanup): Little optimization.
7041 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7043 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
7045 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7046 libpthread as "lib" parameter to SHLIB_COMPAT.
7047 (__novmx_siglongjmp): Fix typo in function name.
7048 (__novmx_longjmp): Fix typo in function name.
7050 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7052 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7055 * sysdeps/generic/pt-longjmp.c: Moved to...
7056 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
7058 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
7060 * Makefile (libpthread-routines): Add pt-cleanup.
7061 * pt-longjmp.c: Removed.
7062 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7063 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7064 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7065 Version longjmp, siglongjmp for GLIBC_2.3.4.
7066 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7068 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7070 * sysdeps/pthread/pthread_cond_timedwait.c
7071 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
7072 Reuse code. Add __builtin_expects.
7074 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7075 (__pthread_cond_timedwait): Get internal lock in case timeout has
7076 passed before the futex syscall.
7077 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7079 2004-01-20 Ulrich Drepper <drepper@redhat.com>
7081 * allocatestack.c: Pretty printing.
7083 * sysdeps/pthread/createthread.c (create_thread): Don't add
7084 CLONE_DETACHED bit if it is not necessary.
7086 2004-01-16 Ulrich Drepper <drepper@redhat.com>
7088 * pthread_getattr_np.c: Include ldsodefs.h.
7090 2004-01-16 Richard Henderson <rth@redhat.com>
7092 * allocatestack.c: Don't declare __libc_stack_end.
7093 * init.c (__pthread_initialize_minimal_internal): Likewise.
7094 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7096 2004-01-15 Richard Henderson <rth@redhat.com>
7098 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7099 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7100 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7101 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7102 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7103 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7104 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7105 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7107 2004-01-14 Ulrich Drepper <drepper@redhat.com>
7109 * init.c (pthread_functions): Make array const.
7111 2004-01-13 Ulrich Drepper <drepper@redhat.com>
7113 * allocatestack.c (__make_stacks_executable): Change interface.
7114 Check parameters. Pass parameter on to libc counterpart.
7115 * pthreadP.h: Change declaration.
7117 2004-01-13 Richard Henderson <rth@redhat.com>
7119 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7121 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7124 * sysdeps/alpha/Makefile: New file.
7125 * sysdeps/alpha/tcb-offsets.sym: New file.
7126 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7127 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7129 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7132 2004-01-08 Jakub Jelinek <jakub@redhat.com>
7134 * Makefile (tests): Add tst-backtrace1.
7135 * tst-backtrace1.c: New test.
7137 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7139 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7140 register as second parameter to the REGISTER macro.
7141 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7142 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7143 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7144 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7145 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7146 of thread register as second parameter to REGISTER macro in 64 case.
7148 2004-01-03 Ulrich Drepper <drepper@redhat.com>
7150 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7151 (CFLAGS-getpid.o): Defined.
7152 (CFLAGS-getpid.os): Defined.
7154 2003-12-31 Ulrich Drepper <drepper@redhat.com>
7156 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7157 returned for main thread does not overlap with any other VMA.
7158 Patch by Jakub Jelinek.
7160 2003-12-29 Jakub Jelinek <jakub@redhat.com>
7162 * tst-raise1.c: Include stdio.h.
7164 2003-12-23 Jakub Jelinek <jakub@redhat.com>
7166 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7167 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7168 If pid is 0, set it to selftid.
7169 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7170 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7171 != 0, return self->tid without doing a syscall.
7172 * descr.h (struct pthread): Move pid field after tid.
7174 * Makefile (tests): Add tst-raise1.
7175 * tst-raise1.c: New file.
7177 2003-12-23 Roland McGrath <roland@redhat.com>
7179 * tst-oddstacklimit.c: New file.
7180 * Makefile (tests): Add it.
7181 (tst-oddstacklimit-ENV): New variable.
7183 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7184 value up to page size for __default_stacksize.
7186 2003-12-21 Ulrich Drepper <drepper@redhat.com>
7188 * Makefile (tests): Add tst-eintr5.
7189 * tst-eintr5.c: New file.
7191 * eintr.c (eintr_source): Prevent sending signal to self.
7193 * tst-eintr2.c (tf1): Improve error message.
7195 2003-12-20 Ulrich Drepper <drepper@redhat.com>
7197 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7198 * sysdeps/unix/sysv/linux/getpid.c: New file.
7199 * pthread_cancel.c: Add comment explaining use of PID field.
7200 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7201 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7202 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7203 temporarily to signal the field must not be relied on and updated
7205 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7206 temporarily negative.
7207 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7209 2003-12-19 Ulrich Drepper <drepper@redhat.com>
7211 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7212 (eintr_source): If ARG != NULL, use pthread_kill.
7213 * tst-eintr1.c: Adjust for this change.
7214 * tst-eintr2.c: Likewise.
7215 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7216 * tst-eintr3.c: New file.
7217 * tst-eintr4.c: New file.
7219 2003-12-19 Jakub Jelinek <jakub@redhat.com>
7221 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7222 if CANCELSTATE_BITMASK is set.
7223 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7226 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7227 (tests-reverse): Add tst-cancel23.
7228 * tst-cancel22.c: New test.
7229 * tst-cancel23.c: New test.
7231 2003-12-18 Ulrich Drepper <drepper@redhat.com>
7233 * tst-eintr1.c: Better error messages.
7235 * Makefile (tests): Add tst-eintr2.
7236 * tst-eintr2.c: New file.
7238 2003-12-18 Jakub Jelinek <jakub@redhat.com>
7240 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7241 (CFLAGS-tst-cancelx21.c): Set.
7242 * tst-cancel21.c: New test.
7243 * tst-cancelx21.c: New test.
7245 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7247 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7248 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7249 * pt-longjmp.c: Include jmpbuf-unwind.h.
7250 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7251 _JMPBUF_UNWINDS. Adjust compared pointers.
7252 * init.c (__pthread_initialize_minimal_internal): Initialize
7253 pd->stackblock_size.
7254 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7255 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7256 * sysdeps/i386/jmpbuf-unwind.h: New file.
7257 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7258 * sysdeps/s390/jmpbuf-unwind.h: New file.
7259 * sysdeps/sh/jmpbuf-unwind.h: New file.
7260 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7261 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7262 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7263 (_JMPBUF_CFA_UNWINDS): Remove.
7264 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7266 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7268 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7269 (CFLAGS-tst-cancelx20.c): Set.
7270 * tst-cancel20.c: New test.
7271 * tst-cancelx20.c: New test.
7273 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7275 * init.c (__pthread_initialize_minimal_internal): Don't treat
7276 architectures with separate register stack special here when
7277 computing default stack size.
7279 2003-12-17 Roland McGrath <roland@redhat.com>
7281 * Makefile (tst-cancelx7-ARGS): New variable.
7282 Reportd by Greg Schafer <gschafer@zip.com.au>.
7284 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7286 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7287 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7288 (tst-stack3-ENV): Set.
7289 ($(objpfx)tst-stack3-mem): New.
7290 * tst-stack3.c: New test.
7292 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7294 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7295 Add unwind directives. Drop unused .regstk directive.
7296 (_fini_EPILOG_BEGINS): Add unwind directives.
7298 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7300 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7301 Assume parameter is a pointer.
7302 (lll_futex_wake): Likewise.
7303 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7305 (lll_futex_wake): Likewise.
7306 Reported by Boris Hu.
7307 * sysdeps/unix/sysv/linux/unregister-atfork.c
7308 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7310 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7312 2003-12-10 Ulrich Drepper <drepper@redhat.com>
7314 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7315 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7316 __rtld_lock_initialize for ld.so lock.
7317 Patch in part by Adam Li <adam.li@intel.com>.
7319 2003-12-02 David Mosberger <davidm@hpl.hp.com>
7321 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7322 in $(gnulib). Also, remove stale comment.
7324 2003-11-12 David Mosberger <davidm@hpl.hp.com>
7326 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7327 advantage of new syscall stub and optimize accordingly.
7329 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7330 from SYS_futex, to match expectations of
7331 sysdep.h:DO_INLINE_SYSCALL.
7332 (lll_futex_clobbers): Remove.
7333 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7334 (lll_futex_wake): Likewise.
7335 (lll_futex_requeue): Likewise.
7336 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7337 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7339 (__lll_mutex_lock): Likewise.
7340 (__lll_mutex_cond_lock): Likewise.
7341 (__lll_mutex_timed_lock): Likewise.
7342 (__lll_mutex_unlock): Likewise.
7343 (__lll_mutex_unlock_force): Likewise.
7345 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7346 comes before the include of <sysdep.h>.
7347 (THREAD_SELF_SYSINFO): New macro.
7348 (THREAD_SYSINFO): Likewise.
7349 (INIT_SYSINFO): New macro.
7350 (TLS_INIT_TP): Call INIT_SYSINFO.
7352 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7354 * sysdeps/pthread/createthread.c (create_thread): Use
7355 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7356 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7357 THREAD_SELF_SYSINFO instead of open code.
7358 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7359 (THREAD_SYSINFO): Likewise.
7361 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7363 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7365 2003-12-06 Ulrich Drepper <drepper@redhat.com>
7367 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7368 instead of .init. Patch by David Mosberger.
7370 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
7372 * sysdeps/pthread/configure.in: Remove broken declaration in C
7373 cleanup handling check.
7375 2003-11-30 Andreas Jaeger <aj@suse.de>
7377 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7378 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7381 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7383 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7384 * pthread_attr_destroy.c: Include shlib-compat.h.
7385 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7386 is set in iattr->flags.
7387 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7389 2003-11-21 Jakub Jelinek <jakub@redhat.com>
7391 * Makefile (distribute): Add tst-cleanup4aux.c.
7393 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7396 2003-11-21 Ulrich Drepper <drepper@redhat.com>
7398 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7399 pthread_cond_signal.
7401 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7402 store mutex address if the current value is ~0l.
7403 * sysdeps/pthread/pthread_cond_timedwait.c
7404 (__pthread_cond_timedwait): Likewise.
7405 * sysdeps/pthread/pthread_cond_broadcast.c
7406 (__pthread_cond_broadcast): Don't use requeue for pshared
7409 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7410 (__pthread_cond_wait): Don't store mutex address if the current
7412 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7413 (__pthread_cond_timedwait): Likewise.
7414 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7415 (__pthread_cond_broadcast): Don't use requeue for pshared
7418 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7419 element with ~0l for pshared condvars, with NULL otherwise.
7421 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7422 (__pthread_cond_wait): Don't store mutex address if the current
7424 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7425 (__pthread_cond_timedwait): Likewise.
7426 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7427 (__pthread_cond_broadcast): Don't use requeue for pshared
7430 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7431 * tst-cond12.c: New file.
7432 * tst-cond13.c: New file.
7434 2003-11-17 Ulrich Drepper <drepper@redhat.com>
7436 * sysdeps/pthread/configure.in: Make missing forced unwind support
7439 2003-11-11 Ulrich Drepper <drepper@redhat.com>
7441 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7443 2003-11-06 Ulrich Drepper <drepper@redhat.com>
7445 * Makefile: Add magic to clean up correctly.
7447 2003-11-05 Jakub Jelinek <jakub@redhat.com>
7449 * unwind.c (FRAME_LEFT): Define.
7450 (unwind_stop): Handle old style cleanups here.
7451 (__pthread_unwind): Handle old style cleanups only if
7452 !HAVE_FORCED_UNWIND.
7453 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7454 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7455 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7456 ($(objpfx)tst-cleanupx4): Likewise.
7457 * tst-cleanup4.c: New test.
7458 * tst-cleanup4aux.c: New.
7459 * tst-cleanupx4.c: New test.
7461 2003-11-04 Ulrich Drepper <drepper@redhat.com>
7463 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7464 lll_mutex_*lock macros to skip atomic operations on some archs.
7466 2003-11-03 Ulrich Drepper <drepper@redhat.com>
7468 * sysdeps/pthread/tst-timer.c (main): Initialize
7469 sigev2.sigev_value as well.
7471 2003-10-15 Roland McGrath <roland@redhat.com>
7473 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7475 * sysdeps/pthread/configure: Regenerated.
7477 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7479 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7480 locking macros. No distinction between normal and mutex locking
7482 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7483 Merge bits from lowlevelmutex.S we still need.
7484 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7485 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7486 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7487 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7488 new mutex implementation.
7489 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7490 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7491 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7492 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7493 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7494 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7495 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7496 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7497 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7498 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7499 symbol for entry point to avoid cancellation.
7501 2003-10-07 Jakub Jelinek <jakub@redhat.com>
7503 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7505 (SAVE_OLDTYPE_0): Fix a typo.
7507 2003-10-03 Ulrich Drepper <drepper@redhat.com>
7509 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7510 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7512 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7514 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7517 2003-10-02 Jakub Jelinek <jakub@redhat.com>
7519 * Makefile (tests): Add tst-cancel19.
7520 * tst-cancel19.c: New test.
7522 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7524 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7525 restoring of the old cancellation type.
7527 2003-09-30 Jakub Jelinek <jakub@redhat.com>
7529 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7531 2003-09-27 Wolfram Gloger <wg@malloc.de>
7533 * sysdeps/pthread/malloc-machine.h: New file
7535 2003-09-24 Roland McGrath <roland@redhat.com>
7537 * allocatestack.c (__make_stacks_executable): Don't ignore return
7538 value from _dl_make_stack_executable.
7540 2003-09-24 Ulrich Drepper <drepper@redhat.com>
7542 * allocatestack.c (__make_stacks_executable): Also change
7543 permission of the currently unused stacks.
7545 * allocatestack.c (change_stack_perm): Split out from
7546 __make_stacks_executable.
7547 (allocate_stack): If the required permission changed between the time
7548 we started preparing the stack and queueing it, change the permission.
7549 (__make_stacks_executable): Call change_stack_perm.
7551 * Makefile: Build tst-execstack-mod locally.
7552 * tst-execstack-mod.c: New file.
7554 2003-09-23 Jakub Jelinek <jakub@redhat.com>
7556 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7558 2003-09-23 Roland McGrath <roland@redhat.com>
7560 * tst-execstack.c: New file.
7561 * Makefile (tests): Add it.
7562 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7563 (LDFLAGS-tst-execstack): New variable.
7565 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7566 whether to use PROT_EXEC for stack mmap.
7567 (__make_stacks_executable): New function.
7568 * pthreadP.h: Declare it.
7569 * init.c (__pthread_initialize_minimal_internal): Set
7570 GL(dl_make_stack_executable_hook) to that.
7572 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7574 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7575 recommendation from AMD re avoidance of lock prefix.
7577 2003-09-22 Jakub Jelinek <jakub@redhat.com>
7579 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7580 lll_futex_timed_wait instead of lll_futex_wait.
7581 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7582 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7583 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7584 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7585 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7586 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7587 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7588 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7589 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7590 Completely revamp the locking macros. No distinction between
7591 normal and mutex locking anymore.
7592 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7593 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7594 __lll_lock_timedwait): Fix prototypes.
7595 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7596 __lll_lock_timedwait): Likewise.
7597 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7598 macros, add __builtin_expect.
7599 (lll_mutex_timedlock): Likewise. Fix return value.
7600 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7601 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7602 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7603 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7604 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7605 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7606 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7607 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7609 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7611 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7612 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7613 operation if possible.
7615 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7616 like jumping over the lock prefix.
7618 2003-09-21 Ulrich Drepper <drepper@redhat.com>
7620 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7621 locking macros. No distinction between normal and mutex locking
7623 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7624 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7625 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7626 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7627 locking. Merge bits from lowlevelmutex.S we still need.
7628 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7629 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7630 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7631 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7632 * Makefile (routines): Remove libc-lowlevelmutex.
7633 (libpthread-rountines): Remove lowlevelmutex.
7634 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7635 for new mutex implementation.
7636 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7637 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7638 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7639 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7640 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7642 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7644 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7645 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7646 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7647 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7648 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7649 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7650 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7651 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7653 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7655 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7656 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7657 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7659 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7660 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7662 2003-09-20 Ulrich Drepper <drepper@redhat.com>
7664 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7665 in parameters of asm with output parameters.
7667 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7668 type of DECR parameter to int.
7669 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7671 2003-09-18 Jakub Jelinek <jakub@redhat.com>
7673 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7674 guardsize for each thread.
7676 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7678 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7679 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7680 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7682 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7683 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7685 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7686 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7687 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7688 (pthread_getaffinity_np): Add hidden_def.
7690 * Makefile (tests): Add tst-attr3.
7691 * tst-attr3.c: New test.
7693 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7695 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7697 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7698 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7700 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7702 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7703 * tst-align.c: Include tst-stack-align.h.
7704 (tf, do_test): Use TEST_STACK_ALIGN macro.
7706 2003-09-17 Ulrich Drepper <drepper@redhat.com>
7708 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7711 2003-09-16 Ulrich Drepper <drepper@redhat.com>
7713 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7714 stack-related values for the initial thread.
7716 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7718 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7720 2003-09-11 Ulrich Drepper <drepper@redhat.com>
7722 * pthread_mutex_lock.c: Minor code rearrangements.
7724 2003-09-05 Roland McGrath <roland@redhat.com>
7726 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7727 Instead, include ../nptl_db/db_info.c to do its magic.
7728 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7729 (__pthread_pthread_key_2ndlevel_size): Likewise.
7730 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7731 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7732 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7733 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7734 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7735 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7736 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7737 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7738 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7739 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7740 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7741 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7742 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7743 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7744 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7745 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7746 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7748 2003-09-08 Ulrich Drepper <drepper@redhat.com>
7750 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7751 of pthread_t to be compatible with LT.
7752 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7753 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7754 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7755 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7756 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7757 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7758 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7760 2003-09-04 Ulrich Drepper <drepper@redhat.com>
7762 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7764 2003-09-04 Jakub Jelinek <jakub@redhat.com>
7766 * unwind-forcedunwind.c: Move to...
7767 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7768 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7769 * sysdeps/pthread/jmpbuf-unwind.h: New file.
7770 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7771 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7772 * unwind.c: Include jmpbuf-unwind.h.
7773 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7775 2003-09-02 Jakub Jelinek <jakub@redhat.com>
7777 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7778 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7779 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7780 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7781 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7782 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7783 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7784 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7785 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7786 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7787 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7789 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7790 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7791 * Makefile (tests): Add tst-stack2.
7792 * tst-stack2.c: New test.
7793 * tst-stack1.c: Include limits.h and sys/param.h.
7794 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7796 * pthread_condattr_setpshared.c: Include errno.h.
7797 (pthread_condattr_setpshared): Return EINVAL if pshared
7798 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7800 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7801 defined symbol for entry point to avoid cancellation.
7802 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7804 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7806 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7808 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7810 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7812 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7813 __close_nocancel, __read_nocancel, __write_nocancel,
7814 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7815 libpthread.so or librt.so, define to corresponding function
7816 without _nocancel suffix.
7817 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7818 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7819 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7821 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7823 2003-09-02 Ulrich Drepper <drepper@redhat.com>
7825 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7826 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7828 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7829 in subsections has a symbol associated with it.
7831 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7832 defined symbol for entry point to avoid cancellation.
7833 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7835 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7837 * Makefile (tests): Add tst-tls5.
7838 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7839 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7840 ($(objpfx)tst-tls5): New.
7841 ($(objpfx)tst-tls6.out): Likewise.
7842 (tests): Depend on $(objpfx)tst-tls6.out.
7843 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7844 (do_test): Check pthread_self () return value alignment.
7845 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7846 (tf): Check pthread_self () return value alignment.
7847 * tst-tls5.c: New test.
7849 * tst-tls5mod.c: New.
7850 * tst-tls5moda.c: New.
7851 * tst-tls5modb.c: New.
7852 * tst-tls5modc.c: New.
7853 * tst-tls5modd.c: New.
7854 * tst-tls5mode.c: New.
7855 * tst-tls5modf.c: New.
7856 * tst-tls6.sh: New test.
7858 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7859 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7860 * init.c (pthread_functions): Initialize them.
7861 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7862 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7863 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7864 pthread_cond_timedwait@@GLIBC_2.3.2.
7866 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7868 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7869 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7870 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7871 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7872 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7873 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7875 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7877 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7878 _POSIX_THREAD_PRIORITY_SCHEDULING.
7879 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7881 2003-08-31 Ulrich Drepper <drepper@redhat.com>
7883 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7884 nested function, use static inline function from libio.h.
7885 Code by Richard Henderson.
7887 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7890 2003-08-30 Jakub Jelinek <jakub@redhat.com>
7892 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7893 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7894 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7895 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7896 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7897 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7898 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7899 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7900 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7901 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7902 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7903 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7904 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7905 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7906 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7907 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7908 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7909 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7910 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7911 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7912 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7913 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7914 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7915 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7916 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7917 * sysdeps/sparc/tls.h: New file.
7918 * sysdeps/sparc/tcb-offsets.sym: New file.
7919 * sysdeps/sparc/Makefile: New file.
7920 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7921 * init.c [__sparc__] (__NR_set_tid_address): Define.
7923 2003-08-29 Jakub Jelinek <jakub@redhat.com>
7925 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7926 _IO_release_lock): Define.
7928 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
7930 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7931 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
7933 2003-08-27 Ulrich Drepper <drepper@redhat.com>
7935 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7936 (__pthread_cleanup_class): Add missing return types of member
7939 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
7941 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7942 (lll_mutex_unlock_force): Add memory barrier between store and futex
7945 2003-08-25 Ulrich Drepper <drepper@redhat.com>
7947 * tst-cancel4.c (do_test): Also unlink tempfname and remove
7948 tempmsg in first loop.
7950 2003-08-18 Ulrich Drepper <drepper@redhat.com>
7952 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7953 _POSIX_THREAD_PRIORITY_SCHEDULING.
7954 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7956 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7958 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7959 (__rtld_lock_default_lock_recursive,
7960 __rtld_lock_default_unlock_recursive): Define.
7961 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7962 __rtld_lock_unlock_recursive): Define using
7963 GL(_dl_rtld_*lock_recursive).
7964 * init.c (__pthread_initialize_minimal_internal): Initialize
7965 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7966 Lock GL(_dl_load_lock) the same number of times as
7967 GL(_dl_load_lock) using non-mt implementation was nested.
7969 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7970 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7972 2003-08-06 Jakub Jelinek <jakub@redhat.com>
7974 * tst-cancel17.c (do_test): Make len2 maximum of page size and
7977 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7979 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7981 2003-08-03 Jakub Jelinek <jakub@redhat.com>
7983 * sysdeps/pthread/createthread.c (do_clone): Move error handling
7984 to first syscall error check. Move syscall error check for tkill
7985 into __ASSUME_CLONE_STOPPED #ifdef.
7987 2003-08-02 Ulrich Drepper <drepper@redhat.com>
7989 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7990 is not defined, do explicit synchronization.
7991 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
7992 is not defined also unlock pd->lock for non-debugging case in case
7994 * pthread_create.c (start_thread): Always get and release pd->lock
7995 if __ASSUME_CLONE_STOPPED is not defined.
7996 (start_thread_debug): Removed. Adjust users.
7997 * allocatestack.c (allocate_stack): Always initialize lock if
7998 __ASSUME_CLONE_STOPPED is not defined.
7999 * Makefile (tests): Add tst-sched1.
8000 * tst-sched1.c: New file.
8002 * sysdeps/pthread/createthread.c (do_clone): Only use
8003 sched_setschduler and pass correct parameters.
8005 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8007 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8008 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8009 PTHREAD_STACK_MIN in comments.
8011 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8013 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8014 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8016 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8017 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8018 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8019 (__pthread_cleanup_upto): Fix prototype.
8020 (_longjmp_unwind): Adjust caller.
8021 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8022 Change second argument to const struct pointer.
8023 * tst-sem8.c (main): Remove unused s2 and s3 variables.
8024 * tst-sem9.c (main): Likewise.
8025 * unwind.c: Include string.h for strlen prototype.
8027 2003-07-31 Ulrich Drepper <drepper@redhat.com>
8029 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8030 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8031 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8033 Patch by Nicholas Miell <nmiell@attbi.com>.
8035 2003-07-30 Jakub Jelinek <jakub@redhat.com>
8037 * init.c (__pthread_initialize_minimal_internal): Initialize
8038 GL(dl_init_static_tls).
8039 * pthreadP.h (__pthread_init_static_tls): New prototype.
8040 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8042 * Makefile (tests): Add tst-tls4.
8043 (modules-names): Add tst-tls4moda and tst-tls4modb.
8044 ($(objpfx)tst-tls4): Link against libdl and libpthread.
8045 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8047 * tst-tls4.c: New file.
8048 * tst-tls4moda.c: New file.
8049 * tst-tls4modb.c: New file.
8051 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
8053 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8054 before __timer_dealloc.
8055 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8056 Don't call list_unlink.
8058 2003-07-29 Roland McGrath <roland@redhat.com>
8060 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8062 2003-07-25 Jakub Jelinek <jakub@redhat.com>
8064 * tst-cancel17.c (do_test): Check if aio_cancel failed.
8065 Don't reuse struct aiocb A if it failed.
8066 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8067 not just one byte, as that does not block.
8069 2003-07-22 Jakub Jelinek <jakub@redhat.com>
8071 * sysdeps/pthread/unwind-resume.c: New file.
8072 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8073 unwind-resume in csu subdir.
8074 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8076 (librt-sysdep_routines, librt-shared-only-routines): Add
8078 * sysdeps/pthread/rt-unwind-resume.c: New file.
8079 * unwind-forcedunwind.c: New file.
8080 * Makefile (libpthread-routines): Add unwind-forcedunwind.
8081 (libpthread-shared-only-routines): Likewise.
8082 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8083 * pthreadP.h (pthread_cancel_init): New prototype.
8084 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8086 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8087 attr argument const struct pthread_attr *.
8089 * res.c (__res_state): Return __resp.
8090 * descr.h: Include resolv.h.
8091 (struct pthread): Add res field.
8092 * pthread_create.c: Include resolv.h.
8093 (start_thread): Initialize __resp.
8094 * Makefile (tests): Add tst-_res1.
8095 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8096 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8097 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8099 * tst-_res1.c: New file.
8100 * tst-_res1mod1.c: New file.
8101 * tst-_res1mod2.c: New file.
8103 2003-07-21 Ulrich Drepper <drepper@redhat.com>
8105 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8107 * Makefile: Define various *-no-z-defs variables for test DSOs
8108 which has undefined symbols.
8110 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8112 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8113 Retry if the stwcx fails to store once_control.
8115 2003-07-20 Ulrich Drepper <drepper@redhat.com>
8117 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8118 pthread_attr_setaffinity.
8119 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8120 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8121 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8122 * pthread_attr_destroy.c: Free cpuset element if allocated.
8123 * pthread_create.c: Pass iattr as additional parameter to
8125 * sysdeps/pthread/createthread.c: If attribute is provided and
8126 a new thread is created with affinity set or scheduling parameters,
8127 start thread with CLONE_STOPPED.
8128 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8129 pthread_attr_setaffinity.
8130 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8133 2003-07-15 Ulrich Drepper <drepper@redhat.com>
8135 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8137 2003-07-14 Ulrich Drepper <drepper@redhat.com>
8139 * sysdeps/pthread/configure.in: Require CFI directives also for
8142 2003-07-15 Jakub Jelinek <jakub@redhat.com>
8144 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8147 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8149 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8151 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8152 registers as variables. Call __pthread_mutex_unlock_usercnt.
8153 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8154 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8155 not self pointer in __writer. Compare with TID to determine
8157 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8158 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8160 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8162 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8163 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8164 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8165 macros also when compiling librt.
8167 2003-07-11 Jakub Jelinek <jakub@redhat.com>
8169 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8170 -fasynchronous-unwind-tables.
8171 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8172 (PSEUDO): Add cfi directives.
8173 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8175 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8178 2003-07-08 Jakub Jelinek <jakub@redhat.com>
8180 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8181 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8182 * unwind.c (__pthread_unwind_next): Add hidden_def.
8183 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8185 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8186 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8187 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8189 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8190 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8192 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8193 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8194 __pthread_unregister_cancel and __pthread_unwind_next.
8196 2003-07-04 Jakub Jelinek <jakub@redhat.com>
8198 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8199 different symbol for the cancellation syscall wrapper and
8200 non-cancellation syscall wrapper.
8201 (PSEUDO_END): Define.
8203 2003-07-05 Richard Henderson <rth@redhat.com>
8205 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8206 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8207 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8208 return actual return value from the syscall, not 0.
8210 2003-07-07 Ulrich Drepper <drepper@redhat.com>
8212 * descr.h (struct pthread): Add pid field.
8213 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8214 (__reclaim_stacks): Likewise.
8215 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8216 also check for PID of the signal source.
8217 (__pthread_initialize_minimal_internal): Also initialize pid field
8218 of initial thread's descriptor.
8219 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8220 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8221 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8222 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8223 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8225 2003-07-05 Ulrich Drepper <drepper@redhat.com>
8227 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8228 Fix use of parameter.
8229 (__libc_cleanup_pop): Likewise.
8231 2003-07-04 Ulrich Drepper <drepper@redhat.com>
8233 * init.c (sigcancel_handler): Change parameters to match handler
8234 for SA_SIGACTION. Check signal number and code to recognize
8235 invalid invocations.
8237 2003-07-03 Roland McGrath <roland@redhat.com>
8239 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8240 Apply sizeof (struct pthread) bias to r13 value.
8242 2003-07-03 Ulrich Drepper <drepper@redhat.com>
8244 * sysdeps/pthread/configure.in: Require CFI directives.
8246 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8248 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8249 libpthread compilation.
8250 * unwind.c (__pthread_unwind): Add hidden_def.
8251 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8253 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8255 * libc-cancellation.c (__libc_cleanup_routine): Define.
8256 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8257 (__pthread_cleanup_pop): Define.
8259 2003-07-01 Richard Henderson <rth@redhat.com>
8261 * sysdeps/alpha/elf/pt-initfini.c: New file.
8262 * sysdeps/alpha/pthread_spin_lock.S: New file.
8263 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8264 * sysdeps/alpha/pthreaddef.h: New file.
8265 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8266 * sysdeps/alpha/tls.h: New file.
8267 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8268 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8269 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8270 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8271 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8272 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8273 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8274 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8275 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8276 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8278 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8280 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8281 cleanup support and unwind info.
8283 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8285 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8286 Use correct cleanup handler registration. Add unwind info.
8287 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8288 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8289 * tst-once3.c: Add cleanup handler and check it is called.
8290 * tst-once4.c: Likewise.
8291 * tst-oncex3.c: New file.
8292 * tst-oncex4.c: New file.
8293 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8295 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8297 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8299 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8301 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8302 (tf_msgsnd): Likewise.
8304 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8305 premature returns a bit more.
8307 2003-06-26 Ulrich Drepper <drepper@redhat.com>
8309 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8310 definition to the front.
8312 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8313 the cleanup functions to make the names unique. Fix dwarf opcode
8315 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8316 functions to make the names unique. Fix CFA offset for two blocks.
8318 2003-06-25 Ulrich Drepper <drepper@redhat.com>
8320 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8321 missing closing braces.
8322 Patch by Christophe Saout <christophe@saout.de>.
8324 2003-06-24 Roland McGrath <roland@redhat.com>
8326 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8328 2003-06-24 Ulrich Drepper <drepper@redhat.com>
8330 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8331 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8333 * pthreadP.h: Declare __find_thread_by_id.
8334 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8335 * pthread_clock_gettime.c: Allow using other thread's clock.
8336 * pthread_clock_settime.c: Likewise.
8337 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8338 * Makefile: Add rules to build and run tst-clock2.
8339 * tst-clock2.c: New file.
8341 2003-06-23 Ulrich Drepper <drepper@redhat.com>
8343 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8344 to use exception-based cleanup handler.
8345 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8347 * tst-cond8.c (ch): Announce that we are done.
8349 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8351 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8352 Also test aio_suspend with timeout value.
8354 2003-06-22 Ulrich Drepper <drepper@redhat.com>
8356 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8357 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8360 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8361 (__pthread_mutex_lock_internal): Likewise.
8362 (__pthread_mutex_unlock_internal): Likewise.
8363 (__pthread_mutex_unlock_usercnt): Declare.
8364 * pthread_mutex_destroy.c: Always fail if used in any way.
8365 * pthread_mutex_init.c: Update comment.
8366 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8367 * pthread_mutex_timedlock.c: Adjust __nusers.
8368 * pthread_mutex_trylock.c: Adjust __nusers.
8369 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8370 and public interfaces are wrapper with pass additional parameter.
8371 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8373 * tst-mutex8.c: New file.
8374 * Makefile (tests): Add tst-mutex8.
8375 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8376 __pthread_mutex_unlock_usercnt.
8377 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8378 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8379 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8380 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8381 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8382 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8383 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8385 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8386 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8387 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8388 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8389 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8391 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8392 * pthread_mutex_timedlock.c: Likewise.
8393 * pthread_mutex_trylock.c: Adjust __nusers.
8394 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8395 * tst-mutex9.c: New file.
8396 * Makefile (tests): Add tst-mutex9.
8397 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8398 * sysdeps/ia64/tls.h: Likewise.
8399 * sysdeps/powerpc/tls.h: Likewise.
8400 * sysdeps/s390/tls.h: Likewise.
8401 * sysdeps/sh/tls.h: Likewise.
8402 * sysdeps/x86_64/tls.h: Likewise.
8403 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8404 Change type of __owner.
8405 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8406 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8407 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8408 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8409 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8411 2003-06-19 Jakub Jelinek <jakub@redhat.com>
8413 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8414 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8416 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8417 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8418 instead of nr to lll_futex_wake. Only set errno and return -1
8421 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8422 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8423 return actual return value from the syscall, not 0.
8425 2003-06-18 Ulrich Drepper <drepper@redhat.com>
8427 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8428 find a random value.
8429 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8432 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8433 compat_timer_settime.
8434 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8435 compat_timer_gettime.
8436 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8437 compat_timer_getoverrun.
8438 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8439 compat_timer_delete.
8441 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8442 error-checking mutex detect busy mutexes.
8444 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8446 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8447 Add ax to clobber list.
8448 (lll_mutex_cond_lock): Likewise.
8449 (lll_mutex_unlock): Likewise.
8450 (lll_lock): Likewise.
8451 (lll_unlock): Likewise.
8453 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8454 * tst-cancel18.c: New file.
8455 * tst-cancelx18.c: New file.
8457 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8460 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8461 * tst-cancel17.c: New file.
8462 * tst-cancelx17.c: New file.
8464 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8465 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8466 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8468 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8470 2003-06-16 Jakub Jelinek <jakub@redhat.com>
8472 * sysdeps/pthread/createthread.c (create_thread): Set
8473 header.multiple_threads unconditionally.
8474 * allocatestack.c (allocate_stack): Likewise.
8475 * descr.h (struct pthread): Add header.multiple_threads
8477 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8478 Define for librt. #error if neither libpthread, libc nor librt.
8479 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8481 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8482 CDISABLE): Likewise.
8483 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8484 CDISABLE): Likewise.
8485 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8486 CDISABLE): Likewise.
8487 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8488 CDISABLE): Likewise. Access header.multiple_threads outside of
8489 libc and libpthread.
8490 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8492 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8493 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8495 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8497 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8498 Also test early cancellation before the thread reaches the cancellation
8501 * Makefile: Compile forward.c with exceptions.
8503 * sysdeps/unix/sysv/linux/sleep.c: New file.
8505 2003-06-16 Ulrich Drepper <drepper@redhat.com>
8507 * Makefile: Add CFLAGS definition to compile function wrappers
8508 duplicated from libc with exceptions.
8509 * tst-cancel4.c: Also check cancellation handlers.
8511 * Makefile: Add rules to build and run tst-cancel16 and
8512 tst-cancelx16. Add missing CFLAGS definitions.
8513 * tst-cancel16.c: New file.
8514 * tst-cancelx16.c: New file.
8516 2003-06-15 Ulrich Drepper <drepper@redhat.com>
8518 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8519 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8520 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8521 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8523 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8524 (LIBC_CANCEL_RESET): Likewise.
8525 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8526 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8528 (CFLAGS-libcrt-cancellation.c): Define.
8529 * sysdeps/pthread/librt-cancellation.c: New file.
8530 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8531 macros also when compiling librt.
8532 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8533 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8534 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8535 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8536 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8537 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8538 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8540 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8541 compat_timer_create.
8543 2003-06-14 Ulrich Drepper <drepper@redhat.com>
8545 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8547 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8549 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8550 Add libc_hidden_def.
8552 2003-06-13 Roland McGrath <roland@redhat.com>
8554 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8555 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8557 2003-06-11 Ulrich Drepper <drepper@redhat.com>
8559 * allocatestack.c (queue_stack): Always inline.
8560 * ptreadhP.h (__do_cancel): Likewise.
8562 2003-06-10 Jakub Jelinek <jakub@redhat.com>
8564 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8567 2003-06-10 Ulrich Drepper <drepper@redhat.com>
8569 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8570 (__pthread_cond_signal): Remove incorrect second addition for
8573 2003-06-09 Ulrich Drepper <drepper@redhat.com>
8575 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8576 (__pthread_cond_signal): Use correct futex pointer in
8577 __lll_mutex_lock_wait call.
8579 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8580 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8582 2003-06-08 Ulrich Drepper <drepper@redhat.com>
8584 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8586 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8589 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8590 hand-written CFI generation code. Since ENTRY/END also initiated
8591 CFI frames this caused two CFI sets to be generated.
8593 2003-06-07 Ulrich Drepper <drepper@redhat.com>
8595 * cleanup_routine.c: New file.
8596 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8597 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8599 * Makefile (libpthread-routines): Add cleanup_routine.
8600 Add more CFLAGS variables to compile with exceptions. Add comments
8601 why which file needs unwind tables.
8602 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8604 * tst-cancelx1.c: New file.
8605 * tst-cancelx2.c: New file.
8606 * tst-cancelx3.c: New file.
8607 * tst-cancelx4.c: New file.
8608 * tst-cancelx5.c: New file.
8609 * tst-cancelx6.c: New file.
8610 * tst-cancelx7.c: New file.
8611 * tst-cancelx8.c: New file.
8612 * tst-cancelx9.c: New file.
8613 * tst-cancelx10.c: New file.
8614 * tst-cancelx11.c: New file.
8615 * tst-cancelx12.c: New file.
8616 * tst-cancelx13.c: New file.
8617 * tst-cancelx14.c: New file.
8618 * tst-cancelx15.c: New file.
8619 * tst-cleanupx0.c: New file.
8620 * tst-cleanupx0.expect: New file.
8621 * tst-cleanupx1.c: New file.
8622 * tst-cleanupx2.c: New file.
8623 * tst-cleanupx3.c: New file.
8625 * tst-cleanup0.c: Make standard compliant.
8626 * tst-cleanup1.c: Likewise.
8628 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8629 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8630 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8631 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8632 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8633 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8634 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8636 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8637 * tst-cancel12.c: New file.
8638 * tst-cancel13.c: New file.
8639 * tst-cancel14.c: New file.
8640 * tst-cancel15.c: New file.
8641 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8644 * tst-cancel1.c: Add some comments.
8646 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8649 2003-06-06 Ulrich Drepper <drepper@redhat.com>
8651 * Makefile (CFLAGS-pthread_cancel.c): Define.
8653 2003-06-05 Ulrich Drepper <drepper@redhat.com>
8655 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8656 Change type of __writer element to int.
8657 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8658 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8659 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8660 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8661 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8662 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8663 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8664 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8665 Compare with TID to determine deadlocks.
8666 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8667 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8668 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8669 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8670 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8671 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8673 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8675 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8676 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8677 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8679 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8681 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8682 * Makefile (tests): Add tst-rwlock12.
8683 * tst-rwlock12.c: New file.
8685 2003-06-05 Jakub Jelinek <jakub@redhat.com>
8687 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8688 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8689 Remove bogus hidden_proto.
8690 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8692 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8693 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8694 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8695 ___lll_mutex_timedlock): Likewise.
8697 2003-06-04 Ulrich Drepper <drepper@redhat.com>
8699 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8700 (__pthread_cond_signal): Add some code to eventually handle
8703 2003-06-01 Ulrich Drepper <drepper@redhat.com>
8705 * Makefile (tests): Add tst-exec4.
8706 (tst-exec4-ARGS): Define.
8707 * tst-exec4.c: New file.
8709 2003-05-31 Ulrich Drepper <drepper@redhat.com>
8711 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8712 Also fail if tv_nsec < 0.
8713 (__lll_timedwait_tid): Likewise.
8714 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8715 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8717 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8719 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8721 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8723 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8725 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8728 * Makefile (tests): Add tst-sem8 and tst-sem9.
8729 * tst-sem8.c: New file.
8730 * tst-sem9.c: New file.
8731 * sem_open.c: Fix creation of in_use record if the file exists but
8734 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8737 * sysdeps/pthread/timer_create.c (timer_create): In case
8738 evp==NULL, assign timer ID to sival_ptr.
8740 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8741 struct pthread_unwind_buf *.
8742 (struct pthread): Likewise for cleanup_jmp_buf element.
8744 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8745 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8746 * unwind.c (__pthread_unwind_next): Likewise.
8748 2003-05-30 Ulrich Drepper <drepper@redhat.com>
8750 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8751 (lll_futex_timed_wait): Use int for futex value parameter.
8752 (lll_futex_wake): Likewise.
8753 (lll_futex_requeue): Likewise.
8755 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8756 Replace one memory operation with one register operation.
8758 * tst-join4.c (do_test): Fix error message.
8760 * tst-rwlock6.c (do_test): Use correct format specifier.
8762 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8763 (__lll_mutex_lock_wait): Replace one memory operation with one
8765 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8766 (__lll_mutex_lock_wait): Likewise.
8768 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8769 (__lll_mutex_cond_lock): Add one to value parameter of
8770 __lll_lock_wait to reflect reality in the futex syscall.
8771 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8772 (lll_mutex_cond_lock): Likewise.
8774 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8776 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8778 (lll_mutex_cond_lock): Define.
8780 2003-05-29 Ulrich Drepper <drepper@redhat.com>
8782 * Makefile (tests): Add tst-signal6.
8783 * tst-signal6.c: New file.
8785 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8786 (__lll_mutex_unlock_force): New function
8787 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8789 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8790 (__lll_mutex_unlock_force): New function.
8791 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8793 * tst-rwlock7.c (do_test): Use correct format specifier.
8795 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8796 Find break parameter in correct asm argument.
8798 2003-05-27 Jakub Jelinek <jakub@redhat.com>
8800 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8802 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8804 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8806 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8807 lll_futex_requeue, lll_mutex_unlock_force): Define.
8809 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8811 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8812 (pthread_cond_t): Add __mutex.
8813 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8814 lll_futex_requeue, lll_mutex_unlock_force): Define.
8816 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8818 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8819 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8821 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8823 (lll_futex_wait, lll_futex_wake): Define.
8824 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8825 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8826 FUTEX_REQUEUE instead of FUTEX_WAIT.
8827 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8828 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8829 mutex which was used in condvar structure. Call
8830 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8831 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8833 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8834 include tcb-offsets.h. Read wakeup value in locked region.
8835 Use the value of gbr register as THREAD_ID.
8836 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8837 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8838 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8840 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8843 2003-05-28 Ulrich Drepper <drepper@redhat.com>
8845 * sysdeps/pthread/pthread_cond_broadcast.c
8846 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8848 2003-05-26 Ulrich Drepper <drepper@redhat.com>
8850 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8851 typo in register name.
8852 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8853 correctly. Actually use requeue. Little optimization.
8854 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8855 mutex address early. Handle cancellation state as 32-bit value.
8856 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8857 Remove unnecessary label.
8859 2003-05-25 Ulrich Drepper <drepper@redhat.com>
8861 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8862 instead of FUTEX_WAIT.
8863 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8864 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8865 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8866 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8867 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8868 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8869 used in condvar structure. Call __pthread_mutex_cond_lock instead
8870 of __pthread_mutex_lock_internal.
8871 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8872 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8873 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8874 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8875 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8876 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8877 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8878 Add pthread_mutex_cond_lock.
8879 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8880 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8881 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8882 lll_mutex_cond_lock.
8883 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8884 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8885 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8887 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8888 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8890 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8891 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8893 * pthreadP.h: Declare __pthread_mutex_cond_lock.
8894 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8895 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
8896 macro don't define aliases.
8898 * cancellation.c: Remove __pthread_enable_asynccancel_2.
8899 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8900 * sysdeps/pthread/pthread_cond_timedwait.c: Use
8901 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8902 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8903 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8904 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8905 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8906 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8908 2003-05-17 Ulrich Drepper <drepper@redhat.com>
8910 * sem_open.c: Fix one endless loop. Implement correct semantics
8911 wrt opening the same semaphore more then once.
8912 * sem_close.c: Adjust for sem_open change.
8913 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
8914 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8915 * Makefile (tests): Add tst-sem7.
8916 * tst-sem7.c: New file.
8918 2003-05-16 Roland McGrath <roland@redhat.com>
8920 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8921 uninitialized variable braino.
8923 2003-05-16 Ulrich Drepper <drepper@redhat.com>
8925 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8926 test for syscall availability.
8928 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8929 __no_posix_timers to -1 if the syscalls don't exist.
8931 * pthread_join.c (pthread_join): Set tid field of the joined
8932 thread to -1. This isn't necessary but helps to recognize some
8933 error conditions with almost no cost.
8935 * allocatestack.c (FREE_P): Also negative values indicate an
8938 * unwind.c: Include <unistd.h>.
8940 2003-05-14 Ulrich Drepper <drepper@redhat.com>
8942 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8944 2003-05-14 Jakub Jelinek <jakub@redhat.com>
8946 * Makefile (crti-objs, crtn-objs): New variables.
8947 (omit-deps, extra-objs): Add crtn.
8948 ($(objpfx)libpthread.so): Depend on both crti and crtn
8949 and links to them in multidir.
8950 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8952 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
8954 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8955 (lll_mutex_unlock): Use atomic_exchange_rel.
8957 2003-05-11 Ulrich Drepper <drepper@redhat.com>
8959 * cond-perf.c (cons): Add missing locking around setting of alldone.
8961 2003-05-10 Ulrich Drepper <drepper@redhat.com>
8963 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8965 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8967 2003-05-09 Ulrich Drepper <drepper@redhat.com>
8969 * tst-sem6.c: New file.
8970 * Makefile (tests): Add tst-sem6.
8972 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8973 Use atomic_exchange_rel instead of atomic_exchange.
8974 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8977 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8978 code for lll_futex_wait and lll_futex_wake in static apps. Use
8979 vsyscall is possible.
8981 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8982 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8983 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8984 pthread_setaffinity_np.
8985 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8986 and pthread_setaffinity_np.
8987 * Makefile (libpthread-routines): Add pthread_getaffinity and
8988 pthread_setaffinity.
8990 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8991 use it in case mmap to allocate the stack fails.
8992 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8993 ARCH_MAP_FLAGS here.
8994 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8997 2003-05-08 Ulrich Drepper <drepper@redhat.com>
8999 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9000 handler implementation. It is now lockless in fork().
9001 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9002 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9003 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
9004 declare the __fork_*_lists.
9005 (struct fork_handler): Include pointers to all three functions.
9006 Add next, refcntr and need_signal elements.
9007 (__fork_handlers): New declaration.
9008 (__register_atfork_malloc): Remove declaration.
9009 (HAVE_register_atfork_malloc): Remove definition.
9010 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9011 __pthread_child_handler variable.
9012 (__libc_pthread_init): Use __register_atfork instead of explicitly
9014 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9016 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9018 * unwind.c (unwind_cleanup): Print error message and then abort. This
9019 function must never be reached.
9021 * cond-perf.c: New file.
9023 2003-05-05 Ulrich Drepper <drepper@redhat.com>
9025 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9027 2003-05-04 Roland McGrath <roland@redhat.com>
9029 * Makefile ($(objpfx)../libc.so): New target.
9031 2003-05-02 Ulrich Drepper <drepper@redhat.com>
9033 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9034 (pthread_condattr_t): Size is only an int, don't use long for
9036 (pthread_mutexattr_t): Likewise.
9037 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9038 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9039 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9041 2003-05-01 Ulrich Drepper <drepper@redhat.com>
9043 * sysdeps/i386/tls.h: Define THREAD_ID.
9044 * sysdeps/ia64/tls.h: Likewise.
9045 * sysdeps/powerpc/tls.h: Likewise.
9046 * sysdeps/s390/tls.h: Likewise.
9047 * sysdeps/sh/tls.h: Likewise.
9048 * sysdeps/x86_64/tls.h: Likewise.
9049 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9051 * pthread_mutex_timedlock.c: Likewise.
9052 * pthread_mutex_trylock.c: Likewise.
9053 * pthread_mutex_unlock.c: Likewise.
9054 * pthread_rwlock_trywrlock.c: Likewise.
9055 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9056 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9057 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9058 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9060 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9063 2003-04-29 Jakub Jelinek <jakub@redhat.com>
9065 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9066 (__SIZEOF_PTHREAD_COND_T): Define to 48.
9067 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9068 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9069 Make __align long long instead of long.
9070 (pthread_rwlock_t): Formatting.
9071 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9072 (pthread_rwlock_t): Formatting.
9073 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9074 (pthread_cond_t): Make __align long long instead of long.
9075 (pthread_rwlock_t): Move __flags field to the same position as in
9078 2003-04-30 Ulrich Drepper <drepper@redhat.com>
9080 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9081 * tst-rwlock7.c (do_test): Likewise.
9083 2003-04-26 Roland McGrath <roland@redhat.com>
9085 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9087 2003-04-22 Jakub Jelinek <jakub@redhat.com>
9089 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9090 sizeof (struct pthread).
9091 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9093 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9095 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9097 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9099 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9101 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9103 (NO_TLS_OFFSET): Define.
9104 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9105 add TLS_TCB_SIZE unnecessarily.
9107 2003-04-22 Roland McGrath <roland@redhat.com>
9109 * Makeconfig (shared-thread-library): Reverse link order to work
9112 2003-04-22 Ulrich Drepper <drepper@redhat.com>
9114 * semaphore.h: Fix typo in comment.
9116 2003-04-21 Ulrich Drepper <drepper@redhat.com>
9118 * sysdeps/pthread/sigfillset.c: New file.
9120 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9121 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9122 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9123 * sysdeps/pthread/sigaction.c: Likewise.
9124 * sysdeps/pthread/sigprocmask.c: New file.
9125 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9127 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9128 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9131 2003-04-19 Ulrich Drepper <drepper@redhat.com>
9133 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9134 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9136 * sysdeps/unix/sysv/linux/unregister-atfork.c
9137 (__unregister_atfork): Don't free memory not allocated dynamically.
9139 * semaphore.h: Remove __THROW marker from cancellation points.
9140 * nptl/sysdeps/pthread/pthread.h: Likewise.
9142 2003-04-18 Ulrich Drepper <drepper@redhat.com>
9144 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9145 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9148 2003-04-16 Jakub Jelinek <jakub@redhat.com>
9150 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9152 2003-04-15 Roland McGrath <roland@redhat.com>
9154 * forward.c (__pthread_unwind): Tweak to avoid warning.
9156 2003-04-15 Ulrich Drepper <drepper@redhat.com>
9158 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9160 2003-04-14 Ulrich Drepper <drepper@redhat.com>
9162 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9163 overflow CFA advance instructions.
9164 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9166 2003-04-14 Jakub Jelinek <jakub@redhat.com>
9168 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9169 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9170 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9173 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9174 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9175 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9176 DW_CFA_advance_loc for .Laddl-.Lsubl.
9178 2003-04-13 Ulrich Drepper <drepper@redhat.com>
9180 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9181 position-independent unwind data for static libraries.
9182 Add missing unwind info. Add comments.
9184 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9185 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9186 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9187 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9189 2003-04-12 Ulrich Drepper <drepper@redhat.com>
9191 * Makefile: Make sure all cancellation points are compiled with
9192 exception and asynchronous unwind tables.
9194 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9195 which mishandles loading of global object addresses in PIC.
9196 (THREAD_SETMEM_NC): Likewise.
9198 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9200 * pthread.h: Define new data structure for cleanup buffer. Declare
9201 new cleanup handler interfaces.
9202 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9203 (struct pthread): Add cleanup_jmp_buf pointer. Define
9204 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9205 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9206 it. Declare old cleanup handler installation functions.
9207 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9209 * cleanup_defer.c: Likewise.
9210 * cleanup_compat.c: New file. Old cleanup code.
9211 * cleanup_def_compat.c: New file. Old cleanup code.
9212 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9213 if own thread descriptor.
9214 * unwind.c: New file.
9215 * forward.c: Add __pthread_unwind.
9216 * init.c (pthread_functions): Add __pthread_unwind.
9217 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9218 Add ptr___pthread_unwind.
9219 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9220 and unwind function.
9221 * Makefile (libpthread-routines): Add cleanup_compat,
9222 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9223 table generation if necessary.
9224 * version.c: Record whether unwind support is compiled in.
9225 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9226 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9228 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9229 complication to generate unwind information for syscall wrappers.
9230 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9231 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9232 __cleanup_fct_attribute.
9234 * Makefile: Add rules to build and run tst-cleanup0.
9235 * tst-cleanup0.c: New file.
9236 * tst-cleanup0.expect: New file.
9238 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9239 caller. Optimize to avoid often unecessary local variable.
9241 2003-04-11 Roland McGrath <roland@redhat.com>
9243 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9244 sets variable `multidir'; include that.
9245 (generated): Add it.
9246 ($(objpfx)$(multidir)/crti.o): New target.
9247 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9249 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9251 * tst-attr2.c (do_test): Add cast to avoid warning.
9252 * tst-mutex4.c (do_test): Likewise.
9254 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9256 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9259 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9261 * Makefile (tests): Add tst-detach1.
9262 * tst-detach1.c: New file.
9264 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9266 * sysdeps/pthread/pthread.h: Remove duplicate
9267 pthread_cleanup_{push,pop} definitions.
9269 * tst-barrier2.c: Eliminate warnings.
9270 * tst-cancel4.c: Likewise.
9271 * tst-cond4.c: Likewise.
9272 * tst-cond6.c: Likewise.
9273 * tst-detach1.c: Likewise.
9274 * tst-rwlock4.c: Likewise.
9275 * tst-rwlock6.c: Likewise.
9276 * tst-rwlock7.c: Likewise.
9277 * tst-sem3.c: Likewise.
9278 * tst-spin2.c: Likewise.
9279 * tst-umask1.c: Likewise.
9281 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9283 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9285 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9287 * descr.h (struct pthread): Move cancelhandling member to the front.
9289 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9291 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9292 malloc_parent, and malloc_child statically.
9293 (__register_atfork_malloc): New function.
9294 (free_mem): Don't free any of the malloc_* variables on the list.
9295 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9296 Define HAVE_register_atfork_malloc.
9298 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9300 * sysdeps/pthread/createthread.c (create_thread): Add some more
9301 comments explaining when to set multiple_threads and when not.
9303 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9304 THREAD_ATOMIC_BIT_SET if not already defined.
9305 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9306 THREAD_ATOMIC_BIT_SET:
9307 * sysdeps/x86_64/tls.h: Likewise.
9308 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9309 THREAD_ATOMIC_CMPXCHG_VAL.
9310 (_pthread_cleanup_pop_restore): Likewise.
9311 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9312 (__pthread_enable_asynccancel_2): Likewise.
9313 (__pthread_disable_asynccancel): Likewise.
9314 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9315 (__libc_disable_asynccancel): Likewise.
9316 * init.c (sigcancel_handler): Likewise.
9317 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9318 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9320 2003-04-03 Ulrich Drepper <drepper@redhat.com>
9322 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9323 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9324 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9325 * Makefile (tests): Add tst-cancel11.
9326 * tst-cancel11.c: New file.
9328 2003-04-01 Ulrich Drepper <drepper@redhat.com>
9330 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9331 round, not the first. Use specific_used flag instead of local
9332 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9333 (__free_tcb): Don't call deallocate_tsd here.
9334 (start_thread): Call deallocate_tsd here.
9335 * pthread_setspecific.c: Set specific_used flag really only when
9337 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9338 * tst-tsd3.c: New file.
9339 * tst-tsd4.c: New file.
9341 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9343 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9344 Use atomic_exchange_and_add instead of __lll_add.
9345 (__lll_mutex_timedlock): Likewise.
9346 Patch by Ian Wienand.
9348 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9350 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9351 (SINGLE_THREAD_P): Fix typo.
9352 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9354 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9356 * Makefile (tests): Add tst-align.
9357 * tst-align.c: New file.
9358 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9360 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9363 * tst-tsd2.c: Add casts to avoid warnings.
9365 2003-03-30 Ulrich Drepper <drepper@redhat.com>
9367 * descr.h (struct pthread): Move most often used elements to the front.
9369 2003-03-29 Ulrich Drepper <drepper@redhat.com>
9371 * Makefile (libpthread-routines): Add pthread_atfork.
9372 (libpthread-static-only-routines): Add pthread_atfork.
9374 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9376 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9378 (INSTALL_DTV): Add parens.
9379 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9380 Use passed descr instead of THREAD_SELF.
9381 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9382 (__lll_mutex_timedlock_wait): Correct expected value after
9384 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9385 Release lock before waking up the waiters.
9386 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9387 criteria. Reorderstruct passed to cleanup handler. Fix
9388 handling of cancellation and failung pthread_mutex_unlock call.
9389 Use __pthread_enable_asynccancel_2 instead of
9390 __pthread_enable_asynccancel.
9391 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9392 Return result of lock re-get if it fails.
9393 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9394 for __pthread_cleanup_push.
9395 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9396 completely broken rwlock implementation.
9397 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9398 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9399 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9400 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9401 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9402 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9403 versioned_symbol macro.
9404 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9405 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9407 2003-03-27 Ulrich Drepper <drepper@redhat.com>
9409 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9410 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9412 (struct timer): Remove th and bar field.
9413 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9414 debugging code. Create only one helper thread.
9415 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9417 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9418 Renamed. Define statically. Use thread info from siginfo.
9419 (__helper_once): New variable.
9420 (__helper_tid): New variable.
9421 (__reset_helper_control): New function.
9422 (__start_helper_thread): New function.
9424 * pthread_create.c (start_thread): Don't use setjmp inside
9425 __builtin_expect to work around gcc bug.
9427 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9428 timer_delete syscall fails, but not with ENOSYS, set
9431 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9432 (timer_settime): Fix typo.
9433 * sysdeps/unix/sysv/linux/timer_getoverr.c
9434 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9436 2003-03-27 Jakub Jelinek <jakub@redhat.com>
9438 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9439 offset of cleanupbuf.__prev.
9441 2003-03-26 Jakub Jelinek <jakub@redhat.com>
9443 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9446 2003-03-26 Ulrich Drepper <drepper@redhat.com>
9448 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9449 NULL provide default definition to syscall.
9451 2003-03-25 Roland McGrath <roland@redhat.com>
9453 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9454 (timer_id2ptr): Fix typo.
9456 2003-03-25 Ulrich Drepper <drepper@redhat.com>
9458 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9459 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9460 * sysdeps/ia64/pthreaddef.h: Likewise.
9461 * sysdeps/powerpc/pthreaddef.h: Likewise.
9462 * sysdeps/s390/pthreaddef.h: Likewise.
9463 * sysdeps/sh/pthreaddef.h: Likewise.
9464 * sysdeps/x86_64/pthreaddef.h: Likewise.
9465 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9466 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9468 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9469 SIGTIMER is not unblocked.
9470 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9472 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9474 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9475 pass pointer through as ID.
9476 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9477 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9478 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9479 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9480 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9481 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9482 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9483 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9484 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9485 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9486 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9487 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9488 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9489 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9490 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9491 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9492 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9493 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9494 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9495 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9496 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9497 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9498 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9499 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9500 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9501 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9502 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9503 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9504 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9505 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9506 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9507 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9508 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9510 * pthreadP.h: Remove FRAME_LEFT definition.
9511 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9512 already left frame. Programs which have this problem are not POSIX
9514 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9516 2003-03-24 Ulrich Drepper <drepper@redhat.com>
9518 * sysdeps/pthread/tst-timer.c: Check return values of the
9521 2003-03-23 Roland McGrath <roland@redhat.com>
9523 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9524 * tst-tls3mod.c: Likewise.
9525 * tst-tls1.c: Likewise.
9526 * tst-tls2.c: Likewise.
9528 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9531 * tst-join5.c (tf1, tf2): Add a cast.
9533 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9535 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9536 Don't test anything.
9537 * tst-cond4.c: Likewise.
9538 * tst-cond6.c: Likewise.
9539 * tst-flock2.c: Likewise.
9540 * tst-mutex4.c: Likewise.
9541 * tst-rwlock4.c: Likewise.
9542 * tst-signal1.c: Likewise.
9543 * tst-spin2.c: Likewise.
9544 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9546 * tst-mutex4.c: Use test-skeleton.c.
9547 * tst-spin2.c: Likewise.
9548 * tst-sysconf.c: Likewise.
9549 * tst-barrier2.c: Likewise.
9550 * tst-cond4.c: Likewise.
9551 * tst-cond6.c: Likewise.
9552 * tst-rwlock4.c: Likewise.
9553 * tst-unload.c: Likewise.
9554 * tst-flock2.c (do_test): Use return instead of exit.
9556 2003-03-22 Jakub Jelinek <jakub@redhat.com>
9558 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9560 2003-03-21 Ulrich Drepper <drepper@redhat.com>
9562 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9563 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9564 instead of __lll_compare_and_swap.
9565 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9567 Removed definition if __lll_compare_and_swap.
9569 * cancellation.c: Adjust for new form of compare&exchange macros.
9570 * cleanup_defer.c: Likewise.
9572 * libc-cancellation.c: Likewise.
9573 * old_pthread_cond_broadcast.c: Likewise.
9574 * old_pthread_cond_signal.c: Likewise.
9575 * old_pthread_cond_timedwait.c: Likewise.
9576 * old_pthread_cond_wait.c: Likewise.
9577 * pthread_cancel.c: Likewise.
9578 * pthread_create.c: Likewise.
9579 * pthread_detach.c: Likewise.
9580 * pthread_join.c: Likewise.
9581 * pthread_key_delete.c: Likewise.
9582 * pthread_setcancelstate.c: Likewise.
9583 * pthread_setcanceltype.c: Likewise.
9584 * pthread_timedjoin.c: Likewise.
9585 * pthread_tryjoin.c: Likewise.
9586 * sysdeps/pthread/createthread.c: Likewise.
9588 2003-03-20 Ulrich Drepper <drepper@redhat.com>
9590 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9591 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9592 definitions. Replace uses with calls to atomic_* functions.
9593 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9594 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9595 __lll_test_and_set calls with atomic_exchange_and_add and
9596 atomic_exchange calls respectively.
9597 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9598 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9599 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9600 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9601 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9602 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9603 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9605 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9606 returns the old value.
9608 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9610 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9611 int for variable OLDVAL and correct inline assembler contraint.
9612 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9613 type int for variable OLD.
9615 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9617 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9618 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9619 instead of multiple_threads field in the TCB.
9621 2003-03-19 Ulrich Drepper <drepper@redhat.com>
9623 * sysdeps/i386/i686/bits/atomic.h: Removed.
9624 * sysdeps/i386/i586/bits/atomic.h: Removed.
9625 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9626 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9627 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9628 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9629 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9630 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9631 * atomic.h: Removed. Moved to glibc.
9633 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9634 support for clock selection.
9636 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9639 2003-03-18 Roland McGrath <roland@redhat.com>
9641 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9642 Add __lll_rel_instr first. Add memory clobber.
9643 (lll_mutex_unlock): Use __lll_test_and_set.
9644 From Paul Mackerras <paulus@samba.org>.
9646 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9648 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9649 (SINGLE_THREAD_P): Add `header.' prefix.
9650 From Paul Mackerras <paulus@samba.org>.
9652 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9653 pthread_timedjoin_np to ...
9654 (libpthread: GLIBC_2.3.3): ... here.
9655 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9657 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9658 Avoid shadowing VAL variable.
9660 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9663 2003-03-18 Ulrich Drepper <drepper@redhat.com>
9665 * Makefile (tests): Add tst-cond11.
9666 * tst-cond11.c: New file.
9668 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9669 struct passed to cleanup handler to eliminate one more
9671 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9673 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9674 (pthrad_cond_t): Replace __unused field with __clock.
9676 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9677 waken all waiters in cleanup handler.
9678 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9679 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9681 * pthread_condattr_getclock.c: New file.
9682 * pthread_condattr_setclock.c: New file.
9683 * sysdeps/pthread/pthread.h: Declare these new functions.
9684 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9685 * Makefile (libpthread-routines): Add the new functions.
9686 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9687 Renamed field to value. Document use of the bits.
9688 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9690 * pthread_condattr_setpshared.c: Likewise.
9691 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9692 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9693 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9695 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9696 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9697 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9698 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9699 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9700 Implement clock selection.
9701 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9702 * pthread-errnos.sym: Add ENOSYS.
9703 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9704 _POSIX_CLOCK_SELECTION.
9705 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9707 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9708 invalid .size directive.
9710 2003-03-17 Roland McGrath <roland@redhat.com>
9712 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9715 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9717 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9718 Use __lll_add instead of spelling it out. Use protected symbol names.
9719 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9721 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9722 Renamed from lll_compare_and_swap. Use new name where necessary.
9723 (__lll_add): Defined.
9724 (__lll_dec_if_positive): Defined.
9725 (__lll_test_and_set): Defined.
9726 * sysdeps/ia64/pthread_spin_init.c: Removed.
9727 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9728 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9729 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9730 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9731 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9732 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9733 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9734 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9735 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9736 __sync_lock_release_si.
9737 Patch by Jakub Jelinek.
9739 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9740 Fix timeout handling.
9741 (__lll_timedwait_tid): Likewise.
9742 (lll_unlock_wake_cb): Wake up other waiters if necessary.
9743 Patch by Jakub Jelinek.
9745 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9747 2003-03-17 Roland McGrath <roland@redhat.com>
9749 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9750 * sysdeps/pthread/pthread_spin_init.c: New file.
9751 * sysdeps/pthread/pthread_spin_unlock.c: New file.
9752 * sysdeps/powerpc/Makefile: New file.
9753 * sysdeps/powerpc/pthread_spin_lock.c: New file.
9754 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9755 * sysdeps/powerpc/pthreaddef.h: New file.
9756 * sysdeps/powerpc/tcb-offsets.sym: New file.
9757 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9758 * sysdeps/powerpc/tls.h: New file.
9759 * sysdeps/powerpc/bits/atomic.h: New file.
9760 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9761 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9762 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9764 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9765 * sysdeps/unix/sysv/linux/sem_post.c: New file.
9766 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9767 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9768 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9769 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9770 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9771 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9772 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9773 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9774 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9775 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9776 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9777 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9778 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9780 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9782 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9783 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9784 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9785 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9786 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9788 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9790 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9791 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9792 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9793 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9794 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9796 2003-03-16 Roland McGrath <roland@redhat.com>
9798 * tst-fork4.c: Include <string.h>.
9799 * tst-signal2.c: Likewise.
9800 * tst-mutex5.c (do_test): exit -> return.
9801 * tst-mutex2.c: Include <stdlib.h>.
9803 2003-03-16 Ulrich Drepper <drepper@redhat.com>
9805 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9806 (__lll_mutex_timedlock_wait): Correct expected value after
9807 spurious wakeup. Otherwise we would never wait again.
9809 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9810 zone versus inline asm stupidity. Use correct instructions.
9812 * tst-rwlock6.c: Add some more status output.
9814 2003-03-15 Roland McGrath <roland@redhat.com>
9816 * sysdeps/pthread/configure.in: New file.
9817 * sysdeps/pthread/configure: New file (generated).
9819 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9821 * allocatestack.c (allocate_stack): Store the exact stack size of
9822 user allocated stacks.
9824 2003-03-15 Jakub Jelinek <jakub@redhat.com>
9826 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9827 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9828 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9829 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9830 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9831 Use `header.' prefix.
9832 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9834 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9836 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9837 __builtin_frame_address, use stack pointer.
9839 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9840 instead of __builtin_frame_pointer.
9842 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9844 * tst-basic1.c (do_test): Add cast to avoid warning.
9845 * tst-basic2.c (do_test): Likewise.
9847 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9848 amount of stack correction.
9850 * tst-fork4.c: Use test-skeleton.c.
9852 2003-03-14 Roland McGrath <roland@redhat.com>
9854 * init.c: Fix typo "#eli" for "#else".
9856 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9858 * allocatestack.c (__stack_user): Use hidden_data_def.
9859 * pthread_create.c (__pthread_keys): Likewise.
9861 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9863 2003-03-14 Roland McGrath <roland@redhat.com>
9865 * tst-fork4.c: New file.
9866 * Makefile (tests): Add it.
9868 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9869 we always define the padding space.
9870 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9871 stopped supporting its own extensions fully.
9872 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9873 struct also called `header', so `header.multiple_threads' is the field
9874 name to use on all machines.
9875 * allocatestack.c (allocate_stack): Use `header.' prefix.
9876 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9877 * pthread_create.c (__pthread_create_2_1): Likewise.
9878 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9879 (THREAD_SELF): Likewise.
9880 * sysdeps/x86_64/tls.h: Likewise.
9881 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9882 (SINGLE_THREAD_P): Likewise.
9883 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9884 (SINGLE_THREAD_P): Likewise.
9885 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9886 (SINGLE_THREAD_P): Likewise.
9888 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9891 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9893 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9894 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9896 * pthread_create.c (start_thread): setjmp is expected to return 0.
9898 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9899 (THREAD_GETMEM_NC): Likewise.
9901 2003-03-13 Ulrich Drepper <drepper@redhat.com>
9903 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9904 and the size of the stack which must be allocated is a multiple,
9905 allocate one more page.
9906 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9907 MULTI_PAGE_ALIASING.
9909 2003-03-13 Roland McGrath <roland@redhat.com>
9911 * pthread_create.c (start_thread): Set EXITING_BIT after the
9912 event-reporting (and destructors), not before.
9914 2003-03-13 Jakub Jelinek <jakub@redhat.com>
9916 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9917 lll_futex_wake): Declare register variables as long int instead of
9918 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9919 Make syscall arguments clobbered by the syscall.
9920 (lll_futex_wait): Define using lll_futex_timed_wait.
9922 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9925 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9928 * allocatestack.c (nptl_ncreated): Only declare if
9929 COLORING_INCREMENT != 0.
9931 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9932 (__libc_enable_asynccancel_2): Remove prototype.
9934 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9935 ctid to match kernel.
9937 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9939 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9940 libc_multiple_threads.
9941 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9942 __libc_multiple_threads to...
9943 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
9945 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9947 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9948 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9950 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9951 (__pthread_once_internal): Define.
9953 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9954 macros instead of .symver directly.
9955 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9956 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9958 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9959 * sysdeps/x86_64/tcb-offsets.sym: New file.
9960 * sysdeps/x86_64/Makefile: New file.
9962 * sysdeps/i386/tcb-offsets.sym: Add SELF.
9963 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9964 to access own pthread_t in TCB.
9965 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9967 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9969 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9971 2003-03-12 Roland McGrath <roland@redhat.com>
9973 * pthread-errnos.sym: New file.
9974 * Makefile (gen-as-const-headers): New variable, list that file.
9975 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9976 header <pthread-errnos.h> instead of defining errno values here.
9977 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9978 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9979 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9980 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9981 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9983 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9985 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9986 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9987 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9988 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9989 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9990 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9991 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9992 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9993 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9994 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9995 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9996 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9997 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9998 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9999 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10000 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10001 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10002 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10003 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10004 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10005 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10006 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10007 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10008 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10009 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10010 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10011 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10013 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10014 CLONE_CHILD_SETTID worked.
10016 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10018 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10020 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10023 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10024 (pthread_cond_t): Add padding.
10026 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10027 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10028 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10030 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10031 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10032 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10033 (__pthread_rwlock_timedrdlock): Likewise.
10034 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10035 (__pthread_rwlock_wrlock): Likewise.
10036 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10037 (__pthread_rwlock_rdlock): Likewise.
10039 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10041 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10042 result of lock re-get if it fails.
10044 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10046 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10047 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10048 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10049 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10050 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10051 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10052 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10053 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10054 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10055 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10057 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10058 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10060 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10061 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10062 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10063 (create_thread): Likewise.
10064 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10065 * init.c (__pthread_initialize_minimal_internal): Initialize
10066 __libc_multiple_threads_ptr if necessary.
10067 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
10068 __pthread_multiple_threads and __libc_multiple_threads_ptr.
10069 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10070 __libc_multiple_threads.
10071 (__libc_pthread_init): Return pointer to __libc_pthread_init if
10074 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10075 (THREAD_SETMEM_NC): Likewise.
10077 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10078 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10079 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10080 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10082 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10083 Eliminate one entire instruction.
10085 * cancellation.c (__pthread_enable_asynccancel_2): New function.
10086 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10087 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10088 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10089 instead of __pthread_enable_asynccancel.
10090 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10091 (__pthread_cond_wait): Likewise.
10092 * sysdeps/pthread/pthread_cond_timedwait.c
10093 (__pthread_cond_timedwait): Likewise.
10094 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10096 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10097 (__condvar_cleanup): Wake up all waiters in case we got signaled
10098 after being woken up but before disabling asynchronous
10100 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10101 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10102 (__condvar_cleanup): Likewise.
10104 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10105 Make it an error if architecture has no #if case. Add x86-64.
10107 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10108 pt-initfini.s generation.
10110 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10111 (TLS_INIT_TP): Fix typo.
10113 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10115 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10116 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10118 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10119 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10120 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10121 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10122 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10123 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10124 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10125 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10127 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10129 * sysdeps/pthread/pthread_cond_timedwait.c
10130 (__pthread_cond_timedwait): Return the result of the final
10131 locking. If it succeeds, the regular function return value.
10133 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10134 Return result of the final locking.
10135 * version.c (__nptl_main): Work around problems with the strange
10136 INTERNAL_SYSCALL macro on ppc32.
10137 * init.c (__pthread_initialize_minimal_internal): Unblock
10138 SIGCANCEL in case the parent blocked it.
10139 Reported by Paul Mackerras <paulus@samba.org>.
10141 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10142 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10143 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10145 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10147 * sysdeps/pthread/pthread_cond_timedwait.c
10148 (__pthread_cond_timedwait): Unlock and fail if
10149 __pthread_mutex_unlock_internal failed.
10151 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10152 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10154 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10155 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10156 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10157 ALLOCATE_STACK): New macros.
10158 (TLS_TPADJ): New macro.
10159 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10160 (allocate_stack): Handle TLS_DTV_AT_TP and
10161 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10162 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10163 Don't set PD->self.
10164 * init.c [__ia64__] (__NR_set_tid_address): Define.
10166 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10167 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10168 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10169 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10170 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10171 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10172 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10173 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10174 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10175 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10176 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10177 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10178 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10179 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10180 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10181 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10182 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10183 * sysdeps/ia64/bits/atomic.h: New file.
10184 * sysdeps/ia64/Makefile: New file.
10185 * sysdeps/ia64/pthread_spin_init.c: New file.
10186 * sysdeps/ia64/pthread_spin_lock.c: New file.
10187 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10188 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10189 * sysdeps/ia64/pthreaddef.h: New file.
10190 * sysdeps/ia64/tcb-offsets.sym: New file.
10191 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10192 * sysdeps/ia64/tls.h: New file.
10194 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10195 to syscall instead of no arguments.
10197 2003-03-10 Ulrich Drepper <drepper@redhat.com>
10199 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10200 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10201 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10202 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10204 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10207 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10209 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10210 lowlevelbarrier.sym.
10211 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10212 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10213 Include lowlevelbarrier.h and don't define offsets locally.
10214 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10216 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10217 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10218 (__lll_mutex_timedlock_wait): Likewise.
10219 (lll_mutex_lock): Adjust asm for that.
10220 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10221 (lll_lock): Adjust asm for operand order change.
10222 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10223 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10225 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10226 Reverse order of parameters.
10227 (__lll_timedwait_tid): Remove regparms attribute.
10228 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10229 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10231 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10232 (__lll_timedwait_tid): Remove one unnecessary instruction.
10234 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10235 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10236 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10239 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10240 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10242 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10245 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10246 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10248 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10249 define LOCK here (if UP is not defined). The actual code is in
10252 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10253 LOCK is already defined. Don't define lll_unlock_wake_cb and
10254 __lll_timedwait_tid for libc.so.
10255 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10256 define LOCK here (if UP is not defined). The actual code is in
10259 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10260 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10261 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10262 instead of lowlevelsem.h.
10263 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10264 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10265 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10267 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10268 lowlevelrwlock.sym.
10269 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10270 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10271 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10273 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10275 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10276 last changed. D'oh.
10278 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10280 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10281 of __libc_locking_needed.
10282 (lll_trylock): Initialize %eax to zero.
10284 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10285 pthread_cond_t definition.
10287 2003-03-10 Roland McGrath <roland@redhat.com>
10289 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10290 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10291 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10292 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10293 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10295 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10296 Instead of setting PD->multiple_threads, set globals
10297 __pthread_multiple_threads and __libc_multiple_threads.
10298 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10299 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10300 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10302 * descr.h (struct pthread): Conditionalize first member on
10303 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10304 containing an anonymous tcbhead_t. Move `list' member out.
10305 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10306 * allocatestack.c: Remove use of `header.data.' prefix.
10307 * pthread_create.c: Likewise.
10308 * init.c (__pthread_initialize_minimal_internal): Likewise.
10309 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10310 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10311 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10312 * sysdeps/x86_64/tls.h: Likewise.
10313 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10314 (SINGLE_THREAD_P): Likewise.
10315 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10316 (SINGLE_THREAD_P): Likewise.
10317 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10318 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10320 2003-03-09 Ulrich Drepper <drepper@redhat.com>
10322 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10324 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10325 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10327 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10328 leftovers from the ia32 code.
10330 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10332 (clear_once_control): Don't load %esi.
10334 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10337 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10339 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10340 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10342 * Makefile (tests): Add tst-cond10.
10343 * tst-cond10.c: New file.
10345 2003-03-08 Ulrich Drepper <drepper@redhat.com>
10347 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10348 * tst-signal3.c (do_test): Likewise.
10349 * tst-sem5.c (do_test): Likewise.
10350 * tst-kill6.c (do_test): Likewise.
10351 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10353 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10355 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10356 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10357 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10358 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10359 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10360 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10361 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10363 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10365 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10366 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10367 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10368 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10369 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10370 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10371 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10372 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10374 * allocatestack.c (allocate_stack): If mprotect() fails free the
10377 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10379 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10381 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10382 lll_wake_tid. This was used only to work around kernel limits in
10384 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10385 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10386 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10387 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10389 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10390 (__pthread_initialize_minimal_internal): Change initialization of
10391 __static_tls_align_m1 appropriately.
10392 * pthreadP.h (__static_tls_align_m1): Renamed from
10393 __static_tls_align.
10394 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10395 instead of __static_tls_align-1.
10397 2003-03-04 Ulrich Drepper <drepper@redhat.com>
10399 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10401 * pthread_create.c: Define __pthread_keys using nocommon
10402 attribute, not by placing it explicitly in bss.
10403 Remove DEFINE_DEALLOC definition. Not needed anymore.
10405 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10406 Use it in mmap call to allocate stacks.
10408 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10410 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10411 result of the thread function.
10413 2003-03-03 Ulrich Drepper <drepper@redhat.com>
10415 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10416 version is just fine.
10418 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10419 (__pthread_child_handler): Renamed from pthread_child_handler,
10420 exported, and marked hidden. Change all users.
10421 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10422 free __pthread_child_handler from child list.
10424 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10426 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10428 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10429 Fix handling of cancellation and failing pthread_mutex_unlock call.
10430 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10431 (__pthread_cond_wait): Likewise.
10433 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10434 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10435 lll_futex_timed_wait call.
10436 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10437 (pthread_rwlock_timedwrlock): Likewise.
10439 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10440 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10441 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10443 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10444 check of lll_futex_wake return value.
10446 2003-03-03 Roland McGrath <roland@redhat.com>
10448 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10450 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10451 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10452 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10454 2003-03-02 Ulrich Drepper <drepper@redhat.com>
10456 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10457 error for CPU clocks.
10459 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10460 _POSIX_MONOTONIC_CLOCK.
10461 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10463 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10466 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10468 * descr.h (struct pthread): Move cleanup field to the front.
10470 2003-03-01 Roland McGrath <roland@redhat.com>
10472 * sem_open.c (sem_open): Braino fix.
10474 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10476 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10477 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10478 __pthread_cleanup_pop functionality.
10479 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10481 * descr.h (struct pthread): Move tid field to the front now that
10484 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10485 (__lll_mutex_timedlock_wait): Remove.
10486 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10487 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10488 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10489 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10490 (lll_unlock_wake_cb): Don't save and restore %esi.
10491 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10493 (__lll_timedwait_tid): Add alignment.
10494 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10495 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10497 (__lll_timedwait_tid): Removed.
10498 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10499 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10500 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10501 (pthread_barrier_wait): Don't save, load, and restore %esi for
10503 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10504 (__pthread_cond_signal): Don't save, load, and restore %esi.
10505 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10506 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10507 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10508 Don't save, load, and restore %esi.
10510 2003-02-27 Ulrich Drepper <drepper@redhat.com>
10512 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10513 Release lock before waking up the waiters.
10515 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10517 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10518 (reader_thread): Likewise.
10520 * sysdeps/pthread/pthread_rwlock_unlock.c
10521 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10522 to wake up readers if there are none.
10524 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10525 Release internal lock before wake threads.
10527 2003-02-26 Ulrich Drepper <drepper@redhat.com>
10529 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10530 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10532 * tst-rwlock9.c: Likewise.
10533 * tst-rwlock10.c: New file.
10534 * tst-rwlock11.c: New file.
10536 * Makefile (tests): Add tst-dlsym1.
10537 * tst-dlsym1.c: New file.
10539 * init.c (__pthread_initialize_minimal_internal): Set
10540 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10541 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10543 2003-02-24 Ulrich Drepper <drepper@redhat.com>
10545 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10547 * tst-cond2.c: Fix sychronization with child.
10549 * tst-rwlock8.c (reader_thread): Remove unused variable.
10551 * Makefile: Add rules to build and run tst-tls3.
10552 * tst-tls3.c: New file.
10553 * tst-tls3mod.c: New file.
10555 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10556 * tst-rwlock8.c: New file.
10557 * tst-rwlock9.c: New file.
10558 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10559 complete broken rwlock implementation.
10560 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10562 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10564 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10565 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10566 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10567 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10568 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10569 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10570 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10572 2003-02-23 Roland McGrath <roland@redhat.com>
10574 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10576 2003-02-23 Ulrich Drepper <drepper@redhat.com>
10578 * Makefile (tests): Add tst-context1.
10579 * tst-context1.c: New file.
10581 * Makefile (tests): Add tst-tls1 and tst-tls2.
10582 * tst-tls1.c: New file.
10583 * tst-tls2.c: New file.
10585 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10586 for failed cmpxchg.
10588 * pthread_create.c (start_thread): Set EXITING_BIT early.
10590 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10591 (THREAD_GETMEM_NC): Likewise.
10593 2003-02-22 Ulrich Drepper <drepper@redhat.com>
10595 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10596 off 3 more bytes by using offset-less instructions when possible.
10598 * Makefile: Add dependency for $(objpfx)version.d.
10600 * eintr.c (eintr_source): Add unnecessary return but the compiler
10603 * tst-kill3.c: Include <unistd.h>.
10605 2003-02-21 Roland McGrath <roland@redhat.com>
10607 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10609 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10611 * Makefile (tests): Add tst-eintr1.
10612 (distribute): Add eintr.c.
10613 * tst-eintr1.c: New file.
10614 * eintr.c: New file.
10616 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10618 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10619 Disallow sending SIGCANCEL.
10621 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
10622 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10623 * tst-kill1.c: New file.
10624 * tst-kill2.c: New file.
10625 * tst-kill3.c: New file.
10626 * tst-kill5.c: New file.
10627 * tst-kill6.c: New file.
10628 * tst-basic7.c: Renamed to...
10629 * tst-kill4.c: ...this.
10631 2003-02-21 Roland McGrath <roland@redhat.com>
10633 * Makefile (install-lib-ldscripts): New variable.
10635 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10637 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10638 * pthread_cancel.c: Use INVALID_TD_P.
10639 * pthread_detach.c: Likewise.
10640 * pthread_getschedparam.c: Likewise.
10641 * pthread_setschedparam.c: Likewise.
10642 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10643 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10644 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10645 * pthread_timedjoin.c: Likewise.
10647 * tst-basic7.c: Include <signal.h>.
10649 * pthread_join.c (pthread_join): Limited checking for invalid
10651 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10653 2003-02-20 Ulrich Drepper <drepper@redhat.com>
10655 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10656 beginning of the loop. Clear the entire first block of TSD.
10657 * Makefile (tests): Add tst-key4.
10658 * tst-key4.c: New file.
10660 2003-02-18 Ulrich Drepper <drepper@redhat.com>
10662 * Makefile (tests): Add tst-basic7.
10663 * tst-basic7.c: New file.
10665 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10666 Add some more __builtin_expect.
10668 * pthreadP.h: Define dummy version of DEBUGGING_P.
10670 2003-02-17 Ulrich Drepper <drepper@redhat.com>
10672 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10673 _POSIX_THREAD_PRIORITY_SCHEDULING.
10674 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10675 _XOPEN_REALTIME_THREADS.
10676 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10678 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10679 kernel returns EINVAL for PID <= 0, work around it.
10681 * Makefile (tests): Add tst-signal5.
10682 * tst-signal5.c: New file.
10684 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10685 and LOGIN_NAME_MAX.
10687 * tst-cancel1.c (tf): Block all signals.
10689 * Makefile (tests): Add tst-basic6.
10690 * tst-basic6.c: New file.
10692 * tst-basic1.c: Add test for process ID.
10694 * Makefile (tests): Add tst-cancel10.
10695 * tst-cancel10.c: New file.
10697 * Makefile (tests): Add tst-signal4.
10698 * tst-signal4.c: New file.
10700 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10701 __sigismember instead of sigismember. Add __builtin_expect.
10703 2003-02-16 Ulrich Drepper <drepper@redhat.com>
10705 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10706 pthread_setcancelstate, and pthread_rwlock_setpshared.
10708 * tst-cancel7.c (do_test): Make sure the pid file exists before
10709 canceling the thread.
10711 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10712 pthread_rwlock_timedrdlock tests.
10713 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10714 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10715 Check for invalid tv_nsec field.
10716 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10719 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10720 recursive mutex of overflow.
10722 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10724 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10725 going into an endless loop.
10726 * Makefile (tests): Add tst-cancel9.
10727 * tst-cancel9.c: New file.
10729 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10731 2003-02-15 Ulrich Drepper <drepper@redhat.com>
10733 * tst-mutex5.c (do_test): Add more timedlock tests.
10735 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10736 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10738 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10739 use INLINE_SYSCALL. Error number is returned, not -1.
10741 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10742 and __deallocate_stack with internal_function.
10743 * pthread_create.c: Adjust definitions appropriately.
10744 * allocatestack.c: Likewise.
10746 * pthread_join.c: Add one more __builtin_expect.
10747 * pthread_timedjoin.c: Likewise.
10749 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10750 not data of sequence number does not match.
10751 Add one __builtin_expect.
10753 * Makefile (tests): Add tst-clock1.
10754 * tst-clock1.c: New file.
10756 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10757 negative arguments.
10758 * Makefile (tests): Add tst-basic5.
10759 * tst-basic5.c: New file.
10761 2003-02-14 Ulrich Drepper <drepper@redhat.com>
10763 * Makefile (tests): Add tst-basic4.
10764 * tst-basic4.c: New file.
10766 * pthreadP.h: Add declaraction for __nptl_nthreads.
10767 * pthread_create.c: Define __nptl_nthreads
10768 (start_thread): Increment __nptl_nthreads at beginning. Decrement
10769 after thread is done. If then zero, call exit(0).
10770 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10771 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
10772 * init.c (pthread_functions): Initialize ptr_nthreads.
10773 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10774 (__reclaim_stacks): Decrement __nptl_nthreads.
10775 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10777 * Makefile (tests): Add tst-basic3.
10778 * tst-basic3.c: New file.
10780 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
10781 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
10782 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10783 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
10784 if asynchronous canceling is enabled.
10785 * pthread_join.c (pthread_join): When recognizing circular joins,
10786 take into account the other thread might be already canceled.
10787 * Makefile (tests): Add tst-join5.
10788 * tst-join5.c: New file.
10790 * Makefile (tests): Add tst-join4.
10791 * tst-join4.c: New file.
10793 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10795 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10797 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
10799 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10800 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10801 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10803 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10805 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10806 error if lll_futex_wake failed.
10808 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10810 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10811 handling of cancellation and failung pthread_mutex_unlock call.
10812 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10813 * Makefile (tests): Add tst-cond8 and tst-cond9.
10814 * tst-cond8.c: New file.
10815 * tst-cond9.c: New file.
10817 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10819 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10820 non-standard initializers with __USE_GNU.
10822 * Makefile (tests): Add tst-cleanup3.
10823 * tst-cleanup3.c: New file.
10825 2003-02-12 Ulrich Drepper <drepper@redhat.com>
10827 * Makefile (tests): Add tst-attr1 and tst-attr2.
10828 * tst-attr1.c: New file.
10829 * tst-attr2.c: New file.
10831 * Makefile: Add rules to build and run tst-atfork2 test.
10832 * tst-atfork2.c: New file.
10833 * tst-atfork2mod.c: New file.
10835 * sysdeps/unix/sysv/linux/unregister-atfork.c
10836 (__unregister_atfork): Free the memory allocated for the handlers
10837 after removing them from the lists.
10839 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10842 * tst-atfork1.c (do_test): Wait for the child we forked.
10843 Report error in child.
10845 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10847 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10849 2003-02-10 Ulrich Drepper <drepper@redhat.com>
10851 * Makefile (tests): Add tst-cancel8.
10852 * tst-cancel8.c: New file.
10854 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10855 clearing of control variable.
10856 * Makefile (tests): Add tst-once3 and tst-once4.
10857 * tst-once3.c: New file.
10858 * tst-once4.c: New file.
10860 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10862 * sysdeps/sh/Makefile: New file.
10863 * sysdeps/sh/bits/atomic.h: New file.
10864 * sysdeps/sh/pthread_spin_init.c: New file.
10865 * sysdeps/sh/pthread_spin_lock.c: New file.
10866 * sysdeps/sh/pthread_spin_trylock.S: New file.
10867 * sysdeps/sh/pthread_spin_unlock.S: New file.
10868 * sysdeps/sh/pthreaddef.h: New file.
10869 * sysdeps/sh/tcb-offsets.sym: New file.
10870 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10871 * sysdeps/sh/tls.h: New file.
10872 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10873 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10874 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10875 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10876 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10877 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10878 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10879 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10880 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10881 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10882 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10883 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10884 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10885 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10886 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10887 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10888 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10889 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10890 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10891 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10892 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10893 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10894 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10895 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10896 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10897 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10898 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10899 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10900 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10901 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10903 2003-02-08 Ulrich Drepper <drepper@redhat.com>
10905 * tst-cond2.c: Rearrange code to not rely on behavior undefined
10906 according to POSIX.
10908 * tst-basic2.c (do_test): Lock mutex before creating the thread.
10910 2003-02-07 Ulrich Drepper <drepper@redhat.com>
10912 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10913 (TLS_GET_FS): New #define.
10914 (TLS_SET_FS): New #define.
10915 Correct value of __NR_set_thread_area.
10917 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10919 2003-02-06 Ulrich Drepper <drepper@redhat.com>
10921 * Makefile (tests): Add tst-popen1.
10922 * tst-popen1.c: New file.
10924 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10925 but inactive generalization.
10926 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10927 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10928 Minor optimization, remove one instruction.
10929 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10931 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
10933 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10935 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
10937 * init.c (__NR_set_tid_address): Add #ifdef for s390.
10938 * sysdeps/pthread/pthread_barrier_wait.c: New file.
10939 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10940 * sysdeps/pthread/pthread_cond_signal.c: New file.
10941 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10942 * sysdeps/pthread/pthread_cond_wait.c: New file.
10943 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10944 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10945 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10946 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10947 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10948 * sysdeps/s390/Makefile: New file.
10949 * sysdeps/s390/bits/atomic.h: New file.
10950 * sysdeps/s390/pthread_spin_init.c: New file.
10951 * sysdeps/s390/pthread_spin_lock.c: New file.
10952 * sysdeps/s390/pthread_spin_trylock.c: New file.
10953 * sysdeps/s390/pthread_spin_unlock.c: New file.
10954 * sysdeps/s390/pthreaddef.h: New file.
10955 * sysdeps/s390/tcb-offsets.sym: New file.
10956 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10957 * sysdeps/s390/tls.h: New file.
10958 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10959 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10960 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10961 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10962 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10963 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10964 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10965 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10966 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10967 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10968 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10969 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10970 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10971 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10972 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10973 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10974 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10975 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10976 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10977 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10978 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10979 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10980 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10982 2003-02-04 Ulrich Drepper <drepper@redhat.com>
10984 * atomic.h: Add a couple more default implementations.
10985 (atomic_compare_and_exchange_acq): Use
10986 __arch_compare_and_exchange_32_acq in return value definition. It
10988 (atomic_bit_set): Renamed from atomic_set_bit.
10989 Add missing atomic_ prefixes.
10991 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10992 thread library is available, use correct value to mark initialized
10995 2003-02-03 Ulrich Drepper <drepper@redhat.com>
10997 * allocatestack.c (allocate_stack): Use __getpagesize instead of
10998 __sysconf to determine pagesize.
11000 * pthread_create.c: Include <atomic.h>.
11001 * allocatestack.c (allocate_stack): Implement coloring of the
11002 allocated stack memory. Rename pagesize to pagesize_m1. It's the
11003 size minus one. Adjust users.
11004 * sysdeps/i386/i686/Makefile: New file.
11006 2003-02-02 Ulrich Drepper <drepper@redhat.com>
11008 * allocatestack.c: Improve comment throughout the file.
11010 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11011 (__lll_lock_wait): Add branch prediction.
11012 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11013 (__lll_lock_wait): Likewise.
11014 (lll_unlock_wake_cb): Removed.
11016 2003-01-31 Ulrich Drepper <drepper@redhat.com>
11018 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11019 _POSIX_THREAD_PRIORITY_SCHEDULING.
11021 2003-01-30 Jakub Jelinek <jakub@redhat.com>
11023 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11024 Fix return type of ptr___pthread_getspecific.
11026 2003-01-29 Ulrich Drepper <drepper@redhat.com>
11028 * Makefile (tests): Add tst-umask1.
11029 (tst-umask1-ARGS): Define.
11030 * tst-umask1.c: New file.
11032 2003-01-28 Ulrich Drepper <drepper@redhat.com>
11034 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
11035 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11036 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11037 pthread_rwlock_unlock.
11038 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11039 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11040 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11041 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11042 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11044 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11045 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11047 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11048 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11049 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11051 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11052 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11054 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11055 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11056 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11058 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11059 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11061 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11063 * Makefile (libpthread-routines): Remove lowlevelcond and
11064 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11065 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11066 and pthread_cond_broadcast.
11067 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11068 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11069 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11070 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11071 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11072 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11073 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11074 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11075 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11076 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11077 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11078 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11079 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11080 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11081 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11082 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11083 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11084 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11085 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11086 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11087 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11088 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11089 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11090 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11091 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11092 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11093 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11094 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11095 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11096 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11097 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11099 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11100 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11101 of the code is moved to ...
11102 * sysdeps/pthread/createthread.c: ...here. New file.
11104 2003-01-27 Ulrich Drepper <drepper@redhat.com>
11106 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11107 (__new_sem_post): Clear %eax before returning.
11108 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11110 * Makefile (tests): Add tst-cleanup2.
11111 * tst-cleanup2.c: New file.
11113 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11114 Interpret first parameter correctly.
11116 2003-01-17 Ulrich Drepper <drepper@redhat.com>
11118 * Makefile (headers): Add bits/semaphore.h.
11120 2003-01-16 Jakub Jelinek <jakub@redhat.com>
11122 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11125 2003-01-14 Ulrich Drepper <drepper@redhat.com>
11127 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11128 must be used and mapping failed.
11129 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11131 * Makefile (CFLAGS-pthread_self.os): Define this, not
11132 CFLAGS-pthread_self.c.
11134 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11136 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11137 lll_unlock_wake_cb.
11139 * Makefile (libpthread-routines): Add version. Add rules to build
11140 version.os and banner.h.
11141 * version.c: New file.
11143 2003-01-13 Jakub Jelinek <jakub@redhat.com>
11145 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11146 the alias unconditional.
11147 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11149 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11151 * Makefile (CFLAGS-pthread_self.c): New definition.
11153 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11155 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11156 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11157 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11158 * init.c (__pthread_initialize_minimal_internal): Likewise.
11160 2003-01-07 Jakub Jelinek <jakub@redhat.com>
11162 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11164 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11165 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11166 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11167 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11168 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11169 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11171 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11173 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11174 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11175 * tst-cancel-wrappers.sh: Remove all exceptions.
11177 2003-01-05 Ulrich Drepper <drepper@redhat.com>
11179 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11180 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11182 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11183 Use __libc_pthread_functions array if SHARED.
11185 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11186 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11188 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11189 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11190 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11191 __libc_ptf_call instead of __libc_maybe_call.
11192 (PTF): New #define.
11193 (__libc_cleanup_region_start): Wrap function name with PTF call.
11194 (__libc_cleanup_region_end): Likewise.
11195 (__libc_cleanup_end): Likewise.
11197 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11198 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11199 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11200 * pthreadP.h: Add prototypes.
11202 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11203 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11204 __pthread_rwlock_unlock aliases.
11205 * pthreadP.h: Add prototypes for new aliases.
11207 * pthreadP.h (struct pthead_functions): Moved to...
11208 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11209 * init.c (pthread_functions): Add initializers for new elements.
11211 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11212 __pthread_cleanup_pop_restore aliases.
11213 * pthreadP.h: Add prototypes.
11215 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11216 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11217 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11218 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11219 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11220 * pthreadP.h: Adjust prototypes and callers.
11222 2003-01-04 Ulrich Drepper <drepper@redhat.com>
11224 * Makefile (tests): Add tst-cancel7.
11225 (tst-cancel7-ARGS): New variable.
11226 * tst-cancel7.c: New file.
11228 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11229 around gcc defficiencies.
11230 * old_pthread_cond_signal.c: Likewise.
11231 * old_pthread_cond_timedwait.c: Likewise.
11232 * old_pthread_cond_wait.c: Likewise.
11234 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11236 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11238 * Makefile (tests): Add tst-cond7.
11239 * tst-cond7.c: New file.
11241 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11242 (condvar_cleanup): Get condvar address from the right place.
11244 * atomic.h: Correct definitions of atomic_full_barrier,
11245 atomic_read_barrier, atomic_write_barrier.
11247 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11249 * old_pthread_cond_signal.c: Likewise.
11250 * old_pthread_cond_timedwait.c: Likewise.
11251 * old_pthread_cond_wait.c: Likewise.
11253 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11255 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11257 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11259 * pthreadP.h (pthread_cond_2_0_t): New type.
11260 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11261 Use new type for the 2.0 condvar function prototypes.
11262 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11263 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11265 * old_pthread_cond_destroy.c: Likewise.
11266 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11267 * old_pthread_cond_signal.c: Likewise.
11268 * old_pthread_cond_timedwait.c: Likewise.
11269 * old_pthread_cond_wait.c: Likewise.
11271 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11272 (__pthread_cond_wait): Don't save cancellation mode and seq value
11275 * herrno.c (__h_errno_location): Don't define as weak.
11277 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11279 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11280 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11281 and pthread_cond_wait.
11282 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11284 (__pthread_cond_broadcast_2_0): ... this.
11285 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11287 (__pthread_cond_destroy_2_0): ... this.
11288 * old_pthread_cond_init.c (__old_pthread_cond_init):
11290 (__pthread_cond_init_2_0): ... this.
11291 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11293 (__pthread_cond_signal_2_0): ... this.
11294 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11296 (__pthread_cond_wait_2_0): ... this.
11297 * pthread_cond_destroy.c: Include shlib-compat.h.
11298 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11299 * pthread_cond_init.c: Include shlib-compat.h.
11300 (pthread_cond_init): Change strong_alias into versioned_symbol.
11301 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11302 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11304 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11305 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11306 __pthread_cond_wait_2_0): New prototypes.
11307 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11308 __old_pthread_cond_init, __old_pthread_cond_signal,
11309 __old_pthread_cond_wait): Removed.
11310 * init.c: Include shlib-compat.h.
11311 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11312 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11313 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11314 ptr___pthread_cond_*_2_0 fields.
11315 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11316 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11318 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11319 LIBC_SIGACTION was not yet defined.
11320 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11321 [!defined LIBC_SIGACTION] (__sigaction): New function and
11323 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11324 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11326 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11328 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11330 2003-01-02 Ulrich Drepper <drepper@redhat.com>
11332 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11333 New, larger type definition.
11334 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11336 * Versions [libpthread]: Add definitions for new pthread_cond_*
11337 interfaces for version GLIBC_2.3.2.
11338 * pthread_cond_init.c: Update initialization for new type definition.
11339 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11340 pthread_cond_timedwait, pthread_cond_signal, and
11341 pthread_cond_broadcast. Add old_pthread_cond_init,
11342 old_pthread_cond_destroy, old_pthread_cond_wait,
11343 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11344 old_pthread_cond_broadcast.
11345 * old_pthread_cond_broadcast.c: New file.
11346 * old_pthread_cond_destroy.c: New file.
11347 * old_pthread_cond_init.c: New file.
11348 * old_pthread_cond_signal.c: New file.
11349 * old_pthread_cond_timedwait.c: New file.
11350 * old_pthread_cond_wait.c: New file.
11351 * pthreadP.h: Add prototypes for the compatibility interfaces.
11353 * pthread_cond_destroy.c: Don't include <errno.h>.
11355 2003-01-01 Ulrich Drepper <drepper@redhat.com>
11357 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11358 unnecessary zero offset when addressing MUTEX.
11360 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11362 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11364 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11365 for __register_atfork.
11367 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11369 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11370 instead of ASSEMBLER test macro.
11372 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11373 __libc_current_sigrtmax): Add libc_hidden_def.
11375 * sysdeps/pthread/list.h: Remove assert.h include.
11377 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11379 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11380 __pthread_initialize_minimal_internal not
11381 __pthread_initialize_minimal.
11383 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11385 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11386 __pthread_initialize_minimal as hidden.
11388 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11391 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11393 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11394 $(common-objpfx)format.lds, include that into the output script.
11396 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11398 2002-12-28 Andreas Jaeger <aj@suse.de>
11400 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11401 nsec resolution changes.
11402 (xstat64_conv): Likewise.
11403 (xstat32_conv): Likewise.
11404 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11405 struct kernel_stat.
11406 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11407 structs stat and stat64.
11408 * time/time.h (__timespec_defined): Define for __USE_MISC.
11409 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11411 2002-12-30 Jakub Jelinek <jakub@redhat.com>
11413 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11415 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11416 (pthread_exit): Use strong_alias to avoid warnings.
11417 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11418 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11419 ptr___pthread_attr_init_2_*.
11420 * init.c (pthread_functions): Adjust.
11422 2002-12-29 Ulrich Drepper <drepper@redhat.com>
11424 * forward.c: Make all functions available by default again. It
11425 caused too much trouble.
11427 * pt-siglongjmp.c: Removed.
11429 2002-12-28 Jakub Jelinek <jakub@redhat.com>
11431 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11432 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11433 * sysdeps/i386/Makefile: New file.
11434 * sysdeps/i386/tcb-offsets.sym: New file.
11435 * sysdeps/pthread/tcb-offsets.h: New file.
11436 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11437 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11439 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11440 __register_atfork...
11441 (GLIBC_2.3.2): ...here.
11443 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11445 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11446 pthread_attr_setstackaddr with __attribute_deprecated__.
11448 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11450 * pt-system.c (system): Remove cancellation handling.
11451 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11452 cancellation routines.
11454 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11456 * descr.h: Include <dl-sysdep.h>.
11457 (struct pthread): Move header.data.list to the back of the struct.
11458 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11459 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11460 (SYSINFO_OFFSEET): Likewise.
11462 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11464 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11466 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11467 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11468 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11469 (USE_DL_SYSINFO): Undef.
11471 2002-12-22 Jakub Jelinek <jakub@redhat.com>
11473 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11474 $(common-objpfx)libc.so.
11475 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11476 it is bigger than pipe buffer size even on arches with bigger
11478 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11480 2002-12-25 Ulrich Drepper <drepper@redhat.com>
11482 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11483 correct errno access for case that USE___THREAD is not defined.
11485 2002-12-24 Ulrich Drepper <drepper@redhat.com>
11487 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11488 Patch by Marijn Ros <marijn@mad.scientist.com>.
11490 2002-12-22 Roland McGrath <roland@redhat.com>
11492 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11494 2002-12-20 Ulrich Drepper <drepper@redhat.com>
11496 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11498 2002-12-19 Ulrich Drepper <drepper@redhat.com>
11500 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11501 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11502 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11504 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11506 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11507 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11508 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11509 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11510 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11511 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11512 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11513 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11515 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11517 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11519 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11521 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11523 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11524 that sysinfo is properly initialized.
11525 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11526 to 1 only for ld.so.
11528 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11529 RTLD_CORRECT_DYNAMIC_WEAK.
11531 2002-12-19 Jakub Jelinek <jakub@redhat.com>
11533 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11534 Use return 0 as 6th argument to FORWARD4.
11535 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11537 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11539 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11540 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11541 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11542 (INIT_SYSINFO): New #define.
11543 (TLS_TP_INIT): Use INIT_SYSINFO.
11544 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11545 At test to make sure SYSINFO_OFFSET value is correct.
11546 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11548 2002-12-18 Jakub Jelinek <jakub@redhat.com>
11550 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11551 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11552 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11553 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11554 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11555 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11556 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11558 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11560 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11561 macro instead of using int $0x80 directly.
11563 * sysdeps/pthread/bits/stdio-lock.h: New file.
11564 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11565 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11566 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11567 * Makefile (routines): Add libc-lowlevelmutex.
11569 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11570 __i686.get_pc_thunk.dx.
11572 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11574 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11575 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11576 ($(objpfx)tst-cancel-wrappers.out): New rule.
11577 * tst-cancel-wrappers.sh: New test.
11578 * tst-locale1.c: Include signal.h.
11579 (uselocale): Test static linking of __libc_current_sigrt*.
11581 2002-12-17 Ulrich Drepper <drepper@redhat.com>
11583 * Makefile (tests): Add tst-cancel6.
11584 * tst-cancel6.c: New file
11586 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11588 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11589 Define meaningfully for assembler as well.
11590 * pthreadP.h (struct pthread_functions): Remove
11591 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11592 and ptr_pthread_attr_init_2_1 fields.
11593 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11594 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11595 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11596 (FORWARD3): Define using FORWARD4.
11597 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11599 * pt-system.c: Remove duplicate stdlib.h include.
11601 2002-12-16 Ulrich Drepper <drepper@redhat.com>
11603 * sem_init.c: Define sem_init@GLIBC_2.0.
11604 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11605 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11607 * flockfile.c: Moved to...
11608 * sysdeps/pthread/flockfile.c: ...here. New file.
11609 * funlockfile.c: Moved to...
11610 * sysdeps/pthread/funlockfile.c: ...here. New file.
11611 * ftrylockfile.c: Moved to...
11612 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11614 2002-12-16 Jakub Jelinek <jakub@redhat.com>
11616 * libc-cancellation.c: Guard both function with
11617 #if !defined NOT_IN_libc.
11618 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11619 automatically provided pthread wrappers.
11620 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11621 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11623 * pt-open.c: Removed.
11624 * pt-fcntl.c: Removed.
11625 * pt-fsync.c: Removed.
11626 * pt-lseek.c: Removed.
11627 * pt-msgrcv.c: Removed.
11628 * pt-msgsnd.c: Removed.
11629 * pt-msync.c: Removed.
11630 * pt-nanosleep.c: Removed.
11631 * pt-open64.c: Removed.
11632 * pt-pause.c: Removed.
11633 * pt-pread.c: Removed.
11634 * pt-pread64.c: Removed.
11635 * pt-pwrite.c: Removed.
11636 * pt-pwrite64.c: Removed.
11637 * pt-read.c: Removed.
11638 * pt-recv.c: Removed.
11639 * pt-recvfrom.c: Removed.
11640 * pt-recvmsg.c: Removed.
11641 * pt-send.c: Removed.
11642 * pt-sendto.c: Removed.
11643 * pt-sigtimedwait.c: Removed.
11644 * pt-sigwait.c: Removed.
11645 * pt-wait.c: Removed.
11646 * pt-waitpid.c: Removed.
11647 * pt-write.c: Removed.
11648 * pt-accept.c: Removed.
11649 * pt-close.c: Removed.
11650 * pt-connect.c: Removed.
11651 * pt-lseek64.c: Removed.
11652 * pt-sendmsg.c: Removed.
11653 * pt-tcdrain.c: Removed.
11655 2002-12-15 Ulrich Drepper <drepper@redhat.com>
11657 * init.c (__pthread_initialize_minimal_internal): Renamed from
11658 __pthread_initialize_minimal. Make old name an alias. This
11659 converts a normal relocation into a relative relocation.
11661 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11663 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11664 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11665 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11666 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11667 pt-sigwaitinfo, pt-waitid, and pt-writev.
11668 * pt-creat.c: Removed.
11669 * pt-poll.c: Removed.
11670 * pt-pselect.c: Removed.
11671 * pt-readv.c: Removed.
11672 * pt-select.c: Removed.
11673 * pt-sigpause.c: Removed.
11674 * pt-sigsuspend.c: Removed.
11675 * pt-sigwaitinfo.c: Removed.
11676 * pt-waitid.c: Removed.
11677 * pt-writev.c: Removed.
11679 * init.c (pthread_functions): New variable.
11680 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11681 (or NULL) to __libc_pthread_init.
11682 * forward.c: Rewrite to use __libc:pthread_functions array to get
11683 function addresses.
11684 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11686 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11687 Take new parameter. Copy content of variable pointed to by it
11688 to __libc_pthread_init.
11690 * pthreadP.h (struct pthread_functions): New type.
11691 (__libc_pthread_init): Declare.
11693 * pthread_attr_destroy.c: Add namespace protected alias.
11694 * pthread_attr_getdetachstate.c: Likewise.
11695 * pthread_attr_getinheritsched.c: Likewise.
11696 * pthread_attr_getschedparam.c: Likewise.
11697 * pthread_attr_getschedpolicy.c: Likewise.
11698 * pthread_attr_getscope.c: Likewise.
11699 * pthread_attr_setdetachstate.c: Likewise.
11700 * pthread_attr_setinheritsched.c: Likewise.
11701 * pthread_attr_setschedparam.c: Likewise.
11702 * pthread_attr_setschedpolicy.c: Likewise.
11703 * pthread_attr_setscope.c: Likewise.
11704 * pthread_cond_broadcast.c: Likewise.
11705 * pthread_cond_destroy.c: Likewise.
11706 * pthread_cond_init.c: Likewise.
11707 * pthread_cond_signal.c: Likewise.
11708 * pthread_cond_wait.c: Likewise.
11709 * pthread_condattr_destroy.c: Likewise.
11710 * pthread_condattr_init.c: Likewise.
11711 * pthread_equal.c: Likewise.
11712 * pthread_exit.c: Likewise.
11713 * pthread_getschedparam.c: Likewise.
11714 * pthread_self.c: Likewise.
11715 * pthread_setcancelstate.c: Likewise.
11716 * pthread_setschedparam.c: Likewise.
11717 * pthread_mutex_destroy.c: Likewise.
11718 * pthread_mutex_init.c: Likewise.
11719 * pthreadP.h: Add prototypes for the aliases.
11721 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11722 multiple_threads member in correct TCB to 1.
11724 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11725 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11726 member of thread decriptor, otherwise return unconditionally 1.
11728 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11730 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11731 regular Linux version. Remove file.
11732 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11733 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11734 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11735 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11736 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11737 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11738 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11739 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11740 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11741 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
11742 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
11743 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
11744 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
11745 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
11746 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
11747 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
11748 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
11749 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
11750 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
11751 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
11752 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
11753 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
11754 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
11755 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
11756 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
11757 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
11758 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
11759 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
11760 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
11761 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
11763 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11765 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11766 * sysdeps/unix/sysv/linux/open.c: Removed.
11767 * sysdeps/unix/sysv/linux/fsync.c: Removed.
11768 * sysdeps/unix/sysv/linux/lseek.c: Removed.
11769 * sysdeps/unix/sysv/linux/msync.c: Removed.
11770 * sysdeps/unix/sysv/linux/read.c: Removed.
11771 * sysdeps/unix/sysv/linux/close.c: Removed.
11772 * sysdeps/unix/sysv/linux/creat.c: Removed.
11773 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11774 * sysdeps/unix/sysv/linux/pause.c: Removed.
11775 * sysdeps/unix/sysv/linux/select.c: Removed.
11776 * sysdeps/unix/sysv/linux/write.c: Removed.
11778 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11780 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11781 element in TCB to see whether locking is needed.
11783 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11784 MULTIPLE_THREADS_OFFSET value is correct.
11786 * sysdeps/unix/sysv/linux/close.c: New file.
11787 * sysdeps/unix/sysv/linux/connect.S: New file.
11788 * sysdeps/unix/sysv/linux/creat.c: New file.
11789 * sysdeps/unix/sysv/linux/fsync.c: New file.
11790 * sysdeps/unix/sysv/linux/llseek.c: New file.
11791 * sysdeps/unix/sysv/linux/lseek.c: New file.
11792 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11793 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11794 * sysdeps/unix/sysv/linux/msync.c: New file.
11795 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11796 * sysdeps/unix/sysv/linux/open.c: New file.
11797 * sysdeps/unix/sysv/linux/open64.c: New file.
11798 * sysdeps/unix/sysv/linux/pause.c: New file.
11799 * sysdeps/unix/sysv/linux/poll.c: New file.
11800 * sysdeps/unix/sysv/linux/pread.c: New file.
11801 * sysdeps/unix/sysv/linux/pread64.c: New file.
11802 * sysdeps/unix/sysv/linux/pselect.c: New file.
11803 * sysdeps/unix/sysv/linux/pwrite.c: New file.
11804 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11805 * sysdeps/unix/sysv/linux/readv.c: New file.
11806 * sysdeps/unix/sysv/linux/recv.S: New file.
11807 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11808 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11809 * sysdeps/unix/sysv/linux/select.c: New file.
11810 * sysdeps/unix/sysv/linux/send.S: New file.
11811 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11812 * sysdeps/unix/sysv/linux/sendto.S: New file.
11813 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11814 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11815 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11816 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11817 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11818 * sysdeps/unix/sysv/linux/system.c: New file.
11819 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11820 * sysdeps/unix/sysv/linux/wait.c: New file.
11821 * sysdeps/unix/sysv/linux/waitid.c: New file.
11822 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11823 * sysdeps/unix/sysv/linux/writev.c: New file.
11824 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11826 * pt-readv.c: Fix comment.
11828 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11830 * tst-cleanup1.c: Include stdlib.h.
11832 * tst-cancel5.c: New test.
11833 * Makefile (tests): Add tst-cancel5.
11834 (tst-cancel5): Link against libc.so libpthread.so in that order.
11836 2002-12-13 Ulrich Drepper <drepper@redhat.com>
11838 * forward.c (test_loaded): Prevent recursive calls.
11840 * Makefile (routines): Add libc-cancellation.
11841 * libc-cancellation.c: New file.
11842 * descr.h (struct pthread): Add multiple_threads field.
11843 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11844 new thread descriptor to 1.
11845 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11846 Initialize multiple_thread field after successful thread creation.
11847 * cancellation.c (__do_cancel): Move to pthreadP.h.
11848 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11849 (__pthread_disable_asynccancel): Add internal_function attribute.
11850 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11851 * pthread_setcancelstate.c: Likewise.
11852 * pthread_setcanceltype.c: Likewise.
11853 * pthread_exit.c: Likewise.
11854 * pthreadP.h (CANCELLATION_P): Likewise.
11855 (__do_cancel): Define as static inline.
11856 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11857 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11859 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11860 fields. Define MULTIPLE_THREADS_OFFSET.
11861 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11863 * sysdeps/unix/sysv/linux/accept.S: New file.
11864 * sysdeps/unix/sysv/linux/read.c: New file.
11865 * sysdeps/unix/sysv/linux/write.c: New file.
11866 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11867 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11868 initialization of __libc_locking_needed.
11869 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11870 __libc_locking_needed, use multiple_threads field in TCB.
11871 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11873 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11875 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11877 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11879 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11880 access to __libc_locking_needed for PIC.
11882 2002-12-12 Jakub Jelinek <jakub@redhat.com>
11884 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11885 declare for libc.so.
11886 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11888 (__libc_lock_lock): Put into statement expression.
11889 (__libc_lock_unlock): Remove trailing semicolon.
11890 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11892 2002-12-12 Roland McGrath <roland@redhat.com>
11894 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11895 "m" constraint to refer to __libc_locking_needed. Declare it here.
11897 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11899 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11900 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11901 Initialize __libc_locking_needed.
11902 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11903 instead of __register_pthread_fork_handler.
11904 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11905 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11906 fork-gen with libc_pthread_init.
11907 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11908 of __register_pthread_fork_handler.
11909 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11910 of __register_pthread_fork_handler.
11911 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11912 __libc_locking_needed to determine whether lock prefix can be avoided.
11913 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11915 2002-12-11 Ulrich Drepper <drepper@redhat.com>
11917 * Makefile (tests): Add tst-cleanup1.
11918 * tst-cleanup1.c: New file.
11919 * cancellation.c (__cleanup_thread): Removed.
11920 (__do_cancel): Remove call to __cleanup_thread.
11921 * pthreadP.h: Remove __cleanup_thread prorotype.
11923 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11924 Remember function and argument even if cancellation handler
11925 function is not available.
11926 (__libc_cleanup_region_end): Execute registered function directly if
11927 pthread functions are not available.
11928 (__libc_cleanup_end): Likewise.
11930 * init.c (__pthread_initialize_minimal): Fix initialization in
11931 static lib by preventing gcc from being too clever.
11933 2002-12-10 Ulrich Drepper <drepper@redhat.com>
11935 * init.c (__pthread_initialize_minimal): Remove unneccesary
11938 * Makefile (tests): We can run tst-locale2 now.
11940 2002-12-09 Ulrich Drepper <drepper@redhat.com>
11942 * Versions: Remove duplicated sigwait entry.
11944 2002-12-08 Ulrich Drepper <drepper@redhat.com>
11946 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11949 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11951 * pthreadP.h: Declare __pthread_enable_asynccancel and
11952 __pthread_disable_asynccancel.
11953 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11954 (CANCEL_RESET): Use __pthread_disable_asynccancel.
11955 * cancellation.c (__pthread_enable_asynccancel): New function.
11956 (__pthread_disable_asynccancel): New function.
11957 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11958 * pt-close.c: Likewise.
11959 * pt-connect.c: Likewise.
11960 * pt-creat.c: Likewise.
11961 * pt-fcntl.c: Likewise.
11962 * pt-fsync.c: Likewise.
11963 * pt-lseek.c: Likewise.
11964 * pt-lseek64.c: Likewise.
11965 * pt-msgrcv.c: Likewise.
11966 * pt-msgsnd.c: Likewise.
11967 * pt-msync.c: Likewise.
11968 * pt-nanosleep.c: Likewise.
11969 * pt-open.c: Likewise.
11970 * pt-open64.c: Likewise.
11971 * pt-pause.c: Likewise.
11972 * pt-poll.c: Likewise.
11973 * pt-pread.c: Likewise.
11974 * pt-pread64.c: Likewise.
11975 * pt-pselect.c: Likewise.
11976 * pt-pwrite.c: Likewise.
11977 * pt-pwrite64.c: Likewise.
11978 * pt-read.c: Likewise.
11979 * pt-readv.c: Likewise.
11980 * pt-recv.c: Likewise.
11981 * pt-recvfrom.c: Likewise.
11982 * pt-recvmsg.c: Likewise.
11983 * pt-select.c: Likewise.
11984 * pt-send.c: Likewise.
11985 * pt-sendmsg.c: Likewise.
11986 * pt-sendto.c: Likewise.
11987 * pt-sigpause.c: Likewise.
11988 * pt-sigsuspend.c: Likewise.
11989 * pt-sigtimedwait.c: Likewise.
11990 * pt-sigwait.c: Likewise.
11991 * pt-sigwaitinfo.c: Likewise.
11992 * pt-system.c: Likewise.
11993 * pt-tcdrain.c: Likewise.
11994 * pt-wait.c: Likewise.
11995 * pt-waitid.c: Likewise.
11996 * pt-waitpid.c: Likewise.
11997 * pt-write.c: Likewise.
11998 * pt-writev.c: Likewise.
11999 * pthread_join.c: Likewise.
12000 * pthread_timedjoin.c: Likewise.
12002 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12003 (__xpg_sigpause): New function.
12004 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12006 2002-12-07 Ulrich Drepper <drepper@redhat.com>
12008 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12010 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12011 _GI_pthread_cleanup_pop to pthreadP.h.
12013 * ftrylockfile.c: Use _IO_lock_trylock instead of
12014 pthread_mutex_trylock.
12016 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12017 (CANCEL_RESET): Likewise.
12018 (__pthread_setcanceltype_): Declare.
12019 (__pthread_mutex_lock_internal): Declare.
12020 (__pthread_mutex_unlock_internal): Declare.
12021 (__pthread_once_internal): Declare.
12022 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12023 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12025 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12026 and pthread_mutex_unlock.
12027 * pthread_cond_wait.c: Likewise.
12028 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12029 * pthread_mutex_unlock.c: Likewise.
12031 * pthread_setcanceltype.c: Add additional alias
12032 __pthread_setcanceltype.
12034 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12035 * sem_open.c (sem_open): Likewise.
12036 Use __libc_open, __libc_write, and __libc_close instead of
12037 open, write, and close respectively.
12039 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12040 Rewrite as statement expression since it must return a value.
12042 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12043 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12046 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12047 alias __pthread_once_internal.
12049 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12051 2002-12-06 Ulrich Drepper <drepper@redhat.com>
12053 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12054 * tst-stdio1.c: New file.
12055 * tst-stdio2.c: New file.
12057 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12059 * Makefile (tests): Comment out tst-locale2 for now.
12060 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12062 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12064 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12065 Use _IO_lock_init instead of explicit assignment.
12067 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12068 Define __libc_lock_* and __libc_lock_recursive macros with
12069 lowlevellock macros, not pthread mutexes.
12071 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
12072 of pthread_mutex_lock.
12073 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
12074 instead of pthread_mutex_unlock.
12076 2002-12-06 Roland McGrath <roland@redhat.com>
12078 * allocatestack.c (__stack_user): Use uninitialized defn.
12079 * init.c (__pthread_initialize_minimal): Initialize it here.
12081 2002-12-05 Roland McGrath <roland@redhat.com>
12083 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12085 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12087 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12088 missing & here too.
12090 2002-12-05 Ulrich Drepper <drepper@redhat.com>
12092 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12094 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12095 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12096 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12097 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12098 for __libc_lock_* macros.
12099 * Makefile (routines): Add libc-lowlevellock.
12101 2002-10-09 Roland McGrath <roland@redhat.com>
12103 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12104 Under [__PIC__], call the function via the pointer fetched for
12105 comparison rather than a call by name that uses the PLT.
12106 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12107 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12108 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12109 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12110 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12112 2002-12-04 Roland McGrath <roland@redhat.com>
12114 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12116 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12117 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12119 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12121 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12123 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12124 a completely opaque, non-integer type.
12125 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12127 2002-12-05 Jakub Jelinek <jakub@redhat.com>
12129 * sysdeps/i386/tls.h: Include stdlib.h.
12130 * sysdeps/x86_64/tls.h: Likewise.
12132 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12134 * Makefile (tests): Add tst-locale2.
12135 (tests-static): Likewise.
12136 * tst-locale2.c: New file.
12138 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12139 volatile and add memory clobbers to lock operations.
12141 2002-12-03 Ulrich Drepper <drepper@redhat.com>
12143 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12144 * sysdeps/i386/i486/bits/atomic.h: New file.
12145 * sysdeps/i386/i586/bits/atomic.h: New file.
12146 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12147 include i486 version.
12148 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12149 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12150 Patch by Marijn Ros <marijn@mad.scientist.com>.
12152 * allocatestack.c (get_cached_stack): Don't crash if we first
12153 found a stack with a larger size then needed.
12154 Reported by Hui Huang <hui.huang@sun.com>.
12156 * Makefile (tests): Add tst-sysconf.
12157 * tst-sysconf.c: New file.
12159 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12160 PTHREAD_THREADS_MAX.
12162 2002-12-02 Roland McGrath <roland@redhat.com>
12164 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12165 Declare using hidden_proto instead of attribute_hidden, so there are
12166 non-.hidden static symbols for gdb to find.
12167 (__pthread_keys): Likewise.
12168 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12169 * allocatestack.c (__stack_user): Likewise.
12170 * pthread_create.c (__pthread_keys): Likewise.
12171 (__nptl_threads_events, __nptl_last_event): Make these static instead
12173 * pthread_key_create.c (__pthread_pthread_keys_max,
12174 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12176 2002-12-02 Ulrich Drepper <drepper@redhat.com>
12178 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12180 * tst-locale1.c: New file.
12182 * pthread_cond_timedwait.c: Include <stdlib.h>.
12184 * Makefile (tests): Add tst-fork2 and tst-fork3.
12185 * tst-fork2.c: New file.
12186 * tst-fork3.c: New file.
12188 2002-11-28 Ulrich Drepper <drepper@redhat.com>
12190 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12192 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12193 require it to 200112L.
12195 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12196 instruction only if HAVE_CMOV is defined.
12197 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12199 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12201 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12203 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12205 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12207 2002-11-27 Ulrich Drepper <drepper@redhat.com>
12209 * sysdeps/x86_64/bits/atomic.h: New file.
12211 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12214 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12215 possible since gettid cannot fail.
12217 * sysdeps/x86_64/pthreaddef.h: New file.
12219 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12221 * sysdeps/x86_64/pthread_spin_init.c: New file.
12222 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12223 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12224 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12226 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12227 Add missing lock prefix. Minute optimization.
12229 * tst-spin2.c (main): Also check successful trylock call.
12231 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12232 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12234 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12235 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12237 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12238 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12239 value in case of an error. Add support for INTERNAL_SYSCALL.
12241 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12242 value in case of an error.
12244 * sysdeps/x86_64/tls.h: New file.
12246 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12248 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12249 takes the array member name and the index as parameters.
12250 (THREAD_SETMEM_NC): Likewise.
12251 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12252 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12255 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12256 to decide which code to use.
12257 (THREAD_SETMEM_NC): Likewise.
12259 * allocatestack.c (queue_stack): Don't remove stack from list here.
12260 Do it in the caller. Correct condition to prematurely terminate
12261 loop to free stacks.
12262 (__deallocate_stack): Remove stack from list here.
12264 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12266 * Makefile (tests): Add tst-stack1.
12267 * tst-stack1.c: New file.
12269 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12272 * pthread_attr_getstack.c: Return bottom of the thread area.
12274 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12276 * Makefile (libpthread-routines): Add pt-allocrtsig and
12277 pthread_kill_other_threads.
12278 * pt-allocrtsig.c: New file.
12279 * pthread_kill_other_threads.c: New file.
12280 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12281 all three functions.
12282 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12284 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12285 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12286 and __libc_allocate_rtsig_private.
12287 * Versions (libpthread): Export pthread_kill_other_threads_np,
12288 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12290 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12292 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12293 the end of the stack. Adjust computations.
12294 When mprotect call fails dequeue stack and free it.
12295 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12297 * pthread_getattr_np.c: Likewise.
12299 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12302 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12304 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12305 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12307 2002-11-22 Ulrich Drepper <drepper@redhat.com>
12309 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12310 * pthread_setspecific.c: Likewise.
12312 2002-11-21 Ulrich Drepper <drepper@redhat.com>
12314 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12315 definitions. Get them from the official place.
12316 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12318 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12319 Use new CLONE_ flags in clone() calls.
12321 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12322 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12324 * Versions: Add pthread_* functions for libc.
12325 * forward.c: New file.
12327 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12329 * herrno.c: New file.
12332 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12333 sem_trywait, and sem_timedwait. Add herrno and res.
12334 * sem_init.c: Don't initialize lock and waiters members.
12335 * sem_open.c: Likewise.
12336 * sem_post.c: Removed.
12337 * sem_wait.c: Removed.
12338 * sem_trywait.c: Removed.
12339 * sem_timedwait.c: Removed.
12340 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12341 Includes full implementations of sem_post, sem_wait, sem_trywait,
12343 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12344 for new implementation.
12345 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12346 and waiters fields.
12348 * tst-sem3.c: Improve error message.
12349 * tst-signal3.c: Likewise.
12351 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12352 to tell the kernel about the termination futex and to initialize tid
12353 member. Don't initialize main_thread.
12354 * descr.h (struct pthread): Remove main_thread member.
12355 * cancelllation.c (__do_cancel): Remove code handling main thread.
12356 The main thread is not special anymore.
12358 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12359 size of the stacks to stack_cache_actsize.
12361 * pt-readv.c: Add missing "defined".
12362 * pt-sigwait.c: Likewise.
12363 * pt-writev.c: Likewise.
12365 2002-11-09 Ulrich Drepper <drepper@redhat.com>
12367 * Versions: Export __connect from libpthread.
12368 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12370 * Makefile (libpthread-routines): Add pt-raise.
12371 * sysdeps/unix/sysv/linux/raise.c: New file.
12372 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12373 * sysdeps/generic/pt-raise.c: New file.
12375 * pthread_cond_init.c: Initialize all data elements of the condvar
12376 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12378 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12379 * pthread_create.c: Likewise.
12381 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12382 * tst-key1.c: New file.
12383 * tst-key2.c: New file.
12384 * tst-key3.c: New file.
12386 * Versions: Export pthread_detach for version GLIBC_2.0.
12387 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12389 2002-11-08 Ulrich Drepper <drepper@redhat.com>
12391 * pthread_key_create.c: Terminate search after an unused key was found.
12392 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12394 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12395 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12397 2002-10-10 Ulrich Drepper <drepper@redhat.com>
12399 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12400 dynamic lookup for errno in PIC.
12402 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12403 release the stack lock as soon as possible.
12404 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12405 the static TLS block.
12406 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12408 * cancellation.c: Renamed from cancelation.c.
12409 * Makefile: Adjust accordingly.
12410 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12411 * cleanup_defer.c: Use CANCELLATION_P.
12412 * pthread_testcancel.c: Likewise.
12413 * descr.h: Fix spelling in comments.
12414 * init.c: Likewise.
12415 * pthread_getattr_np.c: Likewise.
12416 * pthread_getschedparam.c: Likewise.
12417 * pthread_setschedparam.c: Likewise.
12418 * Versions: Likewise.
12420 * pt-pselect.c: New file.
12421 * Makefile (libpthread-routines): Add pt-pselect.
12422 * Versions: Add pselect.
12424 * tst-cancel4.c: New file.
12425 * Makefile (tests): Add tst-cancel4.
12427 2002-10-09 Ulrich Drepper <drepper@redhat.com>
12429 * pthread_mutex_lock.c: Always record lock ownership.
12430 * pthread_mutex_timedlock.c: Likewise.
12431 * pthread_mutex_trylock.c: Likewise.
12433 * pt-readv.c: New file.
12434 * pt-writev.c: New file.
12435 * pt-creat.c: New file.
12436 * pt-msgrcv.c: New file.
12437 * pt-msgsnd.c: New file.
12438 * pt-poll.c: New file.
12439 * pt-select.c: New file.
12440 * pt-sigpause.c: New file.
12441 * pt-sigsuspend.c: New file.
12442 * pt-sigwait.c: New file.
12443 * pt-sigwaitinfo.c: New file.
12444 * pt-waitid.c: New file.
12445 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12446 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12447 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12448 * Versions: Add all the new functions.
12450 * tst-exit1.c: New file.
12451 * Makefile (tests): Add tst-exit1.
12453 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12455 2002-10-08 Ulrich Drepper <drepper@redhat.com>
12457 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12459 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12460 call. pthread_join is an official cancellation point.
12461 * pthread_timedjoin.c: Likewise.
12463 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12464 and the condvar's mutex are retrieved.
12465 * pthread_cond_timedwait.c: Likewise.
12466 Reported by dice@saros.East.Sun.COM.
12468 2002-10-07 Ulrich Drepper <drepper@redhat.com>
12470 * pthreadP.h: Cut out all type definitions and move them...
12471 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12472 * pthreadP.h: Include <internaltypes.h>.
12474 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12475 performance tweaks.
12477 * sem_trywait.c: Shuffle #includes around to get right order.
12478 * sem_timedwait.c: Likewise.
12479 * sem_post.c: Likewise.
12480 * sem_wait.c: Likewise.
12482 * nptl 0.3 released.
12484 * Makefile (tests): Add tst-signal3.
12485 * tst-signal3.c: New file.
12487 2002-10-05 Ulrich Drepper <drepper@redhat.com>
12489 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12490 the asms modify the sem object.
12491 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12493 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12494 the actual members.
12495 * pthreadP.h (struct sem): New type. Actual semaphore type.
12496 * semaphoreP.h: Include pthreadP.h.
12497 * sem_getvalue.c: Adjust to sem_t change.
12498 * sem_init.c: Likewise.
12499 * sem_open.c: Likewise.
12500 * sem_post.c: Likewise.
12501 * sem_timedwait.c: Likewise.
12502 * sem_trywait.c: Likewise.
12503 * sem_wait.c: Likewise.
12505 2002-10-04 Ulrich Drepper <drepper@redhat.com>
12507 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12508 * tst-basic2.c: New file.
12509 * tst-exec1.c: New file.
12510 * tst-exec2.c: New file.
12511 * tst-exec3.c: New file.
12513 * tst-fork1.c: Remove extra */.
12515 * nptl 0.2 released. The API for IA-32 is complete.