1 2012-10-30 Aurelien Jarno <aurelien@aurel32.net>
2 Joseph Myers <joseph@codesourcery.com>
4 * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
6 2012-10-28 David S. Miller <davem@davemloft.net>
8 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
9 Define when we have v9 instructions available.
10 * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
11 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
13 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
15 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
16 to libpthread-routines.
18 2012-10-25 Roland McGrath <roland@hack.frob.com>
20 * tst-cond-except.c (TEST_FUNCTION): New macro.
22 2012-10-25 Joseph Myers <joseph@codesourcery.com>
24 * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
26 * tst-tls6.sh: Use /bin/bash not /bin/sh.
28 2012-10-25 Roland McGrath <roland@hack.frob.com>
30 * tst-basic2.c (do_test): Return RESULT, not always zero.
32 * tst-cond25.c: Include <stdint.h>
33 (waiter): Add casts to uintptr_t between casting integer<->pointer.
34 (timed_waiter): Likewise.
35 (do_test_wait): Likewise.
36 * tst-cond-except.c (thr): Likewise.
37 (do_test): Use prototype definition.
39 2012-10-24 Joseph Myers <joseph@codesourcery.com>
40 Jim Blandy <jimb@codesourcery.com>
42 * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
44 * tst-tls6.sh (test_wrapper_env): New variable. Use it to run
45 programs with LD_PRELOAD set.
47 2012-10-24 Roland McGrath <roland@hack.frob.com>
49 * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
50 ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
51 ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
52 ($(objpfx)tst-rwlock14): Likewise.
54 2012-10-24 Joseph Myers <joseph@codesourcery.com>
56 * Makefile (tests): Remove tst-oddstacklimit.
57 (test-srcs): New variable.
58 (tst-oddstacklimit-ENV): Remove.
59 [$(run-built-tests) = yes] (tests): Depend on
60 $(objpfx)tst-oddstacklimit.out.
61 [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
63 * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
64 setrlimit before executing tst-basic1 test passed to --command.
66 2012-10-23 Joseph Myers <joseph@codesourcery.com>
68 * Makefile [$(cross-compiling) = no]: Change condition to
69 [$(run-built-tests) = yes].
71 2012-10-23 Jim Blandy <jimb@codesourcery.com>
72 Joseph Myers <joseph@codesourcery.com>
74 * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
75 (tst-exec4-ARGS): Likewise.
76 (tst-stackguard1-ARGS): Likewise.
78 2012-10-21 Jim Blandy <jimb@codesourcery.com>
79 Joseph Myers <joseph@codesourcery.com>
81 * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
82 tst-cancel-wrappers.sh.
83 * tst-cancel-wrappers.sh: Use nm program given as first argument,
86 2012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
88 * tst-cond25.c (do_test_wait): Don't check for return value from
91 2012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
94 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
95 (__condvar_tw_cleanup): Adjust the mutex data structure if it
96 was locked by FUTEX_WAIT_REQUEUE_PI.
97 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
98 (__condvar_w_cleanup): Likewise.
99 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
100 (__condvar_cleanup2): Likewise.
101 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
102 (__condvar_cleanup1): Likewise.
104 2012-10-10 Carlos O'Donell <carlos@systemhalted.org>
106 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
107 defined __EXCEPTIONS) && defined __USE_GNU]
108 (pthread_cleanup_push_defer_np): Fix formatting.
110 2012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
113 * Makefile (tests): New test case tst-cond25.
114 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
115 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
116 (__condvar_tw_cleanup): Lock mutex only if we don't already
118 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
119 (__condvar_w_cleanup): Likewise.
120 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
121 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
122 (__condvar_cleanup2): Lock mutex only if we don't already
124 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
125 (__condvar_cleanup1): Likewise.
126 * tst-cond25.c: New test case.
128 2012-10-09 Roland McGrath <roland@hack.frob.com>
130 * sysdeps/pthread/configure: Regenerated.
131 * sysdeps/x86_64/configure: Regenerated.
133 2012-10-05 David S. Miller <davem@davemloft.net>
136 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
137 (DB_THREAD_SELF): Use constants for the register offsets. Correct
138 the case of a 64-bit debugger with a 32-bit inferior.
140 2012-10-05 H.J. Lu <hongjiu.lu@intel.com>
143 * Makefile (tests-static): Add tst-cancel24-static,
144 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
145 tst-sem11-static and tst-sem12-static.
147 (LDLIBS-tst-cancel24-static): New macro.
148 * tst-cancel24-static.cc: New file.
149 * tst-cond8-static.c: Likewise.
150 * tst-mutex8-static.c: Likewise.
151 * tst-mutexpi8-static.c: Likewise.
152 * tst-sem11-static.c: Likewise.
153 * tst-sem12-static.c: Likewise.
155 2012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
158 * Makefile (tests): New test case tst-cond24.
159 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
160 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
161 (__pthread_cond_timedwait): Unlock mutex before going back to
163 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
164 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
165 return from futex_wait.
166 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
167 (__pthread_cond_timedwait): Unlock mutex before going back to
168 wait in PI case. Set requeue_pi flag only if wait returned 0.
169 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
170 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
171 return from futex_wait.
172 * tst-cond24.c: New test case.
174 2012-10-04 Roland McGrath <roland@hack.frob.com>
176 * pthread_create.c (start_thread): Use __madvise, not madvise.
178 2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
180 * sysdeps/i386/tls.h: Update copyright years.
182 2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
184 * pthread_create.c (start_thread): Fix clone flag name in
185 comment to CLONE_CHILD_CLEARTID.
186 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
187 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
188 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
189 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
190 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
191 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
193 2012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
196 * Makefile (tests): Add tst-cond-except.
197 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
198 (__pthread_cond_timedwait): Mark instructions where %ebx is
199 incremented in PI case.
200 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
201 for the marked PI case instructions.
202 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
203 (__pthread_cond_wait): Mark instructions where %ebx is
204 incremented in PI case.
205 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
206 for the marked PI case instructions.
207 * tst-cond-except.c: New test case.
209 2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
211 * tst-tls6.sh: Add "set -e".
212 * Makefile: Do not specify -e option when running testsuite
215 * tst-tls6.sh: Add copyright header.
217 2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
219 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
220 to uint64_t for 64-bit store.
221 (THREAD_SETMEM_NC): Likewise.
223 2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
225 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
227 (THREAD_SETMEM_NC): Likewise.
229 2012-09-14 Jeff Law <law@redhat.com>
232 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
234 2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
237 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
240 2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
242 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
243 (LDLIBS-tst-cancel24): This.
245 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
248 * Makefile (tests-static): Add tst-cancel21-static.
250 * tst-cancel21-static.c: New file.
252 2012-09-01 Joseph Myers <joseph@codesourcery.com>
254 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
255 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
256 [__NR_clock_getres]: Make code unconditional.
257 (pthread_getcpuclockid): Remove code left unreachable by removal
260 2012-08-31 Joseph Myers <joseph@codesourcery.com>
263 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
264 atomic_compare_and_exchange_bool_rel.
265 * tst-sem14.c: New file.
266 * Makefile (tests): Add tst-sem14.
268 2012-08-15 Roland McGrath <roland@hack.frob.com>
270 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
272 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
273 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
275 2012-08-16 Joseph Myers <joseph@codesourcery.com>
277 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
278 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
279 * pthread_condattr_setclock.c (pthread_condattr_setclock)
280 [!__ASSUME_POSIX_TIMERS]: Likewise.
281 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
282 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
283 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
284 [!__ASSUME_POSIX_TIMERS]: Likewise.
285 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
286 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
287 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
289 [!__NR-timer_create]: Remove conditional code.
290 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
291 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
293 [!__NR_timer_delete]: Remove conditional code.
294 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
295 * sysdeps/unix/sysv/linux/timer_getoverr.c
296 [__NR_timer_getoverrun]: Make code unconditional.
297 [!__NR_timer_getoverrun]: Remove conditional code.
298 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
299 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
300 Make code unconditional.
301 [!__NR_timer_gettime]: Remove conditional code.
302 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
303 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
304 Make code unconditional.
305 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
306 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
307 Make code unconditional.
308 [!__NR_timer_settime]: Remove conditional code.
309 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
310 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
311 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
314 2012-08-15 Tom de Vries <vries@codesourcery.com>
315 Maxim Kuvyrkov <maxim@codesourcery.com>
317 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
318 (__libc_lock_trylock): Allow pre-existing definitions.
320 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
322 * pthread_spin_lock.c: New file.
323 * pthread_spin_trylock.c: New file.
325 2012-08-08 Joseph Myers <joseph@codesourcery.com>
327 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
329 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
330 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
332 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
333 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
334 Make code unconditional.
335 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
336 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
337 __NR_tgkill]: Make code unconditional.
338 (raise) [__ASSUME_TGKILL]: Likewise.
339 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
340 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
341 [__ASSUME_TGKILL]: Make code unconditional.
342 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
343 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
344 __NR_tgkill]: Make code unconditional.
345 (raise) [__ASSUME_TGKILL]: Likewise.
346 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
348 2012-08-07 Joseph Myers <joseph@codesourcery.com>
350 * sysdeps/pthread/createthread.c (create_thread)
351 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
353 2012-08-03 Joseph Myers <joseph@codesourcery.com>
355 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
357 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
359 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
361 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
362 (pagesize): New static variable.
363 (allocate_and_test): Return MEM. Rename parameter to TARGET.
364 (check_stack_top): New local variables MEM and PAGEMASK. Cap
365 stack size to MAX_STACK_SIZE. Call allocate_and_test for
366 halfway up the stack top page. Verify that the top page was
368 (do_test): Get pagesize using sysconf.
370 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
372 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
374 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
375 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
378 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
380 * tst-pthread-getattr.c: Revert last change.
382 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
384 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
387 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
389 (check_stack_top): Read valued written into STACKADDR in
390 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
392 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
394 * nptl-init.c (sighandler_setxid): Fix the comment that
397 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
399 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
400 (__lll_robust_timedlock_wait): Simplify CFI directives.
402 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
405 * Makefile (tests): Add test case.
406 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
407 the __libc_stack_end page from stacksize. Truncate stacksize to
408 make it page aligned when it is computed from RLIMIT_STACK.
409 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
412 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
415 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
418 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
419 Jakub Jelinek <jakub@redhat.com>
422 * sysdeps/pthread/pthread.h
423 [!(defined __GNUC__ && defined __EXCEPTIONS)]
424 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
425 __libc_unlikely instead of __builtin_expect.
427 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
430 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
431 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
432 * sysdeps/unix/sysv/linux/i386/Implies: New file.
433 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
434 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
436 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
437 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
439 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
441 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
444 * nptl-init.c (pthread_functions): Remove use of INTUSE and
446 (__pthread_initialize_minimal_internal): Likewise.
447 * sem_open.c: Likewise.
448 * sem_unlink.c: Likewise.
449 * pthreadP.h: Replace _internal aliases by hidden_proto
451 * pthread_getspecific.c: Replace _internal alias by hidden_def.
452 * pthread_key_create.c: Likewise.
453 * pthread_mutex_destroy.c: Likewise.
454 * pthread_mutex_init.c: Likewise.
455 * pthread_mutex_lock.c: Likewise.
456 * pthread_mutex_unlock.c: Likewise.
457 * pthread_once.c: Likewise.
458 * pthread_rwlock_rdlock.c: Likewise.
459 * pthread_rwlock_unlock.c: Likewise.
460 * pthread_rwlock_wrlock.c: Likewise.
461 * pthread_setspecific.c: Likewise.
462 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
464 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
466 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
468 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
469 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
470 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
471 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
472 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
473 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
474 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
475 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
476 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
477 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
479 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
481 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
484 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
486 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
487 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
489 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
490 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
492 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
493 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
494 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
495 (pthread_barrier_wait): Likewise.
496 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
497 (__pthread_cond_broadcast): Likewise.
498 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
499 (__pthread_cond_signal): Likewise.
500 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
501 (__pthread_cond_timedwait): Likewise.
502 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
504 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
505 (__pthread_rwlock_rdlock): Likewise.
506 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
507 (pthread_rwlock_timedrdlock): Likewise.
508 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
509 (pthread_rwlock_timedwrlock): Likewise.
510 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
511 (__pthread_rwlock_unlock): Likewise.
512 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
513 (__pthread_rwlock_wrlock): Likewise.
514 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
515 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
516 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
518 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
520 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
523 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
524 __libc_stack_end rounded to the end of containing page as the
527 2012-05-25 Rayson Ho <rho@redhat.com>
529 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
531 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
532 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
533 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
534 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
535 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
536 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
537 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
538 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
540 2012-05-25 Rayson Ho <rho@redhat.com>
541 Roland McGrath <roland@hack.frob.com>
543 * DESIGN-systemtap-probes.txt: New file.
544 * pthread_cond_broadcast.c: SystemTap probes.
545 * pthread_cond_init.c: Likewise.
546 * pthread_cond_signal.c: Likewise.
547 * pthread_cond_wait.c: Likewise.
548 * pthread_cond_destroy.c: Likewise.
549 * pthread_create.c: Likewise.
550 * pthread_join.c: Likewise.
551 * pthread_mutex_destroy.c: Likewise.
552 * pthread_mutex_init.c: Likewise.
553 * pthread_mutex_lock.c: Likewise.
554 * pthread_mutex_timedlock.c: Likewise.
555 * pthread_mutex_unlock.c: Likewise.
556 * pthread_rwlock_destroy.c: Likewise.
557 * pthread_rwlock_rdlock.c: Likewise.
558 * pthread_rwlock_unlock.c: Likewise.
559 * pthread_rwlock_wrlock.c: Likewise.
560 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
561 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
562 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
563 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
564 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
565 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
566 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
567 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
569 2012-05-24 Roland McGrath <roland@hack.frob.com>
571 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
573 2012-05-17 Andreas Jaeger <aj@suse.de>
575 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
576 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
577 only for older kernels.
579 2012-05-15 Joseph Myers <joseph@codesourcery.com>
581 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
584 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
586 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
587 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
588 (lll_robust_lock): Likewise.
589 (lll_cond_lock): Likewise.
590 (lll_robust_cond_lock): Likewise.
591 (lll_timedlock): Likewise.
592 (lll_robust_timedlock): Likewise.
593 (lll_unlock): Likewise.
594 (lll_robust_unlock): Likewise.
596 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
598 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
599 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
601 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
603 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
605 (__gcc_personality_v0): Replace 8-byte data alignment with
606 LP_SIZE alignment and .quad with ASM_ADDR.
608 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
610 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
612 (__gcc_personality_v0): Replace 8-byte data alignment with
613 LP_SIZE alignment and .quad with ASM_ADDR.
615 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
617 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
618 NWAITERS, which is unsigned long int.
620 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
622 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
623 (__gcc_personality_v0): Replace 8-byte data alignment with
624 LP_SIZE alignment and .quad with ASM_ADDR.
626 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
628 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
629 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
630 __vdso_clock_gettime pointer into RAX_LP.
631 (__gcc_personality_v0): Replace 8-byte data alignment with
632 LP_SIZE alignment and .quad with ASM_ADDR.
634 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
636 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
637 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
638 __vdso_clock_gettime pointer into RAX_LP.
639 (__gcc_personality_v0): Replace 8-byte data alignment with
640 LP_SIZE alignment and .quad with ASM_ADDR.
642 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
644 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
645 LP_OP(cmp) and R8_LP on dep_mutex pointer.
647 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
649 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
650 to update pointer in memory. Load pointer into RDI_LP.
652 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
654 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
655 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
657 (LLL_STUB_UNWIND_INFO_END): Likewise.
658 (lll_timedlock): Load timeout pointer into RDX_LP.
659 (lll_robust_timedlock): Likewise.
661 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
662 Jakub Jelinek <jakub@redhat.com>
665 * Makefile (tests): Add test cases.
666 * descr.h (struct pthread): Add a comment describing multiple_threads.
667 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
669 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
670 before setting cancelstate of the thread.
671 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
672 (__libc_multiple_threads): Add explanatory comment.
673 * tst-cancel-self-cancelstate.c: New test case.
674 * tst-cancel-self-canceltype.c: Likewise.
675 * tst-cancel-self-cleanup.c: Supporting file for test cases.
676 * tst-cancel-self-testcancel.c: New test case.
677 * tst-cancel-self.c: Likewise.
678 * vars.c: Expand comment to include single-process case.
680 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
682 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
683 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
686 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
688 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
690 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
691 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
693 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
695 * shlib-versions: Move x86_64-.*-linux.* entry to ...
696 * sysdeps/x86_64/64/shlib-versions: Here. New file.
697 * sysdeps/x86_64/x32/shlib-versions: New file.
699 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
701 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
702 __SIZEOF_PTHREAD_XXX_T.
703 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
704 (pthread_mutex_t): Likewise.
705 (pthread_rwlock_t): Likewise.
706 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
709 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
711 * sysdeps/x86_64/x32/tls.h: New file.
713 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
715 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
717 (THREAD_SETMEM_NC): Likewise.
719 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
721 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
724 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
726 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
727 (__cleanup_fct_attribute): Check __x86_64__ instead of
730 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
732 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
733 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
734 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
735 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
736 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
738 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
740 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
741 instead of __WORDSIZE.
743 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
746 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
748 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
750 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
751 (__pthread_cond_timedwait): Use CFI directives.
752 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
753 (__pthread_cond_wait): Likewise.
754 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
755 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
757 2012-05-03 David S. Miller <davem@davemloft.net>
759 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
760 always have to return 0, especially for the pthread_spin_init
762 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
764 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
765 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
767 2012-05-02 David S. Miller <davem@davemloft.net>
769 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
770 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
771 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
772 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
773 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
774 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
775 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
776 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
777 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
778 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
779 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
780 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
781 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
782 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
783 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
784 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
785 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
786 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
788 2012-05-02 Allan McRae <allan@archlinux.org>
790 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
791 (LDFLAGS-tst-cancel24): Likewise.
793 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
795 * sysdeps/i386/pthread_spin_lock.S: New.
796 * sysdeps/i386/pthread_spin_lock.c: Delete.
797 * sysdeps/x86_64/pthread_spin_lock.S: New.
798 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
800 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
802 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
803 run when cross-compiling.
805 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
807 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
808 instead of libgcc_s.h.
810 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
812 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
814 2012-03-27 David S. Miller <davem@davemloft.net>
816 * tst-cond16.c (do_test): Use a thread stack size which is either
817 PTHREAD_STACK_MIN or the page size, whichever is larger.
818 * tst-cond18.c (do_test): Likewise.
820 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
822 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
823 register char * __asm__("rsp") to get stack frame.
825 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
827 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
830 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
832 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
835 2012-03-16 David S. Miller <davem@davemloft.net>
838 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
840 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
843 2012-03-15 David S. Miller <davem@davemloft.net>
846 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
848 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
851 * pt-crti.S: Replace FSF snail mail address with URL.
853 2012-03-09 Joseph Myers <joseph@codesourcery.com>
855 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
856 Do not define before including <time.h>.
858 2012-03-08 David S. Miller <davem@davemloft.net>
860 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
862 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
864 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
865 Check for timestamp before the Epoch.
867 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
870 * tst-sem13.c (do_test): Add another test case.
871 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
872 Fix updating nwaiters.
874 2012-03-07 Joseph Myers <joseph@codesourcery.com>
877 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
878 link test to a compile test.
879 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
881 * sysdeps/pthread/configure: Regenerated.
883 2012-03-07 Ulrich Drepper <drepper@gmail.com>
885 * Makefile (distribute): Remove variable.
887 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
889 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
890 superfluous assignment.
891 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
893 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
894 (sem_timedwait): Likewise.
896 2012-03-06 Ulrich Drepper <drepper@gmail.com>
898 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
899 installed headers to...
900 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
902 2012-03-06 David S. Miller <davem@davemloft.net>
904 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
905 atomic_increment and remove unused local variable.
906 (__old_sem_post): Likewise.
908 2012-02-27 David S. Miller <davem@davemloft.net>
910 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
911 non-existing __pthread_attr.
912 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
913 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
914 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
915 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
916 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
918 2012-02-26 Ulrich Drepper <drepper@gmail.com>
920 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
922 * sysdeps/pthread/pthread.h: Define __need_timespec before including
924 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
926 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
927 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
928 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
929 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
930 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
932 2012-02-21 Joseph Myers <joseph@codesourcery.com>
935 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
937 [crti.S not in sysdirs] (omit-deps): Do not append.
938 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
939 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
940 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
941 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
942 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
943 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
944 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
945 [crti.S in sysdirs] (extra-objs): Append unconditionally.
946 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
948 * sysdeps/pthread/pt-initfini.c: Remove file.
950 2012-02-16 Richard Henderson <rth@twiddle.net>
952 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
953 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
955 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
957 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
959 2012-02-16 David S. Miller <davem@davemloft.net>
961 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
963 2012-02-15 Marek Polacek <polacek@redhat.com>
965 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
967 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
969 Replace FSF snail mail address with URLs, as per GNU coding standards.
971 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
973 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
975 2012-02-08 Joseph Myers <joseph@codesourcery.com>
977 Support crti.S and crtn.S provided directly by architectures.
978 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
979 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
980 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
981 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
982 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
983 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
984 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
985 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
986 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
987 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
988 * pt-crti.S: New file.
989 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
991 2012-02-03 Joseph Myers <joseph@codesourcery.com>
993 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
994 macros for PIC register setup.
995 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
996 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
997 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
998 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
999 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1001 2012-01-11 Marek Polacek <polacek@redhat.com>
1003 * forward.c (FORWARD_NORETURN): Define macro.
1004 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1005 (__pthread_exit): Likewise.
1007 2012-01-10 Ulrich Drepper <drepper@gmail.com>
1009 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1011 * pthreadP.h: Add noreturn to __pthread_exit.
1012 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1014 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
1016 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1017 Call pthread_attr_setstacksize() with result of
1018 __pthread_get_minstack() to account for application TLS usage.
1020 2012-01-08 Marek Polacek <polacek@redhat.com>
1022 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1024 2012-01-07 Ulrich Drepper <drepper@gmail.com>
1027 * pthreadP.h: Use const instead of __const.
1028 * semaphore.h: Likewise.
1029 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1030 * sysdeps/pthread/bits/sigthread.h: Likewise.
1031 * sysdeps/pthread/pthread.h: Likewise.
1033 * Makefile: Remove elf=yes test, only ELF is supported.
1035 * shlib-versions: Remove entries for ports architectures.
1037 In case anyone cares, the IA-64 architecture could move to ports.
1038 * sysdeps/ia64/*: Removed.
1039 * sysdeps/unix/sysv/linux/ia64/*: Removed.
1041 2011-12-22 Ulrich Drepper <drepper@gmail.com>
1043 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1044 __pthread_get_minstack.
1045 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1048 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1049 through __pthread_get_minstack.
1050 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1051 directly from _rtld_global_ro.
1052 (__pthread_get_minstack): New function.
1053 * pthreadP.h: Declare __pthread_get_minstack.
1054 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1056 2011-12-21 Ulrich Drepper <drepper@gmail.com>
1059 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1060 Correct reading name from file.
1062 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
1064 * allocatestack.c (allocate_stack): Return errno on failure.
1066 2011-12-14 Jeff Law <law@redhat.com>
1069 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1071 2011-11-28 Andreas Schwab <schwab@redhat.com>
1073 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1074 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1075 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1077 2011-11-15 Ulrich Drepper <drepper@gmail.com>
1079 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1082 2011-10-29 Ulrich Drepper <drepper@gmail.com>
1085 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1086 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1087 path for kernels with FUTEX_CLOCK_REALTIME.
1088 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1090 2011-10-27 Andreas Schwab <schwab@redhat.com>
1093 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1094 for memory synchronization functions.
1095 * semaphore.h: Likewise.
1097 2011-10-24 Ulrich Drepper <drepper@gmail.com>
1099 * tst-cancel7.c: Avoid warning.
1100 * tst-mutex6.c: Likewise.
1101 * tst-mutex9.c: Likewise.
1102 * tst-mutexpi6.c: Likewise.
1104 2011-10-23 Ulrich Drepper <drepper@gmail.com>
1106 * sysdeps/i386/tls.h: Remove #include <list.h>.
1108 2011-10-15 Ulrich Drepper <drepper@gmail.com>
1110 * pthread_create.c (start_thread): Call __ctype_init.
1112 2011-09-15 Andreas Schwab <schwab@redhat.com>
1114 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1116 (list_add): Add atomic_write_barrier.
1117 * descr.h: Define __need_list_t before including <list.h>.
1118 * nptl-init.c: Include <list.h>
1119 * allocatestack.c: Likewise.
1121 2011-09-11 Ulrich Drepper <drepper@gmail.com>
1123 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1124 * sysdeps/ia64/tls.h: Likewise.
1125 * sysdeps/powerpc/tls.h: Likewise.
1126 * sysdeps/s390/tls.h: Likewise.
1127 * sysdeps/sh/tls.h: Likewise.
1128 * sysdeps/sparc/tls.h: Likewise.
1129 * sysdeps/x86_64/tls.h: Likewise.
1131 2011-09-10 Ulrich Drepper <drepper@gmail.com>
1133 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1135 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1137 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1138 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1139 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1140 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1141 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1142 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1143 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1144 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1145 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1146 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1147 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1148 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1150 * tst-tls1.c: Support for __thread is now mandatory.
1151 * tst-tls2.c: Likewise.
1152 * tst-tls3.c: Likewise.
1153 * tst-tls3mod.c: Likewise.
1154 * tst-tls4.c: Likewise.
1155 * tst-tls4moda.c: Likewise.
1156 * tst-tls4modb.c: Likewise.
1157 * tst-tls5.h: Likewise.
1159 2011-09-08 Ulrich Drepper <drepper@gmail.com>
1162 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1163 (pthread_rwlock_timedwrlock): Use correct macro in test.
1164 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1166 2011-09-06 Ulrich Drepper <drepper@gmail.com>
1168 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1169 use gettimeofday vsyscall, just call gettimeofday.
1170 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1171 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1172 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1174 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1176 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1177 Simplify __vdso_clock_gettime use.
1179 2011-09-05 David S. Miller <davem@davemloft.net>
1181 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1183 (sem_timedwait): Call it to force an exception region around
1184 the async cancel enable and the futex operation.
1185 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1186 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1187 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1188 (__new_sem_wait): Call it to force an exception region around
1189 the async cancel enable and the futex operation.
1190 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1191 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1193 2011-08-31 Andreas Schwab <schwab@redhat.com>
1195 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1198 2011-08-20 David S. Miller <davem@davemloft.net>
1200 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1202 2011-08-14 Roland McGrath <roland@hack.frob.com>
1204 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1205 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1207 2011-08-08 Andreas Schwab <schwab@redhat.com>
1209 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1211 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1212 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1214 2011-07-22 Ulrich Drepper <drepper@gmail.com>
1216 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1218 (__gcc_personality_v0): Likewise.
1219 (_Unwind_ForcedUnwind): Likewise.
1220 (_Unwind_GetCFA): Likewise.
1222 2011-07-14 Roland McGrath <roland@hack.frob.com>
1224 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1227 2011-06-30 Ulrich Drepper <drepper@gmail.com>
1229 * nptl-init.c (__nptl_set_robust): New function.
1230 (pthread_functions): Add reference.
1231 * npthreadP.h: Declare __nptl_set_robust.
1232 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1233 ptr_set_robust member.
1234 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1235 child if threads are used.
1237 2011-06-14 Andreas Jaeger <aj@suse.de>
1239 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1241 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1244 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1246 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1249 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1251 Patch partly by Robert Rex <robert.rex@exasol.com>.
1253 2011-01-19 Roland McGrath <roland@redhat.com>
1255 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1256 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1257 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1258 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1259 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1260 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1262 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1264 * Makefile (test-extras): Add tst-cleanup4aux.
1266 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1269 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1270 (__SETXID_2): Likewise.
1271 (__SETXID_3): Likewise.
1273 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1276 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1277 * alloca_cutoff.c: Add libc_hidden_def.
1279 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1282 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1283 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1284 of "struct pthread".
1286 2010-09-21 Andreas Schwab <schwab@redhat.com>
1288 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1289 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1290 (pthread_cleanup_push_defer_np): Likewise.
1292 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1294 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1297 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1298 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1300 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1301 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1303 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1305 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1307 2010-05-01 Alan Modra <amodra@gmail.com>
1309 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1310 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1311 to save temps. Correct cfi for possible later frame manipulation.
1312 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1313 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1314 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1315 (DOCARGS_6, UNDOCARGS_6): Likewise.
1316 (CENABLE, CDISABLE): Add nops for non-shared calls.
1318 2010-07-06 Andreas Schwab <schwab@redhat.com>
1320 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1323 2010-07-03 Ulrich Drepper <drepper@redhat.com>
1325 * tst-abstime.c (do_test): Some more cleanups
1327 2010-07-02 Ulrich Drepper <drepper@redhat.com>
1329 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1331 2010-07-01 Andreas Schwab <schwab@redhat.com>
1332 Ulrich Drepper <drepper@redhat.com>
1334 * Makefile (tests): Add tst-abstime.
1335 * tst-abstime.c: New file.
1336 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1337 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1338 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1339 (__lll_timedlock_wait): Likewise.
1340 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1341 (__lll_robust_timedlock_wait): Likewise.
1342 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1343 (__pthread_cond_timedwait): Likewise.
1344 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1345 (pthread_rwlock_timedrdlock): Likewise.
1346 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1347 (pthread_rwlock_timedwrlock): Likewise.
1348 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1351 2010-07-01 Ulrich Drepper <drepper@redhat.com>
1353 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1355 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1357 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1358 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1360 2010-04-09 Ulrich Drepper <drepper@redhat.com>
1363 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1364 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1365 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1367 * Makefile (libpthread-routines): Add pthread_getname and
1369 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1371 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1373 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1374 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1375 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1376 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1378 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1380 * pthread_cond_timedwait.c: Add check for
1381 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1382 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1385 2010-03-09 Ulrich Drepper <drepper@redhat.com>
1387 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1388 and the call fails wake eventually waiting setxid threads. Don't free
1389 stack here if we try starting a thread.
1390 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1391 if the clone call failed.
1393 2010-03-08 Andreas Schwab <schwab@redhat.com>
1395 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1396 * allocatestack.c (get_cached_stack): Set setxid_futex.
1397 (allocate_stack): Likewise.
1399 2010-03-05 Andreas Schwab <schwab@redhat.com>
1400 Ulrich Drepper <drepper@redhat.com>
1402 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1403 it is creating a thread or it is just being created.
1404 * pthread_create.c (start_thread): Wake setxid thread if it is
1406 (__pthread_create_2_1): Initialize setxid_futex.
1407 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1410 2010-01-15 Ulrich Drepper <drepper@redhat.com>
1412 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1414 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1416 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
1418 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1419 Fix pthread_cond_timedwait with requeue-PI.
1420 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1421 Fix pthread_cond_wait with requeue-PI.
1423 2010-01-14 Ulrich Drepper <drepper@redhat.com>
1425 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1426 and pthread_mutexattr_setrobust for GLIBC_2.12.
1427 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1428 * pthread_mutexattr_getrobust.c: Define alias
1429 pthread_mutexattr_getrobust.
1430 * pthread_mutexattr_setrobust.c: Define alias
1431 pthread_mutexattr_setrobust.
1433 2010-01-12 Ulrich Drepper <drepper@redhat.com>
1435 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1437 2010-01-08 Ulrich Drepper <drepper@redhat.com>
1439 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1441 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1443 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1444 call __gmon_start__.
1445 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1447 2009-12-17 Ulrich Drepper <drepper@redhat.com>
1449 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1452 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1454 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1455 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1456 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1457 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1458 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1459 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1460 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1461 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1463 2009-12-12 Ulrich Drepper <drepper@redhat.com>
1465 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1466 Don't update nwaiters after invalid timeout is recognized.
1468 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1470 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1473 2009-11-27 Andreas Schwab <schwab@redhat.com>
1475 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1476 THREAD_SELF->cancelhandling after returning from futex call.
1478 2009-11-24 Ulrich Drepper <drepper@redhat.com>
1480 * tst-sem13.c: New file.
1481 * Makefile (tests): Add tst-sem13.
1483 2009-11-22 Roland McGrath <roland@redhat.com>
1485 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1486 instead of recapitulating its contents.
1488 2009-11-18 Ulrich Drepper <drepper@redhat.com>
1490 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1491 optimizations and cleanups.
1493 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1495 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1496 Remove redundant code. Fix cfi offsets.
1497 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1500 2009-11-17 Ulrich Drepper <drepper@redhat.com>
1502 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1503 reduce size of unwind info.
1505 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1507 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1508 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1510 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1513 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1515 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1517 2009-10-30 Ulrich Drepper <drepper@redhat.com>
1519 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1522 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1523 steps to avoid races with creation and terminations.
1524 * nptl-init.c (sighandler_setxid): Adjust.
1525 Patch by Daniel Jacobowitz.
1527 2009-09-07 Andreas Schwab <schwab@redhat.com>
1529 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1531 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
1532 Joseph Myers <joseph@codesourcery.com>
1535 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1536 Initialize the sigev_notify field for newly created timer to make sure
1537 the timer gets deleted from the active timer's list upon timer_delete.
1539 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
1541 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1542 Correct a logic error.
1544 2009-08-25 Ulrich Drepper <drepper@redhat.com>
1546 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1547 of the field in local variables.
1548 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1549 variable and don't unconditionally clear it.
1551 2009-08-24 Ulrich Drepper <drepper@redhat.com>
1553 * pthread_create.c (start_thread): Hint to the kernel that memory for
1554 the stack can be reused. We do not mark all the memory. The part
1555 still in use and some reserve are kept.
1557 2009-08-23 Ulrich Drepper <drepper@redhat.com>
1559 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1561 2009-08-11 Ulrich Drepper <drepper@redhat.com>
1563 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1566 2009-08-10 Ulrich Drepper <drepper@redhat.com>
1568 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1570 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1572 2009-08-10 Andreas Schwab <schwab@redhat.com>
1574 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1575 (__pthread_cond_signal): Don't clobber register used for syscall
1578 2009-08-08 Ulrich Drepper <drepper@redhat.com>
1580 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1581 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1583 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1584 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1587 2009-08-07 Ulrich Drepper <drepper@redhat.com>
1589 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1590 enabled by the special *_asynccancel functions.
1591 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1592 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1594 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1596 2009-08-04 Ulrich Drepper <drepper@redhat.com>
1598 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1599 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1600 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1601 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1602 since we can assume the special __*_{en,dis}able_asynccancel
1604 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1605 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1606 and PTHREAD_CANCELED.
1608 2009-07-31 Ulrich Drepper <drepper@redhat.com>
1610 * descr.h: Better definition of *_BITMASK macros for cancellation.
1612 2009-07-29 Ulrich Drepper <drepper@redhat.com>
1614 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1616 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1617 dynamic linker might have to save.
1618 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1619 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1622 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1624 2009-07-28 Ulrich Drepper <drepper@redhat.com>
1626 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1628 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1629 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1630 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1631 requeue_pi for robust mutexes.
1632 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1633 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1634 Don't only skip __pthread_mutex_cond_lock. Call instead
1635 __pthread_mutex_cond_lock_adjust.
1636 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1638 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1639 optimization of PI mutex handling.
1641 2009-07-27 Ulrich Drepper <drepper@redhat.com>
1644 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1645 instead of of _acq variants of cmpxchg.
1647 2009-07-23 Ulrich Drepper <drepper@redhat.com>
1649 * sysdeps/x86_64/configure.in: New file.
1651 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1652 path when not using absolute timeout futex.
1654 2009-07-20 Ulrich Drepper <drepper@redhat.com>
1656 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1657 optimizations of last changes.
1658 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1660 2009-07-19 Ulrich Drepper <drepper@redhat.com>
1662 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1663 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1664 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1665 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1666 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1667 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1668 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1669 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1671 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1672 (__pthread_cond_timedwait): Make more robust.
1674 2009-07-18 Ulrich Drepper <drepper@redhat.com>
1676 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1677 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1678 directly use absolute timeout.
1680 * tst-sem5.c (do_test): Add test for premature timeout.
1681 * Makefile: Linu tst-sem5 with librt.
1683 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1684 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1685 directly use absolute timeout.
1686 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1687 (pthread_rwlock_timedrdlock): Likewise.
1689 * tst-cond11.c (run_test): Add test to check that the timeout is
1692 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1693 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1694 directly use absolute timeout.
1696 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1697 (__pthread_cond_wait): Convert to using exception handler instead of
1698 registered unwind buffer.
1699 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1700 (__pthread_cond_timedwait): Likewise.
1702 2009-07-17 Ulrich Drepper <drepper@redhat.com>
1704 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1705 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1706 use absolute timeout.
1708 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1709 handling of uncontested semaphore.
1711 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1712 (__condvar_cleanup): Rewrite to use cfi directives instead of
1713 hand-coded unwind tables.
1714 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1716 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1717 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1720 2009-06-12 Ulrich Drepper <drepper@redhat.com>
1722 * Makefile (libpthread-routines): Add pthread_sigqueue.
1723 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1724 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1725 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1727 2009-06-11 Ulrich Drepper <drepper@redhat.com>
1730 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1731 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1733 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1735 2009-05-16 Ulrich Drepper <drepper@redhat.com>
1737 * libc-cancellation.c: Move __libc_cleanup_routine to...
1738 * libc-cleanup.c: ...here. New file.
1739 * Makefile (routines): Add libc-cleanup.
1741 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1743 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1744 * sysdeps/pthread/librt-cancellation.c: Likewise.
1747 * nptl-init.c: Renamed from init.c.
1748 * Makefile: Change all occurences of init.c to nptl-init.c.
1750 2009-05-15 Ulrich Drepper <drepper@redhat.com>
1752 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1753 to test when deciding on the delay.
1754 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1755 * pthread_cancel.c: Close race between deciding on sending a signal
1756 and setting the CANCELING_BIT bit.
1758 * cancellation.c (__pthread_disable_asynccancel): Don't return if
1760 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1762 2009-04-27 Ulrich Drepper <drepper@redhat.com>
1764 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1766 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1767 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1768 * sysdeps/i386/tls.h: Likewise.
1769 (tcbhead_t): Add __private_tm member.
1771 2009-04-26 Ulrich Drepper <drepper@redhat.com>
1773 * sem_open.c (sem_open): Rewrite initialization of initsem to
1776 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1777 Avoid warning by using may_alias attribute on ptrhack.
1779 2009-04-22 Ulrich Drepper <drepper@redhat.com>
1782 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1783 Check policy and priority for validity.
1784 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1786 2009-03-15 Ulrich Drepper <drepper@redhat.com>
1788 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1789 (__pthread_cond_timedwait): Change to use cfi directives instead of
1790 hand-coded unwind sections.
1792 2009-03-10 Ulrich Drepper <drepper@redhat.com>
1794 * init.c (nptl_freeres): Compile only for SHARED.
1796 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1798 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1799 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1800 FUTEX_BITSET_MATCH_ANY.
1802 2009-02-27 Roland McGrath <roland@redhat.com>
1804 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1805 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1807 2009-02-26 Ulrich Drepper <drepper@redhat.com>
1809 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1810 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1811 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1814 2009-02-25 Ulrich Drepper <drepper@redhat.com>
1816 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1819 2009-02-24 Ulrich Drepper <drepper@redhat.com>
1821 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1822 Unify name of include protector macro.
1824 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1826 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1827 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1829 2009-01-29 Ulrich Drepper <drepper@redhat.com>
1831 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1834 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1835 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1836 * init.c (nptl_freeres): New function.
1837 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1838 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1839 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1841 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1842 load DSO. Assign last.
1843 (__unwind_freeres): New function.
1845 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1846 for better debugging. No need to use stack_list_add here.
1848 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1850 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1851 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1852 instead of computing relative timeout.
1853 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1854 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1856 2009-01-25 Ulrich Drepper <drepper@redhat.com>
1858 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1860 2009-01-08 Ulrich Drepper <drepper@redhat.com>
1862 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1863 (list_add_tail): Removed.
1865 2009-01-07 Ulrich Drepper <drepper@redhat.com>
1867 * (in_flight_stack): New variable.
1868 (stack_list_del): New function. Use instead of list_del.
1869 (stack_list_add): New function. Use instead of list_add when adding to
1870 stack_cache and stack_used lists.
1871 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1872 when the fork call interrupted another thread.
1874 2009-01-04 Ulrich Drepper <drepper@redhat.com>
1876 * init.c (__pthread_initialize_minimal_internal): Optimize test
1877 FUTEX_CLOCK_REALTIME a bit.
1879 2009-01-03 Ulrich Drepper <drepper@redhat.com>
1881 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1882 only passing five parameters to FUTEX_WAIT_BITSET call.
1884 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1885 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1886 instead of computing relative timeout.
1888 2009-01-02 Ulrich Drepper <drepper@redhat.com>
1890 * init.c (__pthread_initialize_minimal_internal): Check for
1891 FUTEX_CLOCK_REALTIME flag.
1892 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1893 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1896 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1897 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1898 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1899 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1900 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1901 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1903 2008-12-09 Ulrich Drepper <drepper@redhat.com>
1905 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1906 loop body instead of ; to avoid gcc warnings.
1907 (pthread_cleanup_pop_restore_np): Likewise.
1908 Patch by Caolán McNamara <caolanm@redhat.com>.
1910 2008-12-09 Jakub Jelinek <jakub@redhat.com>
1912 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1913 fast path here, for robust/PI/PP mutexes call
1914 __pthread_mutex_lock_full. Don't use switch, instead use a series
1915 of ifs according to their probability.
1916 (__pthread_mutex_lock_full): New function.
1917 * pthread_mutex_unlock.c: Include assert.h.
1918 (__pthread_mutex_unlock_usercnt): Handle only the
1919 fast path here, for robust/PI/PP mutexes call
1920 __pthread_mutex_unlock_full. Don't use switch, instead use a series
1921 of ifs according to their probability.
1922 (__pthread_mutex_unlock_full): New function.
1923 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1924 (__pthread_mutex_lock_full): Define.
1926 2008-12-08 Ulrich Drepper <drepper@redhat.com>
1928 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1929 implementation. Add necessary padding and.
1930 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1933 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1935 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1936 and FUTEX_WAKE_BITSET.
1938 2008-12-02 Ulrich Drepper <drepper@redhat.com>
1940 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1941 and FUTEX_WAKE_BITSET.
1942 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1943 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1944 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1945 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1947 2008-11-25 Roland McGrath <roland@redhat.com>
1949 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1950 Subdirectories moved to ports repository as
1951 sysdeps/.../nptl subdirectories.
1953 2008-11-12 Jakub Jelinek <jakub@redhat.com>
1956 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1958 * pthread_cond_init.c (__pthread_cond_init): Fix
1959 cond->__data.__nwaiters initialization.
1960 * Makefile (tests): Add tst-cond23.
1961 * tst-cond23.c: New test.
1963 2008-11-07 Jakub Jelinek <jakub@redhat.com>
1965 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1967 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1970 2008-11-01 Ulrich Drepper <drepper@redhat.com>
1973 * pthread_mutex_lock.c: Add support for private PI mutexes.
1974 * pthread_mutex_timedlock.c: Likewise.
1975 * pthread_mutex_trylock.c: Likewise.
1976 * pthread_mutex_unlock.c: Likewise.
1977 Patch mostly by Ben Jackson <ben@ben.com>.
1979 2008-10-31 Ulrich Drepper <drepper@redhat.com>
1982 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1983 Increase stack size for helper thread.
1985 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1987 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1988 assembly with a clobber list for access registers a0 and a1.
1990 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1992 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1993 to force runp->refcntr to be read from memory.
1995 2008-09-08 Richard Guenther <rguenther@suse.de>
1997 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1998 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1999 lll_timedlock, lll_robust_timedlock, lll_unlock,
2000 lll_robust_unlock): Promote private to int.
2002 2008-08-15 Ulrich Drepper <drepper@redhat.com>
2004 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2005 ARCH_RETRY_MMAP definitions.
2006 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2007 Define MAP_STACK when not defined.
2008 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
2009 handling of ARCH_RETRY_MMAP.
2011 2008-07-30 Ulrich Drepper <drepper@redhat.com>
2013 * tst-align2.c (f): Print message that f is reached.
2015 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
2018 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2019 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2021 2008-07-25 Ulrich Drepper <drepper@redhat.com>
2023 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2024 SOCK_CLOEXEC if possible.
2026 2008-05-29 Ulrich Drepper <drepper@redhat.com>
2028 * Makefile (tests): Add tst-rwlock2a.
2029 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2030 * tst-rwlock2a.c: New file.
2032 2008-06-12 Ulrich Drepper <drepper@redhat.com>
2034 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2036 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
2038 * sysdeps/pthread/pthread.h: Fix typo in comment.
2040 2008-05-28 Ulrich Drepper <drepper@redhat.com>
2042 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2043 of CPU set to the kernel.
2045 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2047 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2049 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2050 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2051 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2052 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2053 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2054 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2056 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
2058 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2060 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2062 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2064 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2067 2008-05-26 Ulrich Drepper <drepper@redhat.com>
2069 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2071 2008-05-20 Jakub Jelinek <jakub@redhat.com>
2073 David S. Miller <davem@davemloft.net>
2075 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2077 2008-05-10 Ulrich Drepper <drepper@redhat.com>
2079 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2080 __pshared correctly.
2081 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2083 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2085 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2087 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2089 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2091 2008-04-14 David S. Miller <davem@davemloft.net>
2093 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2094 (__old_sem_wait): Fix argument to lll_futex_wait().
2096 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2098 * pthread_create.c: Require pthread_mutex_trylock and
2099 pthread_key_delete for libgcc.
2101 2008-04-08 Jakub Jelinek <jakub@redhat.com>
2104 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2105 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2106 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2108 2008-03-27 Ulrich Drepper <drepper@redhat.com>
2110 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2111 <linux/limits.h> has defined it.
2112 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2113 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2114 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2115 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2117 2008-03-18 Jakub Jelinek <jakub@redhat.com>
2119 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2121 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2122 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2124 2008-03-14 Ulrich Drepper <drepper@redhat.com>
2126 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2127 HAVE_DL_DISCOVER_OSVERSION.
2128 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2129 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2131 2008-03-07 Ulrich Drepper <drepper@redhat.com>
2134 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2135 _POSIX_CHOWN_RESTRICTED value to zero.
2137 2008-01-31 Roland McGrath <roland@redhat.com>
2139 * Makefile (omit-deps): Variable removed.
2141 2008-01-30 Ulrich Drepper <drepper@redhat.com>
2143 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2144 unnecessary addr32 prefix.
2146 2008-01-29 Roland McGrath <roland@redhat.com>
2148 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2150 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2152 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2154 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2156 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2158 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2159 (__lll_lock_wait_private): Fix typo.
2160 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2161 (pthread_barrier_wait): Likewise. Adjust XADD use.
2162 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2164 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2165 (pthread_rwlock_timedrdlock): Return correct return value.
2166 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2167 (pthread_rwlock_timedwrlock): Likewise.
2169 2008-01-15 Ulrich Drepper <drepper@redhat.com>
2171 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2172 thread returns the program exits with an error code.
2174 2008-01-10 Ulrich Drepper <drepper@redhat.com>
2176 * pthread-errnos.sym: Add EOVERFLOW.
2177 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2178 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2179 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2180 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2182 2007-12-14 Ulrich Drepper <drepper@redhat.com>
2184 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2185 parameter. Passed it as permission to mmap.
2186 * allocatestack.c (allocate_stack): Pass prot as second parameter
2189 2007-12-12 Ulrich Drepper <drepper@redhat.com>
2191 * tst-basic7.c: Allocate memory for the stack.
2194 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2195 (__pthread_cond_timedwait): Don't use VDSO.
2196 Patch by Michal Januszewski.
2198 2007-12-07 Ulrich Drepper <drepper@redhat.com>
2201 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2202 Allow label before pthread_cleanup_pop.
2203 (pthread_cleanup_pop_restore_np): Likewise.
2205 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2207 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2208 Store 2 before returning ETIMEDOUT.
2210 2007-11-23 Ulrich Drepper <drepper@redhat.com>
2212 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2213 Store 2 before returning ETIMEDOUT.
2214 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2215 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2216 (__lll_lock_wait_private): Optimize.
2217 (__lll_lock_wait): Likewise.
2219 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2221 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2222 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2223 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2225 2007-11-08 Ulrich Drepper <drepper@redhat.com>
2228 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2229 If we time out, try one last time to lock the futex to avoid
2230 losing a wakeup signal.
2231 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2232 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2235 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2238 2007-11-07 Ulrich Drepper <drepper@redhat.com>
2241 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2242 mmap failed to EAGAIN.
2243 * Makefile (tests): Add tst-basic7.
2244 * tst-basic7.c: New file.
2246 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2248 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2249 Use __linkin_atfork.
2251 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2253 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2254 missing line continuations.
2255 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2256 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2258 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2261 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2262 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2263 (struct timer): Add next element.
2264 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2265 enqueue timer structure into __active_timer_sigev_thread list.
2266 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2267 remove timer struct from __active_timer_sigev_thread.
2268 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2269 Before using timer structure make sure it is still on the
2270 __active_timer_sigev_thread list. Keep lock until done.
2271 Define __active_timer_sigev_thread and
2272 __active_timer_sigev_thread_lock.
2274 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2276 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2277 Redefine thread_atfork for use of ATFORK_MEM.
2278 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2279 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2281 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2282 Use atomic operation when removing first element of list.
2284 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2286 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2287 routine instead of an alias to __new_sem_post.
2289 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2291 * init.c (__pthread_initialize_minimal): Initialize word to appease
2294 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2296 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2297 libc.so just clear NAME.
2298 (__libc_rwlock_fini): Nop inside of libc.so.
2299 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2302 2007-09-02 Ulrich Drepper <drepper@redhat.com>
2304 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2305 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2307 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2309 2007-08-21 Ulrich Drepper <drepper@redhat.com>
2312 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2313 reclaimed stack if necessary.
2314 * Makefile (tests): Add tst-tsd6.
2315 * tst-tsd6.c: New file.
2317 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2319 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2320 Add private argument.
2322 2007-08-20 Ulrich Drepper <drepper@redhat.com>
2324 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2325 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2327 2007-08-16 Jakub Jelinek <jakub@redhat.com>
2329 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2330 (__lll_robust_timedlock): Pass private as last argument to
2331 __lll_robust_timedlock_wait.
2332 (__lll_unlock): Fix a pasto.
2334 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2336 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2337 sparc_old_sem): New structs.
2338 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2339 (__sem_wait_cleanup): New function.
2340 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2341 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2342 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2344 (__old_sem_wait): New function.
2345 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2346 nptl/sysdeps/unix/sysv/linux/sparc version.
2347 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2349 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2350 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2351 (__new_sem_trywait): Use sparc_old_sem structure.
2352 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2353 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2354 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2355 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2356 lll_futex_timed_wait.
2357 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2358 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2359 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2361 (__old_sem_post): New function.
2362 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2363 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2364 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2365 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2366 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2367 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2369 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2371 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2372 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2373 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2374 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2375 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2376 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2377 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2379 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2380 kernel-features.h and tcb-offsets.h.
2381 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2382 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2384 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2386 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2387 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2389 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2390 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2391 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2392 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2393 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2394 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2395 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2397 2007-08-14 Jakub Jelinek <jakub@redhat.com>
2399 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2400 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2401 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2402 lll_futex_timed_wait.
2404 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2405 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2406 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2407 __lll_robust_unlock, __lll_wait_tid): Likewise.
2409 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2411 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2413 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2414 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2415 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2416 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2417 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2418 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2419 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2420 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2422 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2423 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2424 process private. Switch DW_CFA_advance_loc1 and some
2425 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2426 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2427 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2428 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2429 process private. Switch DW_CFA_advance_loc{1,2} and some
2430 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2431 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2432 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2433 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2435 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2436 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2437 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2439 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2440 (__pthread_cond_broadcast): Compare %r8 instead of
2441 dep_mutex-cond_*(%rdi) with $-1.
2442 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2443 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2446 2007-08-13 Ulrich Drepper <drepper@redhat.com>
2448 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2450 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2452 * allocatestack.c: Include kernel-features.h.
2453 * pthread_create.c: Likewise.
2454 * pthread_mutex_init.c: Likewise.
2456 * pthread_cond_timedwait.c: Likewise.
2457 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2458 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2459 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2460 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2461 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2462 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2463 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2465 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2467 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2468 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2469 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2470 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2472 2007-08-12 Jakub Jelinek <jakub@redhat.com>
2474 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2475 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2476 byte elements. One of them is the new __shared element.
2477 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2478 adjust names of other padding elements.
2479 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2480 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2481 byte elements. One of them is the new __shared element.
2482 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2483 adjust names of other padding elements.
2484 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2485 Renamed __pad1 element to __shared, adjust names of other padding
2487 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2488 (pthread_rwlock_t): Likewise.
2489 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2492 2007-08-09 Anton Blanchard <anton@samba.org>
2494 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2496 2007-08-12 Ulrich Drepper <drepper@redhat.com>
2498 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2499 <kernel-features.h>.
2500 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2502 2007-08-11 Ulrich Drepper <drepper@redhat.com>
2504 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2505 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2506 dealing with robust mutexes.
2507 * pthread_mutex_timedlock.c: Likewise.
2508 * pthread_mutex_trylock.c: Likewise.
2509 * pthread_mutex_unlock.c: Likewise.
2510 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2512 2007-08-06 Jakub Jelinek <jakub@redhat.com>
2514 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2515 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2516 (PTHREAD_MUTEX_PSHARED): Define.
2517 * pthread_mutex_init.c (__pthread_mutex_init): Set
2518 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2520 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2521 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2522 as second argument to lll_lock.
2523 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2524 instead of its __data.__lock field.
2525 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2526 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2528 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2529 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2530 instead of mutex->__data.__kind directly, pass
2531 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2532 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2533 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2534 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2535 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2536 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2537 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2538 of mutex->__data.__kind directly.
2539 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2540 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2541 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2542 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2543 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2544 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2546 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2547 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2548 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2550 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2551 Take mutex as argument instead of its __data.__lock field, pass
2552 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2553 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2554 __data.__lock field.
2555 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2556 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2557 to lll_robust_cond_lock.
2558 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2559 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2560 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2561 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2562 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2563 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2565 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2566 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2568 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2569 pshared variable, pass it to lll_lock, lll_unlock,
2570 lll_futex_timedwait and lll_futex_wake.
2571 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2572 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2574 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2575 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2577 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2578 lll_futex_wake_unlock): Likewise.
2579 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2581 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2582 lll_futex_wake_unlock): Likewise.
2583 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2585 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2586 lll_futex_wake_unlock): Likewise.
2587 (lll_futex_wake): Fix a typo.
2588 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2589 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2590 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2591 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2592 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2593 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2594 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2595 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2596 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2597 (__pthread_cond_timedwait): Likewise.
2598 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2599 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2601 2007-08-05 Jakub Jelinek <jakub@redhat.com>
2603 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2604 Don't use CGOTSETUP and CGOTRESTORE macros.
2605 (CGOTSETUP, CGOTRESTORE): Remove.
2606 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2609 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2611 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2612 definitions for private futexes.
2613 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2614 kernel-features.h and lowlevellock.h. Use private futexes if
2616 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2617 (__lll_mutex_lock_wait): Rename to
2618 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2619 (__lll_mutex_timedlock_wait): Rename to ...
2620 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2621 Don't compile in for libc.so.
2622 (__lll_mutex_unlock_wake): Rename to ...
2623 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2624 (__lll_timedwait_tid): Use __NR_gettimeofday.
2625 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2626 the header from assembler. Renamed all lll_mutex_* resp.
2627 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2628 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2629 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2631 (__lll_lock_wait_private): Add prototype.
2632 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2633 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2634 __lll_unlock_wake): Likewise.
2635 (lll_lock): Add private argument. Call __lll_lock_wait_private
2636 if private is constant LLL_PRIVATE.
2637 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2638 lll_timedlock, lll_robust_timedlock): Add private argument.
2639 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2640 if private is constant LLL_PRIVATE.
2641 (lll_robust_unlock, lll_robust_dead): Add private argument.
2642 (lll_lock_t): Remove.
2643 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2644 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2645 lll_cond_wake, lll_cond_broadcast): Remove.
2646 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2647 kernel-features.h and lowlevellock.h.
2648 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2649 (LOAD_FUTEX_WAIT): Define.
2650 (__lll_robust_mutex_lock_wait): Rename to ...
2651 (__lll_robust_lock_wait): ... this. Add private argument.
2652 Use LOAD_FUTEX_WAIT macro.
2653 (__lll_robust_mutex_timedlock_wait): Rename to ...
2654 (__lll_robust_timedlock_wait): ... this. Add private argument.
2655 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2656 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2658 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2659 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2660 __lll_mutex_{lock,unlock}_*.
2661 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2662 lowlevellock.h and pthread-errnos.h.
2663 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2664 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2665 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2666 __lll_mutex_{lock,unlock}_*.
2667 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2668 lowlevellock.h and pthread-errnos.h.
2669 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2670 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2671 __lll_mutex_{lock,unlock}_*.
2672 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2674 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2675 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2676 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2677 (__condvar_tw_cleanup): Likewise.
2678 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2680 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2681 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2682 __lll_mutex_{lock,unlock}_*.
2683 ( __condvar_w_cleanup): Likewise.
2684 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2685 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2686 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2688 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2689 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2690 __lll_mutex_{lock,unlock}_*.
2691 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2693 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2694 FUTEX_PRIVATE_FLAG): Remove.
2695 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2696 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2697 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2699 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2700 FUTEX_PRIVATE_FLAG): Remove.
2701 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2702 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2703 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2705 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2706 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2707 __lll_mutex_{lock,unlock}_*.
2708 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2710 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2711 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2712 __lll_mutex_{lock,unlock}_*.
2713 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2714 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2715 (__new_sem_post): Use standard initial exec code sequences.
2716 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2718 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2719 FUTEX_PRIVATE_FLAG): Remove.
2720 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2721 exec code sequences.
2722 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2723 (__new_sem_trywait): Use standard initial exec code sequences.
2724 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2725 (__new_sem_wait): Use standard initial exec code sequences.
2727 2007-07-31 Anton Blanchard <anton@samba.org>
2729 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2730 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2731 atomic_full_barrier.
2733 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2735 * allocatestack.c (stack_cache_lock): Change type to int.
2736 (get_cached_stack, allocate_stack, __deallocate_stack,
2737 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2738 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2739 as second argument to lll_lock and lll_unlock macros on
2741 * pthread_create.c (__find_in_stack_list): Likewise.
2742 (start_thread): Similarly with pd->lock. Use lll_robust_dead
2743 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2745 * descr.h (struct pthread): Change lock and setxid_futex field
2747 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2748 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2749 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2750 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2752 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2753 * pthread_cond_init.c (__pthread_cond_init): Likewise.
2754 * pthreadP.h (__attr_list_lock): Change type to int.
2755 * pthread_attr_init.c (__attr_list_lock): Likewise.
2756 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2757 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2759 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2760 also for lll_futex_{wake,wait}.
2761 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2763 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2764 LLL_SHARED as second argument to lll_{,un}lock.
2765 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2766 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2767 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2768 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2770 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2771 as second argument to lll_{,un}lock macros on pd->lock.
2772 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2773 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2774 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2775 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2777 * sysdeps/pthread/createthread.c (do_clone, create_thread):
2779 * pthread_once.c (once_lock): Change type to int.
2780 (__pthread_once): Pass LLL_PRIVATE as second argument to
2781 lll_{,un}lock macros on once_lock.
2782 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2783 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2784 rwlock->__data.__shared as second argument to them and similarly
2786 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2788 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2790 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2791 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2792 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2793 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2794 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2795 to lll_{,un}lock macros on __sem_mappings_lock.
2796 * sem_open.c (check_add_mapping): Likewise.
2797 (__sem_mappings_lock): Change type to int.
2798 * semaphoreP.h (__sem_mappings_lock): Likewise.
2799 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2800 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2801 instead of lll_*mutex_*, pass LLL_SHARED as last
2803 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2804 pass LLL_SHARED as last argument.
2805 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2806 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2807 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2808 pass LLL_SHARED as last argument.
2809 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2810 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2811 LLL_SHARED as last argument.
2812 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2813 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2815 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2816 __libc_lock_lock_recursive, __libc_lock_unlock,
2817 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2818 argument to lll_{,un}lock.
2819 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2820 _IO_lock_unlock): Likewise.
2821 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2823 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2824 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2826 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2827 free_mem): Likewise.
2828 (__fork_lock): Change type to int.
2829 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2830 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2831 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2833 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2834 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2835 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2837 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2838 pass it through to lll_futex_*wait, only compile in when
2840 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2841 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2842 argument and pass it through to lll_futex_*wait.
2843 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2844 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2845 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2846 inline functions to __lll_* resp. __lll_robust_*.
2847 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2848 (lll_mutex_dead): Add private argument.
2849 (__lll_lock_wait_private): New prototype.
2850 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2851 __lll_robust_lock_timedwait): Add private argument to prototypes.
2852 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2853 call __lll_lock_wait_private, otherwise pass private to
2855 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2856 __lll_robust_timedlock): Add private argument, pass it to
2857 __lll_*wait functions.
2858 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2859 call __lll_unlock_wake_private, otherwise pass private to
2861 (__lll_robust_unlock): Add private argument, pass it to
2862 __lll_robust_unlock_wake.
2863 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2864 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2865 argument, pass it through to __lll_* inline function.
2866 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2867 (lll_lock_t): Remove.
2868 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2869 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2870 lll_cond_wake, lll_cond_broadcast): Remove.
2871 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2872 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2873 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2874 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2875 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2876 the header from assembler. Renamed all lll_mutex_* resp.
2877 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2878 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2879 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2880 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2881 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2882 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2883 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2885 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2886 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2887 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2888 (lll_trylock): Likewise, use __lll_trylock_asm, pass
2889 MULTIPLE_THREADS_OFFSET as another asm operand.
2890 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2891 MULTIPLE_THREADS_OFFSET as last asm operand, call
2892 __lll_lock_wait_private if private is constant LLL_PRIVATE,
2893 otherwise pass private as another argument to __lll_lock_wait.
2894 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2895 lll_timedlock, lll_robust_timedlock): Add private argument, pass
2896 private as another argument to __lll_*lock_wait call.
2897 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2898 MULTIPLE_THREADS_OFFSET as another asm operand, call
2899 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2900 otherwise pass private as another argument to __lll_unlock_wake.
2901 (lll_robust_unlock): Add private argument, pass private as another
2902 argument to __lll_unlock_wake.
2903 (lll_robust_dead): Add private argument, use __lll_private_flag
2905 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2906 LLL_MUTEX_LOCK_INITIALIZER.
2907 (lll_lock_t): Remove.
2908 (LLL_LOCK_INITIALIZER_WAITERS): Define.
2909 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2910 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2911 lll_cond_wake, lll_cond_broadcast): Remove.
2912 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2913 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2914 2007-05-2{3,9} changes.
2915 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2916 kernel-features.h and lowlevellock.h.
2917 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2918 (LOAD_FUTEX_WAIT): Rewritten.
2919 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2921 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2922 (__lll_mutex_lock_wait): Rename to ...
2923 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
2924 %ecx, %ecx is now private argument. Don't compile in for libc.so.
2925 (__lll_mutex_timedlock_wait): Rename to ...
2926 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
2927 contains private argument. Don't compile in for libc.so.
2928 (__lll_mutex_unlock_wake): Rename to ...
2929 (__lll_unlock_wake): ... this. %ecx contains private argument.
2930 Don't compile in for libc.so.
2931 (__lll_timedwait_tid): Use __NR_gettimeofday.
2932 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2933 kernel-features.h and lowlevellock.h.
2934 (LOAD_FUTEX_WAIT): Define.
2935 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2937 (__lll_robust_mutex_lock_wait): Rename to ...
2938 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
2939 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
2941 (__lll_robust_mutex_timedlock_wait): Rename to ...
2942 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
2943 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2944 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2946 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2947 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2948 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2949 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2950 to __lll_lock_wait in %edx.
2951 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2952 Include lowlevellock.h and pthread-errnos.h.
2953 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2954 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2955 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2956 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2957 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2959 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2960 Include lowlevellock.h and pthread-errnos.h.
2961 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2962 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2963 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2964 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2965 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2967 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2968 Include lowlevellock.h.
2969 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2971 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2972 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2973 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2974 __lll_unlock_wake. Use __NR_gettimeofday.
2975 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2976 Include lowlevellock.h.
2977 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2978 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2979 to __lll_*, pass cond_lock address in %edx rather than %ecx to
2980 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2981 and __lll_unlock_wake.
2982 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2983 Include lowlevellock.h.
2984 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2985 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2986 MUTEX(%ebx) address in %edx rather than %ecx to
2987 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2988 and __lll_unlock_wake. Move return value from %ecx to %edx
2990 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2991 Include lowlevellock.h.
2992 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2994 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2995 MUTEX(%ebp) address in %edx rather than %ecx to
2996 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2997 and __lll_unlock_wake. Move return value from %ecx to %edx
2998 register. Use __NR_gettimeofday.
2999 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3000 Include lowlevellock.h.
3001 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3003 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3004 MUTEX(%ebp) address in %edx rather than %ecx to
3005 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3006 and __lll_unlock_wake. Move return value from %ecx to %edx
3007 register. Use __NR_gettimeofday.
3008 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3009 Include lowlevellock.h.
3010 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3011 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3012 MUTEX(%edi) address in %edx rather than %ecx to
3013 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3014 and __lll_unlock_wake.
3015 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3016 Include lowlevellock.h.
3017 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3018 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3019 MUTEX(%ebx) address in %edx rather than %ecx to
3020 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3021 and __lll_unlock_wake. Move return value from %ecx to %edx
3023 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3025 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3027 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3028 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3029 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3031 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3032 (sem_timedwait): Use __NR_gettimeofday.
3033 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3035 (LOCK): Don't define.
3036 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3038 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3039 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3041 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3042 2007-05-2{3,9} changes.
3043 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3044 kernel-features.h and lowlevellock.h.
3045 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3046 (LOAD_FUTEX_WAIT): Rewritten.
3047 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3048 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3049 (__lll_mutex_lock_wait): Rename to ...
3050 (__lll_lock_wait): ... this. %esi is now private argument.
3051 Don't compile in for libc.so.
3052 (__lll_mutex_timedlock_wait): Rename to ...
3053 (__lll_timedlock_wait): ... this. %esi contains private argument.
3054 Don't compile in for libc.so.
3055 (__lll_mutex_unlock_wake): Rename to ...
3056 (__lll_unlock_wake): ... this. %esi contains private argument.
3057 Don't compile in for libc.so.
3058 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3059 kernel-features.h and lowlevellock.h.
3060 (LOAD_FUTEX_WAIT): Define.
3061 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3062 (__lll_robust_mutex_lock_wait): Rename to ...
3063 (__lll_robust_lock_wait): ... this. %esi argument contains private.
3064 Use LOAD_FUTEX_WAIT macro.
3065 (__lll_robust_mutex_timedlock_wait): Rename to ...
3066 (__lll_robust_timedlock_wait): ... this. %esi argument contains
3067 private, use LOAD_FUTEX_WAIT macro.
3068 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3070 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3071 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3072 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3073 __lll_lock_wait and __lll_unlock_wake.
3074 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3075 Include lowlevellock.h and pthread-errnos.h.
3076 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3077 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3078 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3079 pass LLL_SHARED in %esi to both __lll_lock_wait and
3081 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3082 Include lowlevellock.h and pthread-errnos.h.
3083 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3084 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3085 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3086 pass LLL_SHARED in %esi to both __lll_lock_wait and
3088 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3089 Include lowlevellock.h.
3090 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3091 (__pthread_cond_timedwait): 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_wait.S:
3095 Include lowlevellock.h.
3096 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3097 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3098 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3099 and __lll_unlock_wake.
3100 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3101 Include lowlevellock.h.
3102 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3104 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3105 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3106 and __lll_unlock_wake.
3107 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3108 Include lowlevellock.h.
3109 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3111 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3112 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3113 and __lll_unlock_wake.
3114 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3115 Include lowlevellock.h.
3116 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3118 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3119 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3120 and __lll_unlock_wake.
3121 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3122 Include lowlevellock.h.
3123 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3125 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3126 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3127 and __lll_unlock_wake.
3128 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3129 Include lowlevellock.h.
3130 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3132 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3133 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3134 and __lll_unlock_wake.
3135 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3137 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3139 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3140 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3141 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3143 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3144 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3146 (LOCK): Don't define.
3147 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3149 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3150 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3151 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3152 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3153 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3154 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3155 (__lll_lock_wait_private): New function.
3156 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3157 it to lll_futex_*wait. Don't compile in for libc.so.
3158 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3160 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3161 (struct sparc_pthread_barrier): Remove.
3162 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3163 struct sparc_pthread_barrier. Pass
3164 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3165 and lll_futex_wait macros.
3166 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3168 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3169 Include sparc pthread_barrier_wait.c instead of generic one.
3171 2007-07-30 Jakub Jelinek <jakub@redhat.com>
3173 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3175 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3176 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3178 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3179 (pthread_rwlock_timedwrlock): Likewise.
3180 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3181 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3183 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3185 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3187 2007-07-26 Jakub Jelinek <jakub@redhat.com>
3189 * tst-locale2.c (useless): Add return statement.
3191 2007-07-24 Jakub Jelinek <jakub@redhat.com>
3193 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3194 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3195 * pthread_create.c (start_thread): Likewise.
3196 * init.c (sighandler_setxid): Likewise.
3197 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3198 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3199 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3200 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3201 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3202 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3203 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3204 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3205 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3207 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3209 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3211 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3212 __rtld_notify): Likewise.
3213 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3214 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3215 __pthread_once): Likewise.
3216 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3217 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3218 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3219 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3220 (lll_futex_wait): Add private argument, define as wrapper around
3221 lll_futex_timed_wait.
3222 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3223 use __lll_private_flag macro.
3224 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3225 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3226 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3227 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3228 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3229 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3230 (lll_futex_wait): Add private argument, define as wrapper around
3231 lll_futex_timed_wait.
3232 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3233 use __lll_private_flag macro.
3234 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3235 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3236 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3238 (lll_futex_timed_wait, lll_futex_wake): Use it.
3239 (lll_private_futex_wait, lll_private_futex_timed_wait,
3240 lll_private_futex_wake): Removed.
3241 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3242 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3243 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3244 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3245 (lll_futex_wait): Add private argument, define as wrapper around
3246 lll_futex_timed_wait.
3247 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3248 use __lll_private_flag macro.
3249 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3250 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3252 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3253 (lll_private_futex_wait, lll_private_futex_timed_wait,
3254 lll_private_futex_wake): Removed.
3255 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3256 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3257 (lll_private_futex_wait, lll_private_futex_timed_wait,
3258 lll_private_futex_wake): Removed.
3259 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3260 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3261 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3262 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3263 (lll_futex_wait): Add private argument, define as wrapper around
3264 lll_futex_timed_wait.
3265 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3266 use __lll_private_flag macro.
3267 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3268 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3270 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3272 (lll_futex_timed_wait, lll_futex_wake): Use it.
3273 (lll_private_futex_wait, lll_private_futex_timed_wait,
3274 lll_private_futex_wake): Removed.
3276 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3278 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3279 of the structure for sparc32.
3281 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3283 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3285 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3287 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3288 code used when private futexes are assumed.
3289 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3292 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3294 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3295 (__lll_private_flag): Define.
3296 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3297 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3299 (lll_private_futex_wait, lll_private_futex_timedwait,
3300 lll_private_futex_wake): Define as wrapper around non-_private
3302 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3303 (__lll_private_flag): Define.
3304 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3305 (lll_private_futex_wait, lll_private_futex_timedwait,
3306 lll_private_futex_wake): Define as wrapper around non-_private
3309 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3311 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3312 parameter to lll_futex_wait call.
3313 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3315 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3316 Replace lll_futex_wait with lll_private_futex_wait.
3317 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3318 Add LLL_SHARED parameter to lll_futex_wake().
3320 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3321 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3322 lll_private_futex_wake.
3323 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3324 bit from private parm before syscall.
3325 (lll_futex_timed_wait): Likewise.
3326 (lll_futex_wake): Likewise.
3327 (lll_futex_wake_unlock): Likewise.
3328 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3329 (lll_robust_mutex_unlock): Likewise.
3330 (lll_mutex_unlock_force): Likewise.
3331 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3333 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3335 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3336 compilation when unconditionally using private futexes.
3337 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3338 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3340 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3341 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3343 2007-07-17 Jakub Jelinek <jakub@redhat.com>
3345 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3348 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3350 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3353 2007-05-16 Roland McGrath <roland@redhat.com>
3355 * init.c (__nptl_initial_report_events): New variable.
3356 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3359 2007-06-22 Jakub Jelinek <jakub@redhat.com>
3361 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3362 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3364 2007-06-19 Ulrich Drepper <drepper@redhat.com>
3366 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3369 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3371 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3372 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3373 * pthread_mutex_timedlock.c: Likewise.
3374 * pthread_mutex_trylock.c: Likewise.
3375 * pthread_mutex_unlock.c: Likewise.
3377 2007-06-17 Andreas Schwab <schwab@suse.de>
3379 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3382 2007-06-17 Ulrich Drepper <drepper@redhat.com>
3384 * allocatestack.c (allocate_stack): Make code compile if
3385 __ASSUME_PRIVATE_FUTEX is set.
3387 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3389 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3390 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3391 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3392 (__pthread_rwlock_wrlock): Likewise.
3393 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3394 (pthread_rwlock_timedrdlock): Likewise.
3395 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3396 (pthread_rwlock_timedwrlock): Likewise.
3397 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3398 (__pthread_rwlock_unlock): Likewise.
3400 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3402 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3403 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3404 Split __flags into __flags, __shared, __pad1 and __pad2.
3405 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3406 futexes if they are available.
3407 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3408 in libc-lowlevellock.S allow using private futexes.
3409 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3410 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3411 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3412 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3413 lll_private_futex_timed_wait and lll_private_futex_wake.
3414 (lll_robust_mutex_unlock): Fix typo.
3415 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3416 field in futex command setup.
3417 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3418 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3419 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3420 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3421 if they are available. Remove clear_once_control.
3422 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3423 futexes if they are available.
3424 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3425 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3426 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3427 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3428 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3429 Wake only when there are waiters.
3430 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3431 support. Indicate that there are waiters. Remove unnecessary
3432 extra cancellation test.
3433 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3434 left-over duplication of __sem_wait_cleanup.
3436 2007-06-07 Ulrich Drepper <drepper@redhat.com>
3438 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3439 parameter to lll_futex_wait, lll_futex_timed_wait, and
3440 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3441 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3442 lll_private_futex_wake.
3443 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3444 * allocatestack.c: Adjust use of lll_futex_* macros.
3446 * lowlevellock.h: Likewise.
3447 * pthread_barrier_wait.c: Likewise.
3448 * pthread_cond_broadcast.c: Likewise.
3449 * pthread_cond_destroy.c: Likewise.
3450 * pthread_cond_signal.c: Likewise.
3451 * pthread_cond_timedwait.c: Likewise.
3452 * pthread_cond_wait.c: Likewise.
3453 * pthread_create.c: Likewise.
3454 * pthread_mutex_lock.c: Likewise.
3455 * pthread_mutex_setprioceiling.c: Likewise.
3456 * pthread_mutex_timedlock.c: Likewise.
3457 * pthread_mutex_unlock.c: Likewise.
3458 * pthread_rwlock_timedrdlock.c: Likewise.
3459 * pthread_rwlock_timedwrlock.c: Likewise.
3460 * pthread_rwlock_unlock.c: Likewise.
3461 * sysdeps/alpha/tls.h: Likewise.
3462 * sysdeps/i386/tls.h: Likewise.
3463 * sysdeps/ia64/tls.h: Likewise.
3464 * sysdeps/powerpc/tls.h: Likewise.
3465 * sysdeps/pthread/aio_misc.h: Likewise.
3466 * sysdeps/pthread/gai_misc.h: Likewise.
3467 * sysdeps/s390/tls.h: Likewise.
3468 * sysdeps/sh/tls.h: Likewise.
3469 * sysdeps/sparc/tls.h: Likewise.
3470 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3471 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3472 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3473 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3474 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3475 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3476 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3477 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3478 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3479 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3481 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3482 * sysdeps/x86_64/tls.h: Likewise.
3484 2007-05-29 Ulrich Drepper <drepper@redhat.com>
3486 * pthread_getattr_np.c: No need to install a cancellation handler,
3487 this is no cancellation point.
3488 * pthread_getschedparam.c: Likewise.
3489 * pthread_setschedparam.c: Likewise.
3490 * pthread_setschedprio.c: Likewise.
3491 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3493 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3494 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3495 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3496 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3497 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3498 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3499 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3500 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3501 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3502 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3503 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3504 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3506 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3507 whether there are more than one thread makes no sense here since
3508 we only call the slow path if the locks are taken.
3509 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3511 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3512 COND_NWAITERS_SHIFT.
3513 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3515 * pthread_cond_init.c: Likewise.
3516 * pthread_cond_timedwait.c: Likewise.
3517 * pthread_cond_wait.c: Likewise.
3518 * pthread_condattr_getclock.c: Likewise.
3519 * pthread_condattr_setclock.c: Likewise.
3520 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3521 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3522 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3523 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3524 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3526 2007-05-28 Jakub Jelinek <jakub@redhat.com>
3528 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3531 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3533 (THREAD_GSCOPE_GET_FLAG): Remove.
3534 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3535 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3537 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3538 (THREAD_GSCOPE_GET_FLAG): Remove.
3539 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3540 instead of THREAD_GSCOPE_GET_FLAG.
3541 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3543 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3544 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3545 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3546 THREAD_GSCOPE_WAIT): Define.
3547 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3548 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3549 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3550 THREAD_GSCOPE_WAIT): Define.
3551 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3552 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3553 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3554 THREAD_GSCOPE_WAIT): Define.
3555 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3556 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3557 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3558 THREAD_GSCOPE_WAIT): Define.
3560 2007-05-24 Richard Henderson <rth@redhat.com>
3562 * descr.h (struct pthread): Add header.gscope_flag.
3563 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3564 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3565 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3566 THREAD_GSCOPE_WAIT): Define.
3568 2007-05-27 Ulrich Drepper <drepper@redhat.com>
3570 * init.c: Make it compile with older kernel headers.
3572 * tst-initializers1.c: Show through exit code which test failed.
3574 * pthread_rwlock_init.c: Also initialize __shared field.
3575 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3576 element in rwlock structure into four byte elements. One of them is
3577 the new __shared element.
3578 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3580 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3581 __shared, adjust names of other padding elements.
3582 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3583 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3584 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3585 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3587 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3588 futex to use private operations if possible.
3589 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3591 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3593 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3594 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3595 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3596 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3598 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3600 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3601 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3603 2007-05-26 Ulrich Drepper <drepper@redhat.com>
3605 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3606 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3607 * pthread_rwlock_timedrdlock.c: Likewise.
3608 * pthread_rwlock_tryrdlock.c: Likewise.
3610 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3613 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3614 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3615 duplication of __sem_wait_cleanup.
3617 * allocatestack.c: Revert last change.
3619 * sysdeps/i386/tls.h: Likewise.
3620 * sysdeps/x86_64/tls.h: Likewise.
3621 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3623 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3625 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3627 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3628 * pthread_barrier_init.c: Set private flag if pshared and private
3629 futexes are supported.
3630 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3631 private field in futex command setup.
3632 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3634 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3636 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3638 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3639 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3640 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3641 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3642 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3644 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3645 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3646 fields in the structure.
3647 (__old_sem_init): New function.
3648 * sem_open.c: Initialize all fields of the structure.
3649 * sem_getvalue.c: Adjust for renamed element.
3650 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3651 (gen-as-const-headers): Add structsem.sym.
3652 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3653 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3654 struct new_sem. Add struct old_sem.
3655 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3656 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3657 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3658 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3659 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3660 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3661 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3662 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3663 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3664 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3665 * tst-sem10.c: New file.
3666 * tst-sem11.c: New file.
3667 * tst-sem12.c: New file.
3668 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3671 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3672 Jakub Jelinek <jakub@redhat.com>
3674 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3675 Move __pthread_enable_asynccancel right before futex syscall.
3676 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3679 2007-05-24 Jakub Jelinek <jakub@redhat.com>
3681 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3682 THREAD_COPY_PRIVATE_FUTEX): Define.
3683 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3684 THREAD_COPY_PRIVATE_FUTEX): Define.
3685 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3686 * init.c (__pthread_initialize_minimal_internal): Use
3687 THREAD_SET_PRIVATE_FUTEX.
3689 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3690 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3691 THREAD_GSCOPE_FLAG_WAIT): Define.
3692 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3693 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3694 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3696 (THREAD_GSCOPE_GET_FLAG): Define.
3697 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3698 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3699 instead of ->header.gscope_flag directly.
3701 2007-05-23 Ulrich Drepper <drepper@redhat.com>
3703 * init.c (__pthread_initialize_minimal_internal): Check whether
3704 private futexes are available.
3705 * allocatestack.c (allocate_stack): Copy private_futex field from
3706 current thread into the new stack.
3707 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3708 futexes if they are available.
3709 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3710 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3711 in libc-lowlevellock.S allow using private futexes.
3712 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3713 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3715 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3716 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3717 if they are available.
3718 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3719 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3720 * sysdeps/i386/tcb-offsets.sym: Likewise.
3721 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3722 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3724 2007-05-21 Ulrich Drepper <drepper@redhat.com>
3726 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3727 Remove ptr_wait_lookup_done again.
3728 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3729 (__pthread_initialize_minimal_internal): Initialize
3730 _dl_wait_lookup_done pointer in _rtld_global directly.
3731 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3732 Remove code to code _dl_wait_lookup_done.
3733 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3736 2007-05-21 Jakub Jelinek <jakub@redhat.com>
3738 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3739 pthread_mutex_init failed with ENOTSUP.
3741 2007-05-19 Ulrich Drepper <drepper@redhat.com>
3743 * allocatestack.c (__wait_lookup_done): New function.
3744 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3745 Add ptr_wait_lookup_done.
3746 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3747 * pthreadP.h: Declare __wait_lookup_done.
3748 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3749 Define macros to implement reference handling of global scope.
3750 * sysdeps/x86_64/tls.h: Likewise.
3751 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3752 Initialize GL(dl_wait_lookup_done).
3754 2007-05-17 Ulrich Drepper <drepper@redhat.com>
3757 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3759 * pthread_mutex_timedlock.c: Likewise.
3760 * pthread_mutex_trylock.c: Likewise.
3761 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3763 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3764 * tst-robust9.c: New file.
3765 * tst-robustpi9.c: New file.
3767 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3768 unnecessary extra cancellation test.
3770 2007-05-14 Ulrich Drepper <drepper@redhat.com>
3772 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3773 extra cancellation test.
3774 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3776 2007-05-10 Ulrich Drepper <drepper@redhat.com>
3778 * descr.h (struct pthread): Rearrange members to fill hole in
3781 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3782 (__pthread_setaffinity_new): If syscall was successful and
3783 RESET_VGETCPU_CACHE is defined, use it before returning.
3784 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3786 2007-05-10 Jakub Jelinek <jakub@redhat.com>
3789 * tst-align2.c: Include stackinfo.h.
3790 * tst-getpid1.c: Likewise.
3792 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
3795 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3796 * tst-getpid1.c (do_test): Likewise.
3799 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3800 (allocate_stack): Likewise.
3802 2007-05-07 Ulrich Drepper <drepper@redhat.com>
3804 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3805 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3806 (__lll_robust_timedlock_wait): Likewise.
3807 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3809 2007-05-06 Mike Frysinger <vapier@gentoo.org>
3812 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3813 * tst-cancel4.c (tf_fdatasync): New test.
3815 2007-04-27 Ulrich Drepper <drepper@redhat.com>
3818 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3819 check mutexes like normal mutexes.
3822 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3823 Initialize the whole sigevent structure to appease valgrind.
3825 2007-04-25 Ulrich Drepper <drepper@redhat.com>
3827 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3828 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3830 2007-04-06 Ulrich Drepper <drepper@redhat.com>
3832 * tst-locale1.c: Avoid warnings.
3833 * tst-locale2.c: Likewise.
3835 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3837 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3838 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3840 2007-03-16 Jakub Jelinek <jakub@redhat.com>
3842 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3843 __extern_always_inline where appropriate.
3844 * sysdeps/pthread/pthread.h: Likewise.
3846 2007-03-13 Richard Henderson <rth@redhat.com>
3848 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3849 separate cfi regions for the two subsections.
3851 2007-02-25 Ulrich Drepper <drepper@redhat.com>
3853 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3854 new thread, don't just decrement it.
3855 Patch by Suzuki K P <suzuki@in.ibm.com>.
3857 2007-02-21 Ulrich Drepper <drepper@redhat.com>
3859 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3860 PTHFCT_CALL definition.
3862 2007-02-18 Ulrich Drepper <drepper@redhat.com>
3864 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3865 available, don't use it.
3867 2007-02-09 Jakub Jelinek <jakub@redhat.com>
3869 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3870 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3871 call into the kernel to delay.
3873 2007-01-18 Ulrich Drepper <drepper@redhat.com>
3875 * tst-initializers1.c: We want to test the initializers as seen
3876 outside of libc, so undefined _LIBC.
3878 * pthread_join.c (cleanup): Avoid warning.
3880 2007-01-17 Ulrich Drepper <drepper@redhat.com>
3882 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3883 (__lll_timedwait_tid): Add unwind info.
3885 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3886 function table, mangle the pointers.
3887 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3888 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3889 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3890 demangle pointers before use.
3891 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3893 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3894 * sysdeps/pthread/setxid.h: Likewise.
3896 2007-01-12 Ulrich Drepper <drepper@redhat.com>
3898 * tst-rwlock7.c: Show some more information in case of correct
3901 2007-01-11 Ulrich Drepper <drepper@redhat.com>
3903 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3904 (lll_futex_timed_wait): Undo part of last change, don't negate
3907 2007-01-10 Ulrich Drepper <drepper@redhat.com>
3909 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
3910 FUTEX_CMP_REQUEUE and lll_futex_requeue.
3912 2006-12-28 David S. Miller <davem@davemloft.net>
3914 * shlib-versions: Fix sparc64 linux target specification.
3916 2007-01-10 Jakub Jelinek <jakub@redhat.com>
3918 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3919 Adjust include path for pthread_barrier_wait.c move.
3921 2006-12-21 Jakub Jelinek <jakub@redhat.com>
3923 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3924 tid isn't reread from pd->tid in between ESRCH test and the syscall.
3926 2006-12-06 Jakub Jelinek <jakub@redhat.com>
3928 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3929 6 argument cancellable syscalls.
3930 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3931 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3932 6 argument cancellable syscalls.
3933 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3935 2006-12-09 Ulrich Drepper <drepper@redhat.com>
3937 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3938 (__rtld_mrlock_initialize): Add missing closing parenthesis.
3940 2006-10-30 Jakub Jelinek <jakub@redhat.com>
3942 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3943 __sync_lock_release instead of __sync_lock_release_si.
3945 2006-10-29 Jakub Jelinek <jakub@redhat.com>
3947 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3949 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3950 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3951 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3952 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3953 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3954 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3955 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3956 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3957 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3958 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3959 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3961 2006-10-27 Ulrich Drepper <drepper@redhat.com>
3963 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3964 * pthread_barrier_wait.c: ...here.
3965 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3966 * pthread_cond_broadcast.c: ...here.
3967 * sysdeps/pthread/pthread_cond_signal.c: Move to...
3968 * pthread_cond_signal.c: ...here.
3969 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3970 * pthread_cond_timedwait.c: ...here.
3971 * sysdeps/pthread/pthread_cond_wait.c: Move to...
3972 * pthread_cond_wait.c: ...here.
3973 * sysdeps/pthread/pthread_once.c: Move to...
3974 * pthread_once.c: ...here.
3975 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3976 * pthread_rwlock_rdlock.c: ...here.
3977 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3978 * pthread_rwlock_timedrdlock.c: ...here.
3979 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3980 * pthread_rwlock_timedwrlock.c: ...here.
3981 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3982 * pthread_rwlock_unlock.c: ...here.
3983 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3984 * pthread_rwlock_wrlock.c: ...here.
3985 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3986 * pthread_spin_destroy.c: ...here.
3987 * sysdeps/pthread/pthread_spin_init.c: Move to...
3988 * pthread_spin_init.c: ...here.
3989 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3990 * pthread_spin_unlock.c: ...here.
3991 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3992 * pthread_getcpuclockid.c: ...here.
3994 * init.c: USE_TLS support is now always enabled.
3995 * tst-tls5.h: Likewise.
3996 * sysdeps/alpha/tls.h: Likewise.
3997 * sysdeps/i386/tls.h: Likewise.
3998 * sysdeps/ia64/tls.h: Likewise.
3999 * sysdeps/powerpc/tls.h: Likewise.
4000 * sysdeps/s390/tls.h: Likewise.
4001 * sysdeps/sh/tls.h: Likewise.
4002 * sysdeps/sparc/tls.h: Likewise.
4003 * sysdeps/x86_64/tls.h: Likewise.
4005 2006-10-27 Jakub Jelinek <jakub@redhat.com>
4007 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4008 __rtld_mrlock_change): Update oldval if atomic compare and exchange
4011 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4012 Define to THREAD_SELF->header.multiple_threads.
4013 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4015 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4017 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4018 (SINGLE_THREAD_P): Likewise.
4019 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4020 (SINGLE_THREAD_P): Likewise.
4021 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4022 (SINGLE_THREAD_P): Likewise.
4023 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4024 (SINGLE_THREAD_P): Likewise.
4025 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4027 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4028 (SINGLE_THREAD_P): Likewise.
4029 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4030 (SINGLE_THREAD_P): Likewise.
4031 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4034 2006-10-26 Jakub Jelinek <jakub@redhat.com>
4036 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4037 by default rather than 2_3_3.
4039 2006-10-17 Jakub Jelinek <jakub@redhat.com>
4041 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4042 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4043 atomic_* instead of catomic_* macros.
4045 2006-10-12 Ulrich Drepper <drepper@redhat.com>
4048 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4049 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4050 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4051 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4052 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4053 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4054 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4055 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4056 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4057 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4058 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4059 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4060 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4062 2006-10-11 Ulrich Drepper <drepper@redhat.com>
4064 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4065 cancelable syscalls with six parameters.
4067 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4068 operations instead of atomic_*.
4070 2006-10-09 Ulrich Drepper <drepper@redhat.com>
4072 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4074 2006-10-07 Ulrich Drepper <drepper@redhat.com>
4076 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4077 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4078 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4080 * pthread_attr_setstack.c: Allow overwriting the version number of the
4082 * pthread_attr_setstacksize.c: Likewise.
4083 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4085 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4086 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4088 2006-09-24 Ulrich Drepper <drepper@redhat.com>
4091 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4092 Patch by Petr Baudis.
4094 2006-09-18 Jakub Jelinek <jakub@redhat.com>
4096 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4098 * tst-cancel2.c (tf): Loop as long as something was written.
4100 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4102 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4103 mutexes wake all mutexes.
4104 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4105 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4106 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4108 2006-09-12 Ulrich Drepper <drepper@redhat.com>
4110 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4111 to guarantee the thread is always canceled.
4113 2006-09-08 Jakub Jelinek <jakub@redhat.com>
4115 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4117 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4118 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4119 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4120 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4121 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4123 2006-09-08 Ulrich Drepper <drepper@redhat.com>
4126 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4127 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4128 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4129 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4130 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4131 * Makefile (tests): Add tst-cond22.
4132 * tst-cond22.c: New file.
4134 2006-09-05 Ulrich Drepper <drepper@redhat.com>
4137 * descr.h (struct pthread): Add parent_cancelhandling.
4138 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4139 cancelhandling value to child.
4140 * pthread_create.c (start_thread): If parent thread was canceled
4141 reset the SIGCANCEL mask.
4142 * Makefile (tests): Add tst-cancel25.
4143 * tst-cancel25.c: New file.
4145 2006-09-05 Jakub Jelinek <jakub@redhat.com>
4146 Ulrich Drepper <drepper@redhat.com>
4148 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4149 counterp if it is already zero.
4150 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4152 2006-03-04 Jakub Jelinek <jakub@redhat.com>
4153 Roland McGrath <roland@redhat.com>
4155 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4156 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4157 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4158 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4159 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4160 lll_robust_mutex_timedlock, lll_mutex_unlock,
4161 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4162 Add _L_*_ symbols around the subsection.
4163 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4164 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4166 2006-03-03 Jakub Jelinek <jakub@redhat.com>
4167 Roland McGrath <roland@redhat.com>
4169 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4170 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4171 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4172 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4173 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4174 lll_robust_mutex_timedlock, lll_mutex_unlock,
4175 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4176 Add _L_*_ symbols around the subsection.
4177 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4178 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4180 2006-08-31 Ulrich Drepper <drepper@redhat.com>
4182 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4183 change because it can disturb too much existing code. If real hard
4184 reader preference is needed we'll introduce another type.
4185 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4186 (pthread_rwlock_timedwrlock): Likewise.
4187 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4190 2006-08-30 Ulrich Drepper <drepper@redhat.com>
4192 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4194 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4195 (pthread_rwlock_timedwrlock): Likewise.
4196 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4199 2006-08-25 Jakub Jelinek <jakub@redhat.com>
4201 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4202 Only define ifdef SHARED.
4204 2006-08-23 Ulrich Drepper <drepper@redhat.com>
4206 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4207 (free_stacks): ...here.
4208 (__free_stack_cache): New function.
4209 * pthreadP.h: Declare __free_stack_cache.
4210 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4212 * init.c (pthread_functions): Initialize ptr_freeres.
4213 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4214 New freeres function.
4216 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4219 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4221 2006-08-20 Ulrich Drepper <drepper@redhat.com>
4223 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4224 _XOPEN_REALTIME_THREADS.
4226 2006-08-15 Jakub Jelinek <jakub@redhat.com>
4228 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4229 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4230 HAVE_CLOCK_GETTIME_VSYSCALL.
4231 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4233 2006-08-14 Jakub Jelinek <jakub@redhat.com>
4235 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4236 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4237 * descr.h (struct priority_protection_data): New type.
4238 (struct pthread): Add tpp field.
4239 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4240 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4241 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4242 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4244 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4245 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4246 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4247 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4249 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4251 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4252 * pthread_mutexattr_getprioceiling.c
4253 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4254 in the SCHED_FIFO priority range.
4255 * pthread_mutexattr_setprioceiling.c
4256 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4257 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4258 if mutex is not TPP. Ceiling is now in __data.__lock.
4259 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4260 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4261 is now in __data.__lock. Add locking.
4262 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4263 * Makefile (libpthread-routines): Add tpp.
4264 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4265 * tst-tpp.h: New file.
4266 * tst-mutexpp1.c: New file.
4267 * tst-mutexpp6.c: New file.
4268 * tst-mutexpp10.c: New file.
4269 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4270 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4272 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4275 * pthread_join.c (pthread_join): Account for self being canceled
4276 when checking for deadlocks.
4277 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4278 (tf1): Don't print anything after pthread_join returns, this would be
4279 another cancellation point.
4281 * tst-join6.c: New file.
4282 * Makefile (tests): Add tst-join6.
4284 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4287 * pthread_setspecific.c (__pthread_setspecific): Check
4288 out-of-range index before checking for unused key.
4290 * sysdeps/pthread/gai_misc.h: New file.
4292 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4294 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4295 file. Don't use sysctl.
4296 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4297 overwrite the file if this is likely not true.
4299 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4301 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4302 * Makefile (tests): Add tst-getpid3.
4303 * tst-getpid3.c: New file.
4305 2006-07-30 Roland McGrath <roland@redhat.com>
4307 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4309 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4310 (pause_not_cancel): New macro.
4311 (nanosleep_not_cancel): New macro.
4312 (sigsuspend_not_cancel): New macro.
4313 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4314 nanosleep_not_cancel macro from <not-cancel.h>.
4315 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4316 macro from <not-cancel.h>.
4318 2006-07-28 Ulrich Drepper <drepper@redhat.com>
4319 Jakub Jelinek <jakub@redhat.com>
4321 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4322 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4323 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4324 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4325 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4326 * pthread_mutex_lock.c: Likewise.
4327 * pthread_mutex_timedlock.c: Likewise.
4328 * pthread_mutex_trylock.c: Likewise.
4329 * pthread_mutex_unlock.c: Likewise.
4330 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4332 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4333 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4334 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4335 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4336 pthread-pi-defines.sym.
4337 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4338 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4339 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4340 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4341 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4342 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4343 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4344 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4345 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4346 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4347 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4348 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4349 * tst-mutex2.c: Likewise.
4350 * tst-mutex3.c: Likewise.
4351 * tst-mutex4.c: Likewise.
4352 * tst-mutex5.c: Likewise.
4353 * tst-mutex6.c: Likewise.
4354 * tst-mutex7.c: Likewise.
4355 * tst-mutex7a.c: Likewise.
4356 * tst-mutex8.c: Likewise.
4357 * tst-mutex9.c: Likewise.
4358 * tst-robust1.c: Likewise.
4359 * tst-robust7.c: Likewise.
4360 * tst-robust8.c: Likewise.
4361 * tst-mutexpi1.c: New file.
4362 * tst-mutexpi2.c: New file.
4363 * tst-mutexpi3.c: New file.
4364 * tst-mutexpi4.c: New file.
4365 * tst-mutexpi5.c: New file.
4366 * tst-mutexpi6.c: New file.
4367 * tst-mutexpi7.c: New file.
4368 * tst-mutexpi7a.c: New file.
4369 * tst-mutexpi8.c: New file.
4370 * tst-mutexpi9.c: New file.
4371 * tst-robust1.c: New file.
4372 * tst-robust2.c: New file.
4373 * tst-robust3.c: New file.
4374 * tst-robust4.c: New file.
4375 * tst-robust5.c: New file.
4376 * tst-robust6.c: New file.
4377 * tst-robust7.c: New file.
4378 * tst-robust8.c: New file.
4379 * Makefile (tests): Add the new tests.
4381 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4382 * pthread_mutex_destroy.c: Remove unneeded label.
4384 2006-07-01 Ulrich Drepper <drepper@redhat.com>
4386 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4387 computations to compile time.
4389 2006-06-04 Ulrich Drepper <drepper@redhat.com>
4391 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4393 2006-05-15 Ulrich Drepper <drepper@redhat.com>
4395 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4397 2006-05-11 Ulrich Drepper <drepper@redhat.com>
4399 * pthread_key_create.c (__pthread_key_create): Do away with
4400 __pthread_keys_lock.
4402 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4403 (__kernel_cpumask_size): Mark as hidden.
4404 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4406 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4407 * semaphoreP.h (__sem_mappings_lock): Likewise.
4409 2006-05-10 Ulrich Drepper <drepper@redhat.com>
4411 * pthread_atfork.c: Mark __dso_handle as hidden.
4413 2006-05-09 Ulrich Drepper <drepper@redhat.com>
4416 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4417 the reload problem. Change the one path in pthread_cancel_init
4418 which causes the problem. Force gcc to reload. Simplify callers.
4419 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4420 (_Unwind_GetBSP): Undo last patch.
4422 2006-05-07 Ulrich Drepper <drepper@redhat.com>
4424 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4425 function pointer is reloaded after pthread_cancel_init calls.
4428 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4429 pointers are reloaded after pthread_cancel_init calls.
4431 2006-05-01 Ulrich Drepper <drepper@redhat.com>
4433 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4436 2006-04-27 Ulrich Drepper <drepper@redhat.com>
4438 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4439 Allocate new object which is passed to timer_sigev_thread so that
4440 the timer can be deleted before the new thread is scheduled.
4442 2006-04-26 Roland McGrath <roland@redhat.com>
4444 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4446 2006-04-08 Ulrich Drepper <drepper@redhat.com>
4448 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4449 suffix for conditional jumps.
4450 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4451 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4452 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4453 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4454 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4455 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4457 * init.c (sigcancel_handler): Compare with correct PID even if the
4458 thread is in the middle of a fork call.
4459 (sighandler_setxid): Likewise.
4460 Reported by Suzuki K P <suzuki@in.ibm.com> .
4462 2006-04-07 Jakub Jelinek <jakub@redhat.com>
4464 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4466 2006-04-06 Ulrich Drepper <drepper@redhat.com>
4468 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4469 fails [Coverity CID 105].
4471 2006-04-05 Ulrich Drepper <drepper@redhat.com>
4473 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4475 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4478 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4479 Define __lll_rel_instr using lwsync.
4481 2006-03-27 Ulrich Drepper <drepper@redhat.com>
4483 * allocatestack.c (allocate_stack): Always initialize robust_head.
4484 * descr.h: Define struct robust_list_head.
4485 (struct pthread): Use robust_list_head in robust mutex list definition.
4486 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4487 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4488 (__pthread_initialize_minimal_internal): Register robust_list with
4490 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4491 Declare __set_robust_list_avail.
4492 * pthread_create.c (start_thread): Register robust_list of new thread.
4493 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4495 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4496 number of users, it's unreliable.
4497 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4498 set_robust_list syscall is available.
4499 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4500 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4501 Set robust_head.list_op_pending before trying to lock a robust mutex.
4502 * pthread_mutex_timedlock.c: Likewise.
4503 * pthread_mutex_trylock.c: Likewise.
4504 * pthread_mutex_unlock.c: Likewise for unlocking.
4505 * Makefile (tests): Add tst-robust8.
4506 * tst-robust8.c: New file.
4508 2006-03-08 Andreas Schwab <schwab@suse.de>
4510 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4511 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4513 2006-03-05 Roland McGrath <roland@redhat.com>
4515 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4516 and $config_os doesn't match *linux*.
4518 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
4520 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4521 Use __syscall_error.
4522 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4523 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4524 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4525 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4526 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4527 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4529 2006-03-02 Ulrich Drepper <drepper@redhat.com>
4531 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4533 2006-03-01 Ulrich Drepper <drepper@redhat.com>
4535 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4536 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4538 (__lll_robust_timedlock_wait): Likewise.
4539 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4540 (__lll_robust_lock_wait): Likewise.
4541 (__lll_robust_timedlock_wait): Likewise.
4542 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4543 (__lll_robust_lock_wait): Likewise.
4544 (__lll_robust_timedlock_wait): Likewise.
4546 2006-03-01 Jakub Jelinek <jakub@redhat.com>
4548 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4549 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4550 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4551 lll_robust_mutex_unlock): Define.
4552 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4554 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4556 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4557 instead of <clone.S>.
4559 2006-02-27 Jakub Jelinek <jakub@redhat.com>
4561 * Makefile (libpthread-routines): Add
4562 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4563 and pthread_mutex_[sg]etprioceiling.
4564 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4565 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4566 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4567 pthread_mutex_setprioceiling.
4568 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4569 PTHREAD_PRIO_PROTECT): New enum values.
4570 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4571 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4572 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4574 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4575 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4576 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4578 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4579 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4580 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4581 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4582 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4583 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4584 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4586 * pthread_mutex_getprioceiling.c: New file.
4587 * pthread_mutex_setprioceiling.c: New file.
4588 * pthread_mutexattr_getprioceiling.c: New file.
4589 * pthread_mutexattr_setprioceiling.c: New file.
4590 * pthread_mutexattr_getprotocol.c: New file.
4591 * pthread_mutexattr_setprotocol.c: New file.
4593 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4595 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4597 2006-02-27 Roland McGrath <roland@redhat.com>
4599 * sysdeps/pthread/Subdirs: List nptl here too.
4600 * configure (libc_add_on_canonical): New variable.
4602 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4604 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4605 self to get main source tree's file.
4606 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4607 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4608 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4609 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4610 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4611 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4612 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4613 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4614 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4615 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4616 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4617 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4618 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4620 * Makefile: Use $(sysdirs) in vpath directive.
4622 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4623 (CPPFLAGS-timer_routines.c): Likewise.
4625 * Makeconfig (includes): Variable removed.
4627 2006-02-26 Roland McGrath <roland@redhat.com>
4629 * sysdeps/generic/pt-raise.c: Moved to ...
4630 * pt-raise.c: ... here.
4631 * sysdeps/generic/lowlevellock.h: Moved to ...
4632 * lowlevellock.h: ... here.
4634 2006-02-23 Roland McGrath <roland@redhat.com>
4636 * descr.h (struct pthread): Add final member `end_padding'.
4637 (PTHREAD_STRUCT_END_PADDING): Use it.
4639 2006-02-20 Roland McGrath <roland@redhat.com>
4641 * sysdeps/mips: Directory removed, saved in ports repository.
4642 * sysdeps/unix/sysv/linux/mips: Likewise.
4644 2006-02-18 Ulrich Drepper <drepper@redhat.com>
4646 * tst-robust1.c: Add second mutex to check that the mutex list is
4649 2006-02-17 Jakub Jelinek <jakub@redhat.com>
4651 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4652 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4653 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4654 lll_robust_mutex_unlock): New macros.
4655 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4656 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4657 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4658 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4659 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4661 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4663 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4665 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4667 2006-02-17 Ulrich Drepper <drepper@redhat.com>
4669 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4670 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4671 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4672 (lll_robust_mutex_unlock): Likewise.
4674 2006-02-13 Jakub Jelinek <jakub@redhat.com>
4676 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4677 Set robust_list.__next rather than robust_list.
4678 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4679 (__pthread_list_t): New typedef.
4680 (pthread_mutex_t): Replace __next and __prev fields with __list.
4681 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4682 (__pthread_list_t): New typedef.
4683 (pthread_mutex_t): Replace __next and __prev fields with __list.
4684 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4685 (__pthread_list_t, __pthread_slist_t): New typedefs.
4686 (pthread_mutex_t): Replace __next and __prev fields with __list.
4687 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4688 (__pthread_list_t, __pthread_slist_t): New typedefs.
4689 (pthread_mutex_t): Replace __next and __prev fields with __list.
4690 * sysdeps/unix/sysv/linux/sparc/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/sh/bits/pthreadtypes.h
4694 (__pthread_slist_t): New typedef.
4695 (pthread_mutex_t): Replace __next field with __list.
4697 2006-02-15 Ulrich Drepper <drepper@redhat.com>
4699 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4700 PTHREAD_MUTEX_OWNERDEAD.
4701 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4702 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4703 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4704 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4705 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4706 to PTHREAD_MUTEX_INCONSISTENT.
4707 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4708 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4709 * pthread_mutex_trylock.c: Likewise.
4710 * pthread_mutex_timedlock.c: Likewise.
4711 * pthread_mutex_unlock.c: Likewise.
4712 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4713 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4714 lowlevelrobustlock.sym.
4715 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4716 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4718 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4719 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4720 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4721 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4722 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4724 2006-02-12 Ulrich Drepper <drepper@redhat.com>
4726 * allocatestack.c (allocate_stack): Initialize robust_list.
4727 * init.c (__pthread_initialize_minimal_internal): Likewise.
4728 * descr.h (struct xid_command): Pretty printing.
4729 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4730 robust_list. Adjust macros.
4731 * pthread_create.c (start_thread): Adjust robust_list handling.
4732 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4733 but the owner for all robust mutex types.
4734 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4735 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
4736 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4737 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4739 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4740 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4742 2006-02-08 Jakub Jelinek <jakub@redhat.com>
4744 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4745 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4747 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4749 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4751 (lll_futex_timed_wait): Define.
4753 2006-01-19 Ulrich Drepper <drepper@redhat.com>
4755 * tst-cancel4.c: Test ppoll.
4757 2006-01-18 Andreas Jaeger <aj@suse.de>
4760 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4761 (pthread_mutex_t): Follow changes for other archs. Based on patch
4762 by Jim Gifford <patches@jg555.com>.
4764 2006-01-13 Richard Henderson <rth@redhat.com>
4766 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4768 2006-01-10 Roland McGrath <roland@redhat.com>
4770 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4771 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4772 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4773 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4774 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4775 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4776 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4777 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4778 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4779 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4781 2006-01-09 Roland McGrath <roland@redhat.com>
4783 * tst-initializers1-c89.c: New file.
4784 * tst-initializers1-c99.c: New file.
4785 * tst-initializers1-gnu89.c: New file.
4786 * tst-initializers1-gnu99.c: New file.
4787 * Makefile (tests): Add them.
4788 (CFLAGS-tst-initializers1-c89.c): New variable.
4789 (CFLAGS-tst-initializers1-c99.c): New variable.
4790 (CFLAGS-tst-initializers1-gnu89.c): New variable.
4791 (CFLAGS-tst-initializers1-gnu99.c): New variable.
4793 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4794 Use __extension__ on anonymous union definition.
4795 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4796 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4797 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4798 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4799 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4801 2006-01-08 Jakub Jelinek <jakub@redhat.com>
4803 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4804 Don't give the union a name because it changes the mangled name.
4805 Instead name the struct for __data.
4806 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4808 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4811 2006-01-09 Jakub Jelinek <jakub@redhat.com>
4813 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4814 stack bias to mc_ftp field.
4816 2006-01-07 Ulrich Drepper <drepper@redhat.com>
4818 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4819 being too clever and reloading the futex value where it shouldn't.
4821 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4823 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4826 2006-01-06 Jakub Jelinek <jakub@redhat.com>
4828 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4831 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4833 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4834 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4835 rename in tcbhead_t.
4837 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4838 Don't give the union a name because it changes the mangled name.
4839 Instead name the struct for __data.
4840 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4841 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4842 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4843 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4844 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4845 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4847 2006-01-05 Ulrich Drepper <drepper@redhat.com>
4849 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4851 (lll_futex_timed_wait): Define.
4852 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4853 * sysdeps/pthread/aio_misc.h: New file.
4855 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4857 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4859 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4861 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4862 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4863 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4865 2006-01-04 Ulrich Drepper <drepper@redhat.com>
4867 * tst-cancel24.cc: Use C headers instead of C++ headers.
4869 2006-01-03 Jakub Jelinek <jakub@redhat.com>
4871 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4872 sparc-linux configured glibc.
4873 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4874 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4875 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4876 atomic_compare_and_exchange_val_24_acq instead of
4877 atomic_compare_and_exchange_val_acq.
4878 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4879 instead of atomic_exchange_rel.
4880 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4881 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4883 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4885 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4886 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4887 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4888 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4889 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4890 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4892 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4894 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4895 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4896 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4898 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4900 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4902 2006-01-03 Ulrich Drepper <drepper@redhat.com>
4904 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4907 2006-01-02 Jakub Jelinek <jakub@redhat.com>
4909 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4910 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4911 THREAD_COPY_POINTER_GUARD): Define.
4912 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4913 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4915 2006-01-01 Ulrich Drepper <drepper@redhat.com>
4917 * version.c: Update copyright year.
4919 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4921 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4922 .eh_frame section, use cfi_* directives.
4923 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4925 2005-12-30 Ulrich Drepper <drepper@redhat.com>
4927 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4930 2005-12-29 Ulrich Drepper <drepper@redhat.com>
4932 * sysdeps/pthread/sigaction.c: Removed.
4933 * sigaction.c: New file.
4934 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4936 2005-12-28 Ulrich Drepper <drepper@redhat.com>
4938 * Makefile (tests): Add tst-signal7.
4939 * tst-signal7.c: New file.
4941 2005-12-27 Roland McGrath <roland@redhat.com>
4943 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4944 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4945 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4946 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4947 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4948 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4949 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4950 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4951 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4952 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4953 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4955 2005-12-27 Jakub Jelinek <jakub@redhat.com>
4957 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4958 and __prev field to pthread_mutex_t.
4959 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4960 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4961 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4962 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4963 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4966 2005-12-26 Ulrich Drepper <drepper@redhat.com>
4968 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4969 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4970 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4971 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4972 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4973 and PTHREAD_MUTEXATTR_FLAG_BITS.
4974 * descr.h (struct pthread): Add robust_list field and define
4975 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4976 * pthread_mutexattr_getrobust.c: New file.
4977 * pthread_mutexattr_setrobust.c: New file.
4978 * pthread_mutex_consistent.c: New file.
4979 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4980 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4981 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4982 Adjust pthread_mutex_t initializers.
4983 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4984 field to pthread_mutex_t.
4985 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4986 and __prev field to pthread_mutex_t.
4987 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4988 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4989 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4990 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4991 * pthread_mutexattr_gettype.c: Likewise.
4992 * pthread_mutexattr_setpshared.c: Likewise.
4993 * pthread_mutexattr_settype.c: Likewise.
4994 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4995 Initialize mutex kind according to robust flag.
4996 * pthread_mutex_lock.c: Implement local robust mutex.
4997 * pthread_mutex_timedlock.c: Likewise.
4998 * pthread_mutex_trylock.c: Likewise.
4999 * pthread_mutex_unlock.c: Likewise.
5000 * pthread_create.c (start_thread): Mark robust mutexes which remained
5002 * tst-robust1.c: New file.
5003 * tst-robust2.c: New file.
5004 * tst-robust3.c: New file.
5005 * tst-robust4.c: New file.
5006 * tst-robust5.c: New file.
5007 * tst-robust6.c: New file.
5008 * tst-robust7.c: New file.
5009 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5010 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5011 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5012 tst-robust5, tst-robust6, and tst-robust7.
5014 * tst-typesizes.c: New file.
5015 * Makefile (tests): Add tst-typesizes.
5017 * tst-once3.c: More debug output.
5019 2005-12-24 Ulrich Drepper <drepper@redhat.com>
5021 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5022 missing after last change.
5024 * version.c: Update copyright year.
5026 2005-12-23 Ulrich Drepper <drepper@redhat.com>
5028 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5029 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5030 * pthread_mutex_trylock.c: Likewise.
5031 * pthread_mutex_timedlock.c: Likewise.
5032 * pthread_mutex_unlock.c: Likewise.
5034 2005-12-22 Roland McGrath <roland@redhat.com>
5036 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5037 so that #include_next's search location is not reset to the -I..
5038 directory where <nptl/...> can be found.
5040 2005-12-22 Ulrich Drepper <drepper@redhat.com>
5043 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5044 Fix unwind info. Remove useless branch prediction prefix.
5045 * tst-cancel24.cc: New file.
5046 * Makefile: Add rules to build and run tst-cancel24.
5048 2005-12-21 Roland McGrath <roland@redhat.com>
5050 * libc-cancellation.c: Use <> rather than "" #includes.
5051 * pt-cleanup.c: Likewise.
5052 * pthread_create.c: Likewise.
5053 * pthread_join.c: Likewise.
5054 * pthread_timedjoin.c: Likewise.
5055 * pthread_tryjoin.c: Likewise.
5056 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5057 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5058 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5059 * unwind.c: Likewise.
5061 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5063 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5064 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5065 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5066 THREAD_COPY_POINTER_GUARD): Define.
5068 2005-12-19 Jakub Jelinek <jakub@redhat.com>
5070 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5072 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5073 THREAD_COPY_POINTER_GUARD): Define.
5074 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5075 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5076 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5077 THREAD_COPY_POINTER_GUARD): Define.
5078 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5079 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5080 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5081 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5082 Use PTR_DEMANGLE for B0 if defined.
5084 2005-12-17 Ulrich Drepper <drepper@redhat.com>
5086 * pthread_create.c (__pthread_create_2_1): Use
5087 THREAD_COPY_POINTER_GUARD if available.
5088 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5089 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5090 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5091 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5092 * sysdeps/x86_64/tls.h: Likewise.
5094 2005-12-15 Roland McGrath <roland@redhat.com>
5096 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5098 2005-12-13 Ulrich Drepper <drepper@redhat.com>
5100 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5102 * errno-loc.c: New file.
5104 2005-12-12 Roland McGrath <roland@redhat.com>
5106 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5107 adjustments before choosing stack size. Update minimum stack size
5108 calculation to match allocate_stack change.
5110 2005-12-12 Ulrich Drepper <drepper@redhat.com>
5112 * allocatestack.c (allocate_stack): Don't demand that there is an
5113 additional full page available on the stack beside guard, TLS, the
5116 2005-11-24 Ulrich Drepper <drepper@redhat.com>
5118 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5119 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5121 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5122 compiling 32-bit code we must define __cleanup_fct_attribute.
5124 005-11-24 Jakub Jelinek <jakub@redhat.com>
5127 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5128 __attribute__ instead of __attribute.
5129 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5130 (__cleanup_fct_attribute): Likewise.
5132 2005-11-17 Jakub Jelinek <jakub@redhat.com>
5134 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5135 a write barrier before writing libgcc_s_getcfa.
5137 2005-11-06 Ulrich Drepper <drepper@redhat.com>
5139 * sysdeps/unix/sysv/linux/configure: Removed.
5141 2005-11-05 Ulrich Drepper <drepper@redhat.com>
5143 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5144 optional init_array/fini_array support.
5146 2005-10-24 Roland McGrath <roland@redhat.com>
5148 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5149 versioned_symbol use.
5151 2005-10-16 Roland McGrath <roland@redhat.com>
5153 * init.c (__pthread_initialize_minimal_internal): Even when using a
5154 compile-time default stack size, apply the minimum that allocate_stack
5155 will require, and round up to page size.
5157 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5159 * Makefile ($(test-modules)): Remove static pattern rule.
5161 2005-10-14 Jakub Jelinek <jakub@redhat.com>
5162 Ulrich Drepper <drepper@redhat.com>
5164 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5165 alignment in callback function.
5166 * Makefile: Add rules to build and run tst-align3.
5167 * tst-align3.c: New file.
5169 2005-10-03 Jakub Jelinek <jakub@redhat.com>
5171 * allocatestack.c (setxid_signal_thread): Add
5172 INTERNAL_SYSCALL_DECL (err).
5174 2005-10-02 Jakub Jelinek <jakub@redhat.com>
5176 * allocatestack.c (setxid_signal_thread): Need to use
5177 atomic_compare_and_exchange_bool_acq.
5179 2005-10-01 Ulrich Drepper <drepper@redhat.com>
5180 Jakub Jelinek <jakub@redhat.com>
5182 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5184 (struct pthread): Move specific_used field to avoid padding.
5185 Add setxid_futex field.
5186 * init.c (sighandler_setxid): Reset setxid flag and release the
5188 * allocatestack.c (setxid_signal_thread): New function. Broken
5189 out of the bodies of the two loops in __nptl_setxid. For undetached
5190 threads check whether they are exiting and if yes, don't send a signal.
5191 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5192 * pthread_create.c (start_thread): For undetached threads, check
5193 whether setxid bit is set. If yes, wait until signal has been
5196 * allocatestack.c (STACK_VARIABLES): Initialize them.
5197 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5199 2004-09-02 Jakub Jelinek <jakub@redhat.com>
5201 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5202 waiters, awake all waiters on the associated mutex.
5204 2005-09-22 Roland McGrath <roland@redhat.com>
5206 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5207 ../sysdeps/x86_64/hp-timing.h).
5209 2005-08-29 Jakub Jelinek <jakub@redhat.com>
5211 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5212 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5213 (lll_futex_wake_unlock): Define.
5214 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5215 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5216 (lll_futex_wake_unlock): Define.
5217 * sysdeps/unix/sysv/linux/ia64/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/s390/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/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5224 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5225 (lll_futex_wake_unlock): Define.
5226 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5227 lll_futex_wake_unlock.
5228 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5229 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5230 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5231 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5232 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5233 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5235 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5237 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5238 Fix typo in register name.
5240 2005-08-23 Ulrich Drepper <drepper@redhat.com>
5242 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5243 Use __sigfillset. Document that sigfillset does the right thing wrt
5246 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5249 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5250 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5251 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5252 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5253 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5254 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5256 * Makefile (tests): Add tst-initializers1.
5257 (CFLAGS-tst-initializers1.c): Set.
5258 * tst-initializers1.c: New test.
5260 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5262 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5263 Make sure __flags are located at offset 48 from the start of the
5266 2005-07-02 Roland McGrath <roland@redhat.com>
5268 * Makeconfig: Comment fix.
5270 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5272 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5273 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5274 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5275 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5276 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5277 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5278 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5279 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5280 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5281 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5283 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5285 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5286 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5287 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5289 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5290 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5291 field. Put in sysinfo field unconditionally.
5292 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5293 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5294 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5295 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5297 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5298 * pthread_create.c (__pthread_create_2_1): Use
5299 THREAD_COPY_STACK_GUARD macro.
5300 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5302 * tst-stackguard1.c: New file.
5303 * tst-stackguard1-static.c: New file.
5305 2005-06-14 Alan Modra <amodra@bigpond.net.au>
5307 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5308 Invoke CGOTSETUP and CGOTRESTORE.
5309 (CGOTSETUP, CGOTRESTORE): Define.
5311 2005-05-29 Richard Henderson <rth@redhat.com>
5313 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5314 (tf_write, tf_writev): Use it.
5315 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5318 2005-05-23 Jakub Jelinek <jakub@redhat.com>
5320 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5321 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5322 __librt_*_asynccancel@local.
5324 2005-05-17 Alan Modra <amodra@bigpond.net.au>
5326 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5327 all occurrences of JUMPTARGET. Instead append @local to labels.
5329 2005-05-20 Jakub Jelinek <jakub@redhat.com>
5331 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5332 size/alignment of struct pthread rather than tcbhead_t.
5333 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5335 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5337 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5340 2005-05-19 Richard Henderson <rth@redhat.com>
5342 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5343 __sync_val_compare_and_swap, not explicit _si variant.
5344 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5346 2005-05-03 Ulrich Drepper <drepper@redhat.com>
5349 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5351 2005-05-03 Jakub Jelinek <jakub@redhat.com>
5353 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5354 .eh_frame section, use cfi_* directives.
5356 2005-04-27 Jakub Jelinek <jakub@redhat.com>
5358 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5361 2005-04-27 Ulrich Drepper <drepper@redhat.com>
5364 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5367 2005-04-27 Roland McGrath <roland@redhat.com>
5369 * Makefile (tests): Remove tst-clock2.
5371 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5372 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5373 translating to the kernel clockid_t for our own process/thread clock.
5375 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5377 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5379 * old_pthread_cond_init.c: Include <errno.h>.
5380 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5381 process shared or uses clock other than CLOCK_REALTIME.
5382 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5384 2005-04-13 David S. Miller <davem@davemloft.net>
5386 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5387 * sysdeps/sparc/sparc64/clone.S: New file.
5389 2005-04-05 Jakub Jelinek <jakub@redhat.com>
5392 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5393 __inline instead of inline.
5394 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5396 2005-03-31 Jakub Jelinek <jakub@redhat.com>
5398 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5399 functionally equivalent, but shorter instructions.
5400 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5401 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5402 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5404 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5405 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5406 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5407 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5408 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5409 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5410 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5412 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5413 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5414 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5415 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5416 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5418 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5420 * sysdeps/mips/Makefile: New file.
5421 * sysdeps/mips/nptl-sysdep.S: New file.
5422 * sysdeps/mips/tcb-offsets.sym: New file.
5423 * sysdeps/mips/pthread_spin_lock.S: New file.
5424 * sysdeps/mips/pthread_spin_trylock.S: New file.
5425 * sysdeps/mips/pthreaddef.h: New file.
5426 * sysdeps/mips/tls.h: New file.
5427 * sysdeps/mips/jmpbuf-unwind.h: New file.
5428 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5429 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5430 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5431 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5432 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5433 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5434 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5435 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5436 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5437 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5439 2005-03-23 Ulrich Drepper <drepper@redhat.com>
5442 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5445 2005-03-10 Jakub Jelinek <jakub@redhat.com>
5447 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5449 2005-02-25 Roland McGrath <roland@redhat.com>
5451 * alloca_cutoff.c: Correct license text.
5452 * tst-unload.c: Likewise.
5453 * sysdeps/pthread/allocalim.h: Likewise.
5454 * sysdeps/pthread/pt-initfini.c: Likewise.
5455 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5456 * sysdeps/pthread/bits/sigthread.h: Likewise.
5457 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5458 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5460 2005-02-16 Roland McGrath <roland@redhat.com>
5462 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5463 Use unsigned int * for ptr_nthreads.
5465 2005-02-14 Alan Modra <amodra@bigpond.net.au>
5468 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5471 2005-02-07 Richard Henderson <rth@redhat.com>
5474 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5477 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
5479 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5480 order of arguments in invocation of atomic_add_zero.
5482 2005-01-26 Jakub Jelinek <jakub@redhat.com>
5485 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5486 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5487 at least gotntpoff relocation and addition.
5488 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5490 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5492 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5495 2005-01-06 Ulrich Drepper <drepper@redhat.com>
5497 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5498 entry for static tls deallocation fix.
5499 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5500 also contains information whether the memory pointed to is static
5502 * sysdeps/i386/tls.h: Likewise.
5503 * sysdeps/ia64/tls.h: Likewise.
5504 * sysdeps/powerpc/tls.h: Likewise.
5505 * sysdeps/s390/tls.h: Likewise.
5506 * sysdeps/sh/tls.h: Likewise.
5507 * sysdeps/sparc/tls.h: Likewise.
5508 * sysdeps/x86_64/tls.h: Likewise.
5510 2004-12-27 Ulrich Drepper <drepper@redhat.com>
5512 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5514 2004-12-21 Jakub Jelinek <jakub@redhat.com>
5516 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5518 * Makefile (tests): Add tst-align2.
5519 * tst-align2.c: New test.
5520 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5521 -mpreferred-stack-boundary=4.
5523 2004-12-18 Roland McGrath <roland@redhat.com>
5525 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5526 New file removed withdrawn for the moment.
5528 2004-12-17 Richard Henderson <rth@redhat.com>
5530 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5531 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5533 2004-12-16 Ulrich Drepper <drepper@redhat.com>
5535 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5536 Increased PTHREAD_STACK_MIN.
5538 * tst-context1.c (stacks): Use bigger stack size.
5540 2004-12-16 Jakub Jelinek <jakub@redhat.com>
5542 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5543 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5545 2004-12-15 Jakub Jelinek <jakub@redhat.com>
5547 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5548 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5549 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5551 2004-12-15 Ulrich Drepper <drepper@redhat.com>
5553 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5555 2004-12-14 Ulrich Drepper <drepper@redhat.com>
5557 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5558 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5560 * tst-getpid1.c: If child crashes, report this first. Print which
5563 2004-12-09 Ulrich Drepper <drepper@redhat.com>
5565 * init.c (__pthread_initialize_minimal_internal): Also unblock
5568 2004-12-01 Jakub Jelinek <jakub@redhat.com>
5570 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5571 _POSIX_THREAD_CPUTIME): Define to 0.
5572 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5573 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5574 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5575 __timer_signal_thread_tclk): Remove.
5576 (init_module): Remove their initialization.
5577 (thread_cleanup): Remove their cleanup assertions.
5578 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5579 __timer_signal_thread_tclk): Remove.
5580 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5581 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5582 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5584 2004-12-07 Jakub Jelinek <jakub@redhat.com>
5586 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5587 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5589 * Makefile (tests): Add tst-getpid2.
5590 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5591 (do_test): Use it. Use __clone2 instead of clone on ia64.
5592 * tst-getpid2.c: New test.
5594 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5596 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5598 2004-12-04 Ulrich Drepper <drepper@redhat.com>
5600 * Makefile (tests): Add tst-getpid1.
5601 * tst-getpid1.c: New file.
5602 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5603 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5605 2004-12-02 Roland McGrath <roland@redhat.com>
5607 * Makefile (libpthread-nonshared): Variable removed.
5608 ($(objpfx)libpthread_nonshared.a): Target removed.
5609 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5610 These are now handled by generic magic from
5611 libpthread-static-only-routines being set.
5613 2004-11-27 Ulrich Drepper <drepper@redhat.com>
5615 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5616 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5617 _POSIX_THREAD_PRIO_PROTECT): Define.
5618 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5619 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5620 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5622 2004-11-26 Jakub Jelinek <jakub@redhat.com>
5624 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5625 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5626 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5627 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5628 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5629 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5630 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5632 2004-11-24 Ulrich Drepper <drepper@redhat.com>
5634 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5636 * Makefile (libpthread-routines): Add pthread_setschedprio.
5637 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5638 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5639 * pthread_setschedprio.c: New file.
5641 2004-11-20 Jakub Jelinek <jakub@redhat.com>
5643 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5644 * pthread_cancel.c (pthread_create): Likewise.
5646 * Makefile (libpthread-routines): Add vars.
5647 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5648 * init.c (__default_stacksize, __is_smp): Remove.
5650 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5651 and define a wrapper macro.
5652 (PTHREAD_STATIC_FN_REQUIRE): Define.
5653 * allocatestack.c (__find_thread_by_id): Undefine.
5654 * pthread_create (__pthread_keys): Remove.
5655 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5656 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5657 PTHREAD_STATIC_FN_REQUIRE.
5659 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5661 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5662 parameter to REGISTER macro.
5664 2004-11-17 Roland McGrath <roland@redhat.com>
5666 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5667 Make sure SIGCANCEL is blocked as well.
5669 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5671 * sysdeps/pthread/setxid.h: New file.
5672 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5673 (struct xid_command): Add forward decl.
5674 (struct pthread_functions): Change return type of __nptl_setxid hook
5676 * pthreadP.h (__nptl_setxid): Change return type to int.
5677 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5678 calling thread, return its return value and set errno on failure.
5679 * descr.h (struct xid_command): Change id type to long array.
5681 * Makefile: Add rules to build and test tst-setuid1 and
5683 * tst-setuid1.c: New test.
5684 * tst-setuid1-static.c: New test.
5686 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5688 * Makefile (tests): Add tst-exit3.
5689 * tst-exit3.c: New test.
5691 2004-11-09 Ulrich Drepper <drepper@redhat.com>
5693 * Makefile (tests): Add tst-exit2.
5694 * tst-exit2.c: New file.
5696 2004-11-09 Roland McGrath <roland@redhat.com>
5699 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5700 here, before calling clone.
5701 * pthread_create.c (start_thread): Don't do it here.
5703 2004-11-02 Jakub Jelinek <jakub@redhat.com>
5705 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5707 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5709 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5710 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5713 2004-10-28 Jakub Jelinek <jakub@redhat.com>
5715 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5716 if sched_priority is not between minprio and maxprio.
5718 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5720 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5721 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5723 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5724 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5726 2004-10-24 Ulrich Drepper <drepper@redhat.com>
5728 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5729 not-cancelable I/O functions.
5731 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5733 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5734 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5735 make sure 2 is stored in the futex and we looked at the old value.
5736 Fix a few other problems to return the correct value.
5738 2004-10-14 Richard Henderson <rth@redhat.com>
5740 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5743 2004-10-06 Jakub Jelinek <jakub@redhat.com>
5745 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5746 of pthread-functions.h and pthreaddef.h.
5747 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5749 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5750 Change __data.__nwaiters from int to unsigned int.
5752 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5753 sysconf (_SC_THREAD_CPUTIME) returns negative value.
5755 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5758 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5759 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5761 2004-10-06 Ulrich Drepper <drepper@redhat.com>
5763 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
5764 test fails, remove message queue.
5765 (tf_msgsnd): Likewise.
5767 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5769 * tst-clock1.c: Change #ifdef to #if defined.
5770 * tst-clock2.c: Likewise.
5771 * tst-cond11.c: Likewise.
5773 * sysdeps/pthread/timer_create.c (timer_create): Use
5774 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5775 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5778 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5780 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5781 _POSIX_THREAD_CPUTIME): Define to 0.
5783 2004-10-04 Ulrich Drepper <drepper@redhat.com>
5785 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5786 and _POSIX_THREAD_CPUTIME to zero.
5787 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5788 * tst-barrier2.c: Fix testing for POSIX feature.
5789 * tst-clock1.c: Likewise.
5790 * tst-clock2.c: Likewise.
5791 * tst-cond11.c: Likewise.
5792 * tst-cond4.c: Likewise.
5793 * tst-cond6.c: Likewise.
5794 * tst-flock2.c: Likewise.
5795 * tst-mutex4.c: Likewise.
5796 * tst-mutex9.c: Likewise.
5797 * tst-rwlock12.c: Likewise.
5798 * tst-rwlock4.c: Likewise.
5799 * tst-signal1.c: Likewise.
5800 * tst-spin2.c: Likewise.
5801 * sysdeps/pthread/posix-timer.h: Likewise.
5802 * sysdeps/pthread/timer_create.c: Likewise.
5803 * sysdeps/pthread/timer_routines.c: Likewise.
5805 2004-10-01 Ulrich Drepper <drepper@redhat.com>
5807 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5808 (__lll_mutex_timedlock_wait): Address futex correctly.
5810 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5811 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5812 make sure 2 is stored in the futex and we looked at the old value.
5813 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5814 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5815 which might very well made the code not working at all before.
5818 2004-09-28 Ulrich Drepper <drepper@redhat.com>
5820 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5821 allow SIGSETXID to be sent.
5822 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5823 for SIGSETXID to be defined.
5824 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5825 SIGSETXID cannot be blocked.
5827 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5828 Add __extension__ to long long types.
5829 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5830 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5831 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5832 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5833 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5834 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5835 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5837 2004-09-25 Ulrich Drepper <drepper@redhat.com>
5839 * descr.h (struct pthread): Add stopped_start field.
5840 * sysdeps/pthread/createthread.c (create_thread): Set
5841 start_stopped flag in descriptor for new thread appropriately.
5842 * pthread_create.c (start_thread): Only take lock to be stopped on
5843 startup if stopped_start flag says so.
5845 2004-09-24 Ulrich Drepper <drepper@redhat.com>
5847 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5848 is created detached and if yes, do not try to free the stack in case
5849 the thread creation failed.
5850 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5851 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5852 case there has been no error. [BZ #405]
5854 * pthread_create.c (start_thread): Don't wait for scheduler data
5855 etc to be set at the beginning of the function. The cancellation
5856 infrastructure must have been set up. And enable async
5857 cancellation before potentially going to sleep. [BZ #401]
5859 2004-09-20 Ulrich Drepper <drepper@redhat.com>
5861 * Versions: Remove exports for pthread_set*id_np functions.
5862 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5864 * Makefile: Don't build pthread_set*id code for now.
5866 2004-09-19 Ulrich Drepper <drepper@redhat.com>
5868 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5870 * allocatestack.c (__nptl_setxid): New function.
5871 * descr.h (struct xid_command): Define type.
5872 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5873 (sighandler_setxid): New function.
5874 (__pthread_initialize_minimal): Register sighandler_setxid for
5876 * pt-allocrtsig.c: Update comment.
5877 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
5878 Declare __nptl_setxid.
5879 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5880 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5881 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5882 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5883 and pthread_setresuid_np.
5884 * pthread_setgid_np.c: New file.
5885 * pthread_setuid_np.c: New file.
5886 * pthread_setegid_np.c: New file.
5887 * pthread_seteuid_np.c: New file.
5888 * pthread_setregid_np.c: New file.
5889 * pthread_setreuid_np.c: New file.
5890 * pthread_setresgid_np.c: New file.
5891 * pthread_setresuid_np.c: New file.
5892 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5893 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5894 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5895 and pthread_setresuid_np.
5896 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5897 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5898 pthread_setregid, and pthread_setresgid.
5900 2004-09-18 Ulrich Drepper <drepper@redhat.com>
5902 * allocatestack.c (allocate_stack): Return EAGAIN instead of
5903 ENOMEM when out of memory.
5905 2004-09-10 Roland McGrath <roland@redhat.com>
5908 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5909 code, since we don't try to use the broken CLONE_STOPPED any more.
5910 * pthread_create.c (start_thread): Likewise.
5912 2004-09-15 Richard Henderson <rth@redhat.com>
5914 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5916 2004-09-01 David Mosberger <davidm@hpl.hp.com>
5918 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5919 (__libc_unwind_longjmp): Delete macro and declare as function.
5920 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5921 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5923 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5924 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5925 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5927 2004-09-12 Ulrich Drepper <drepper@redhat.com>
5929 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5931 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5932 types also for __USE_XOPEN2K.
5933 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5934 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5935 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5936 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5937 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5938 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5939 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5942 2004-09-08 Ulrich Drepper <drepper@redhat.com>
5944 * sysdeps/pthread/pthread.h
5945 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5946 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5947 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5948 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5951 2004-09-07 Ulrich Drepper <drepper@redhat.com>
5953 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5954 PSEUDO to be used with . prefix.
5956 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5957 Use atomic_increment instead of atomic_exchange_and_add.
5958 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5960 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5962 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5965 * allocatestack.c (allocate_stack): Use atomic_increment_val
5966 instead of atomic_exchange_and_add.
5967 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5968 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5970 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5973 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5974 the initialization function might throw.
5976 2005-09-05 Richard Henderson <rth@redhat.com>
5978 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5979 Move definition inside libpthread, libc, librt check. Provide
5980 definition for rtld.
5982 2004-09-02 Ulrich Drepper <drepper@redhat.com>
5984 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5985 * sysdeps/i386/jmpbuf-unwind.h: Likewise
5986 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5987 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5988 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5989 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5990 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5991 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5994 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5995 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5996 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5998 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5999 Decrement __nwaiters. If pthread_cond_destroy has been called and
6000 this is the last waiter, signal pthread_cond_destroy caller and
6001 avoid using the pthread_cond_t structure after unlock.
6002 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6003 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6004 Read clock type from the least significant bits of __nwaiters instead
6006 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6007 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6009 2004-08-31 Jakub Jelinek <jakub@redhat.com>
6012 * Makefile (tests): Add tst-cond20 and tst-cond21.
6013 * tst-cond20.c: New test.
6014 * tst-cond21.c: New test.
6015 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6016 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6018 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6020 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6021 (pthread_cond_t): Likewise.
6022 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6024 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6026 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6028 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6029 (cond_nwaiters): New.
6031 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6032 if there are waiters not signalled yet.
6033 Wait until all already signalled waiters wake up.
6034 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6035 __nwaiters. If pthread_cond_destroy has been called and this is the
6036 last waiter, signal pthread_cond_destroy caller and avoid using
6037 the pthread_cond_t structure after unlock.
6038 (__pthread_cond_wait): Increment __nwaiters in the beginning,
6039 decrement it when leaving. If pthread_cond_destroy has been called
6040 and this is the last waiter, signal pthread_cond_destroy caller.
6041 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6042 Likewise. Read clock type from the least significant bits of
6043 __nwaiters instead of __clock.
6044 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6045 whether clock ID can be encoded in COND_CLOCK_BITS bits.
6046 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6047 clock type just from the last COND_CLOCK_BITS bits of value.
6048 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6049 instead of __clock, just from second bit of condattr's value.
6051 2004-08-30 Jakub Jelinek <jakub@redhat.com>
6053 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6054 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
6056 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6058 2004-08-15 Roland McGrath <roland@frob.com>
6060 * pthread_atfork.c: Update copyright terms including special exception
6061 for these trivial files, which are statically linked into executables
6062 that use dynamic linking for the significant library code.
6064 2004-08-09 Jakub Jelinek <jakub@redhat.com>
6066 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6067 pthread_rwlock_rdlock.
6068 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6069 Decrease __nr_readers_queued after reacquiring lock.
6070 * sysdeps/pthread/pthread_rwlock_timedrdlock
6071 (pthread_rwlock_timedrdlock): Likewise.
6072 Reported by Bob Cook <bobcook47@hotmail.com>.
6074 2004-08-11 Jakub Jelinek <jakub@redhat.com>
6076 * tst-rwlock14.c (tf): Read main thread handle from *ARG
6077 before pthread_barrier_wait.
6079 2004-08-07 Ulrich Drepper <drepper@redhat.com>
6081 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6082 Remove unnecessary exception handling data.
6084 2004-07-23 Jakub Jelinek <jakub@redhat.com>
6087 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6088 instead of clockid_t.
6090 2004-07-21 Roland McGrath <roland@redhat.com>
6092 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6094 2004-07-19 Roland McGrath <roland@redhat.com>
6096 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6098 2004-07-02 Roland McGrath <roland@redhat.com>
6100 * configure: Don't exit.
6102 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6104 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6105 (__pthread_cond_timedwait): Check for invalid nanosecond in
6108 2004-07-07 Ulrich Drepper <drepper@redhat.com>
6110 * Makefile: Add rules to build and run tst-fini1.
6111 * tst-fini1.c: New file.
6112 * tst-fini1mod.c: New file.
6114 2004-07-05 Ulrich Drepper <drepper@redhat.com>
6116 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6117 if no cancellation support is needed.
6118 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6119 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6120 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6121 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6122 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6123 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6124 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6125 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6126 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6128 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6129 only if not already defined.
6131 2004-07-05 Jakub Jelinek <jakub@redhat.com>
6133 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6134 constraint "m" instead of "0" for futex.
6136 * shlib-versions: Add powerpc64-.*-linux.*.
6138 2004-07-04 Jakub Jelinek <jakub@redhat.com>
6140 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6141 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6143 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6144 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6147 2004-06-29 Roland McGrath <roland@redhat.com>
6149 * Banner: NPTL no longer has its own version number.
6150 * Makefile (nptl-version): Variable removed.
6151 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6152 using $(version), the glibc version number.
6154 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6156 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6157 Fix branch offset for a PLT entry.
6158 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6160 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6162 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6164 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6167 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6169 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6172 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6174 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6175 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6177 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6178 (pthread_rwlock_timedrdlock): Likewise.
6180 2004-06-22 Jakub Jelinek <jakub@redhat.com>
6182 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6183 Set __r7 to val, not mutex.
6185 2004-06-27 Ulrich Drepper <drepper@redhat.com>
6187 * Makefile: Add rules to build tst-rwlock14.
6188 * tst-rwlock14.c: New file.
6190 2004-06-24 Boris Hu <boris.hu@intel.com>
6192 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6194 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6196 2004-06-19 Andreas Jaeger <aj@suse.de>
6198 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6199 assembler in last patch.
6201 2004-06-17 Ulrich Drepper <drepper@redhat.com>
6203 * sysdeps/pthread/pthread_cond_timedwait.c
6204 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6205 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6206 (__pthread_cond_timedwait): Check for invalid nanosecond in
6208 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6209 * tst-cond19.c: New file.
6210 * Makefile: Add rules to build and run tst-cond19.
6212 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6214 * tst-context1.c (GUARD_PATTERN): Defined.
6215 (tst_context_t): Define struct containing ucontext_t & guard words.
6216 (ctx): Declare as an array of tst_context_t.
6217 (fct): Verify uc_link & guard words are still valid.
6218 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6220 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6222 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6223 Add __data.__futex field, reshuffle __data.__clock.
6224 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6225 (__pthread_cond_signal): Increment __futex at the same time as
6226 __wakeup_seq or __total_seq. Pass address of __futex instead of
6227 address of low 32-bits of __wakeup_seq to futex syscall.
6228 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6229 (__pthread_cond_wait): Likewise. Pass __futex value from before
6230 releasing internal lock to FUTEX_WAIT.
6231 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6232 (__pthread_cond_timedwait): Likewise.
6233 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6234 (FUTEX_CMP_REQUEUE): Define.
6235 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6236 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6237 Pass __futex value from before the unlock and __futex address instead
6238 of address of low 32-bits of __wakeup_seq to futex syscall.
6239 Fallback to FUTEX_WAKE all on any errors.
6241 2004-06-08 Jakub Jelinek <jakub@redhat.com>
6243 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6245 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6246 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6247 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6248 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6249 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6251 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6253 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6254 Add memory clobber to inline assembly.
6255 (__lll_mutex_trylock): Likewise.
6256 (__lll_mutex_cond_trylock): Likewise.
6258 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6260 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6261 Pass val argument as 6th system call argument in %r7.
6263 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6265 * Makefile (tests): Add tst-cond16.
6266 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6267 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6268 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6269 Add __data.__futex field, reshuffle __data.__clock.
6270 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6271 (__pthread_cond_signal): Increment __futex at the same time as
6272 __wakeup_seq or __total_seq. Pass address of __futex instead of
6273 address of low 32-bits of __wakeup_seq to futex syscall.
6274 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6275 (__pthread_cond_wait): Likewise. Pass __futex value from before
6276 releasing internal lock to FUTEX_WAIT.
6277 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6278 (__pthread_cond_timedwait): Likewise.
6279 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6280 (FUTEX_CMP_REQUEUE): Define.
6281 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6282 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6283 Pass __futex value from before the unlock and __futex address instead
6284 of address of low 32-bits of __wakeup_seq to futex syscall.
6285 Fallback to FUTEX_WAKE all on any errors.
6286 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6288 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6289 internally. Return non-zero if error, zero if success.
6290 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6291 Add __data.__futex field, reshuffle __data.__clock.
6292 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6294 (lll_futex_requeue): Add val argument, return 1 unconditionally
6296 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6297 Add __data.__futex field, reshuffle __data.__clock.
6298 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6300 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6301 internally. Return non-zero if error, zero if success.
6302 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6303 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6304 * sysdeps/unix/sysv/linux/sparc/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/sparc/bits/pthreadtypes.h (pthread_cond_t):
6309 Add __data.__futex field, reshuffle __data.__clock.
6310 * sysdeps/unix/sysv/linux/ia64/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/ia64/bits/pthreadtypes.h (pthread_cond_t):
6315 Add __data.__futex field, reshuffle __data.__clock.
6316 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6317 Add __data.__futex field, reshuffle __data.__clock.
6318 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6319 Increment __futex at the same time as __wakeup_seq or __total_seq.
6320 Pass address of __futex instead of address of low 32-bits of
6321 __wakeup_seq to futex syscall.
6322 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6323 Pass __futex value from before releasing internal lock
6325 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6326 Likewise. Avoid unnecessary shadowing of variables.
6327 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6328 Set __futex to 2 * __total_seq. Pass __futex value from before the
6329 unlock and __futex address instead of address of low 32-bits of
6330 __wakeup_seq to futex_requeue macro, adjust for new return value
6332 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6333 (__pthread_cond_signal): Increment __futex at the same time as
6334 __wakeup_seq or __total_seq. Pass address of __futex instead of
6335 address of low 32-bits of __wakeup_seq to futex syscall.
6336 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6337 (__pthread_cond_wait): Likewise. Pass __futex value from before
6338 releasing internal lock to FUTEX_WAIT.
6339 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6340 (__pthread_cond_timedwait): Likewise.
6341 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6342 (FUTEX_CMP_REQUEUE): Define.
6343 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6344 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6345 Pass __futex value from before the unlock and __futex address instead
6346 of address of low 32-bits of __wakeup_seq to futex syscall.
6347 Fallback to FUTEX_WAKE all on any errors.
6349 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6351 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6352 Add nop to align the end of critical section.
6353 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6355 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6357 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6358 Add __broadcast_seq field.
6359 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6360 all waiters as woken with woken_seq and bump broadcast counter.
6361 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6362 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6363 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6364 Comment typo fixes. Avoid returning -ETIMEDOUT.
6366 2004-06-01 Ulrich Drepper <drepper@redhat.com>
6368 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6369 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6370 Reported by Kaz Kojima.
6372 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6374 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6376 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6378 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6379 __broadcast_seq with bc_seq after acquiring internal lock instead of
6382 2004-05-18 Jakub Jelinek <jakub@redhat.com>
6384 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6386 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6387 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6388 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6389 (pthread_cond_t): Add __data.__broadcast_seq field.
6390 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6391 (FRAME_SIZE): Define.
6392 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6394 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6396 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6398 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6399 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6402 2004-05-18 Ulrich Drepper <drepper@redhat.com>
6404 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6405 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6406 Add __broadcast_seq field.
6407 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6408 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6409 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6410 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6411 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6412 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6413 all waiters as woken with woken_seq and bump broadcast counter.
6414 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6415 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6416 __broadcast_seq field.
6417 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6418 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6419 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6420 * pthread_cond_init.c: Initialize __broadcast_seq field.
6421 * Makefile (tests): Add tst-cond17 and tst-cond18.
6422 Add .NOTPARALLEL goal.
6423 * tst-cond16.c: New file. From Jakub.
6424 * tst-cond17.c: New file. From Jakub.
6425 * tst-cond18.c: New file. From Jakub.
6427 2004-05-16 Ulrich Drepper <drepper@redhat.com>
6429 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6432 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6433 Parametrize frame size. Correct some unwind info.
6434 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6436 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6438 * tst-stack3.c: Note testing functionality beyond POSIX.
6440 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6442 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6443 Change conditional from ifdef to if.
6445 2004-04-23 Jakub Jelinek <jakub@redhat.com>
6447 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6448 SYSDEP_CANCEL_ERROR): Define.
6451 2004-05-01 Jakub Jelinek <jakub@redhat.com>
6453 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6455 2004-04-20 Jakub Jelinek <jakub@redhat.com>
6457 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6459 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6461 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6462 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6463 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6464 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6466 2004-04-19 Ulrich Drepper <drepper@redhat.com>
6468 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6469 thread has all signals blocked.
6471 2004-04-18 Andreas Jaeger <aj@suse.de>
6473 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6474 (SEM_VALUE_MAX): Add missing brace.
6476 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6478 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6480 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6481 * sysdeps/pthread/tst-mqueue8x.c: New test.
6482 * tst-cancel4.c: Update comment about message queues.
6484 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6485 return it_value { 0, 0 }.
6486 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6488 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6489 assertion for SIGEV_NONE.
6490 (thread_attr_compare): Compare all attributes, not just a partial
6493 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6495 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6497 2004-04-17 Ulrich Drepper <drepper@redhat.com>
6499 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6500 Just use a plain number.
6501 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6502 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6503 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6504 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6505 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6506 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6507 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6509 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6511 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6513 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6515 2004-04-15 Jakub Jelinek <jakub@redhat.com>
6517 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6518 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6519 of calling sigwaitinfo.
6521 2004-04-16 Ulrich Drepper <drepper@redhat.com>
6523 * allocatestack.c (allocate_stack): Set reported_guardsize
6525 * pthread_getattr_np.c (pthread_getattr_np): Use
6526 reported_guardsize instead of guardsize.
6527 * descr.h (struct pthread): Add reported_guardsize field.
6529 2004-04-13 Jakub Jelinek <jakub@redhat.com>
6531 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6533 2004-04-12 Ulrich Drepper <drepper@redhat.com>
6535 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6537 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6539 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6540 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6541 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6542 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6543 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6545 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6546 (_POSIX_MESSAGE_PASSING): Define.
6547 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6548 (_POSIX_MESSAGE_PASSING): Define.
6549 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6550 (_POSIX_MESSAGE_PASSING): Define.
6552 2004-04-04 Ulrich Drepper <drepper@redhat.com>
6554 * tst-context1.c (fct): Check whether correct stack is used.
6556 2004-04-03 Ulrich Drepper <drepper@redhat.com>
6558 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6559 matching constraints for asm mem parameters.
6561 * tst-clock2.c (tf): Don't define unless needed.
6563 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6565 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6568 2004-03-30 Ulrich Drepper <drepper@redhat.com>
6570 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6571 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6572 * pthreadP.h: Declare __nptl_deallocate_tsd.
6573 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6576 * Makefile (tests): Add tst-tsd5.
6577 * tst-tsd5.c: New file.
6579 2004-03-29 Ulrich Drepper <drepper@redhat.com>
6581 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6582 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6583 is SHLIB_COMPAT check.
6584 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6585 (__pthread_attr_getaffinity_old): Likewise.
6586 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6587 (__pthread_getaffinity_old): Likewise.
6588 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6589 (__pthread_setaffinity_old): Likewise.
6591 2004-03-26 Ulrich Drepper <drepper@redhat.com>
6593 * allocatestack.c (_make_stacks_executable): Call
6594 _dl_make_stack_executable first.
6596 2004-03-24 Roland McGrath <roland@redhat.com>
6598 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6599 constraint instead of "0".
6601 2004-03-24 Ulrich Drepper <drepper@redhat.com>
6603 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6604 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6606 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6607 code to avoid warning.
6609 2004-03-24 Andreas Jaeger <aj@suse.de>
6611 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6612 (__pthread_attr_setaffinity_old): Remove const.
6614 2004-03-23 Ulrich Drepper <drepper@redhat.com>
6616 * sysdeps/unix/sysv/linux/smp.h: New file.
6617 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6618 * init.c: Define __is_smp.
6619 (__pthread_initialize_minimal_internal): Call is_smp_system to
6620 initialize __is_smp.
6621 * pthreadP.h: Declare __is_smp.
6622 Define MAX_ADAPTIVE_COUNT is necessary.
6623 * pthread_mutex_init.c: Add comment regarding __spins field.
6624 * pthread_mutex_lock.c: Implement adaptive mutex type.
6625 * pthread_mutex_timedlock.c: Likewise.
6626 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6627 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6629 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6630 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6631 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6632 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6633 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6634 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6635 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6636 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6637 lll_mutex_cond_trylock.
6638 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6639 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6640 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6641 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6642 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6643 Define BUSY_WAIT_NOP.
6644 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6645 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6647 * tst-mutex5.c: Add support for testing adaptive mutexes.
6648 * tst-mutex7.c: Likewise.
6649 * tst-mutex5a.c: New file.
6650 * tst-mutex7a.c: New file.
6651 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6653 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6654 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6655 vgettimeofday call might destroy the content.
6657 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6660 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6661 No need to restrict type of ret. Make it int. Add comment.
6663 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6664 Remove unnecessary setne instruction.
6666 2004-03-22 Jakub Jelinek <jakub@redhat.com>
6668 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6669 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6670 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6671 If realloc fails, break out of the loop.
6673 2004-03-20 Andreas Jaeger <aj@suse.de>
6675 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6676 (__pthread_setaffinity_old): Fix interface.
6677 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6678 (__pthread_getaffinity_old): Likewise.
6680 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6681 (__pthread_setaffinity_new): Remove duplicate declaration.
6683 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6685 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6686 the return value to a safe register.
6687 (CDISABLE): Set the function argument correctly.
6689 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6691 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6692 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6693 Rewrite so that only one locked memory operation per round is needed.
6694 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6695 (pthread_barrier_wait): After wakeup, release lock only when the
6696 last thread stopped using the barrier object.
6697 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6698 (__pthread_cond_wait): Don't store mutex address if the current
6699 value is ~0l. Add correct cleanup support and unwind info.
6700 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6701 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6702 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6703 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6704 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6705 Add correct cleanup support and unwind info.
6706 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6707 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6708 information for syscall wrappers.
6710 2004-03-18 Ulrich Drepper <drepper@redhat.com>
6712 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6713 cpusetsize field, remove next.
6714 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6715 parameter for size of the CPU set.
6716 (pthread_setaffinity_np): Likewise.
6717 (pthread_attr_getaffinity_np): Likewise.
6718 (pthread_attr_setaffinity_np): Likewise.
6719 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6720 interface change, keep compatibility code.
6721 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6722 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6723 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6724 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6725 __pthread_getaffinity_np.
6726 * Versions: Add version for changed interfaces.
6727 * tst-attr3.c: Adjust test for interface change.
6728 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6729 increasing buffer sizes.
6730 * pthread_attr_destroy.c: Remove unused list handling.
6731 * pthread_attr_init.c: Likewise.
6733 2004-03-17 Roland McGrath <roland@redhat.com>
6735 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6736 first argument to clock_getres so we ever enable kernel timers.
6738 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
6740 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6742 2004-03-12 Richard Henderson <rth@redhat.com>
6744 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6745 oldvalue from CENABLE to CDISABLE.
6747 2004-03-12 Ulrich Drepper <drepper@redhat.com>
6749 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6750 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6751 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6752 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6754 2004-03-11 Richard Henderson <rth@redhat.com>
6756 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6757 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6758 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6760 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6762 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6763 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6764 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6766 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6768 * forward.c (__pthread_cond_broadcast_2_0,
6769 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6770 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6771 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6773 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6775 * sysdeps/sh/tcb-offsets.sym: Add PID.
6776 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6777 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6779 2004-03-10 Ulrich Drepper <drepper@redhat.com>
6781 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6782 include <sysdep-cancel.h>, vfork is no cancellation point.
6783 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6784 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6785 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6787 2004-03-10 Jakub Jelinek <jakub@redhat.com>
6789 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6791 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6792 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6794 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6796 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6797 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6798 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6799 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6800 of DO_CALL_VIA_BREAK. Work around a gas problem.
6802 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6803 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6804 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6805 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6806 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6807 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6809 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6810 a local register for saving old PID. Negate PID in parent upon exit.
6812 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6814 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6815 before syscall, set to the old value in the parent afterwards.
6816 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6817 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6819 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6820 before syscall, set to the old value in the parent afterwards.
6821 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6822 * sysdeps/s390/tcb-offsets.sym: Add PID.
6824 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6825 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6826 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6827 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6828 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6829 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6831 2004-03-10 Andreas Schwab <schwab@suse.de>
6833 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6834 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6835 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6837 2004-03-09 Jakub Jelinek <jakub@redhat.com>
6839 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6840 * tst-cancel21.c (do_one_test): Likewise.
6841 Reported by Gordon Jin <gordon.jin@intel.com>.
6843 2004-02-09 Jakub Jelinek <jakub@redhat.com>
6845 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6846 if non-zero and set to INT_MIN if zero.
6847 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6848 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6849 (SAVE_PID, RESTORE_PID): Define.
6851 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6852 Use relative path to avoid including NPTL i386/vfork.S.
6853 (SAVE_PID, RESTORE_PID): Define.
6854 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6855 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6856 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6858 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6859 * tst-vfork1.c: New test.
6860 * tst-vfork2.c: New test.
6861 * tst-vfork1x.c: New test.
6862 * tst-vfork2x.c: New test.
6864 2004-03-08 Ulrich Drepper <drepper@redhat.com>
6866 * sysdeps/i386/tcb-offsets.sym: Add PID.
6867 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6868 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6869 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6871 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
6873 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6875 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
6877 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6880 2004-03-07 Ulrich Drepper <drepper@redhat.com>
6882 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6885 * tst-once4.c: Remove unnecessary macro definition.
6887 * tst-mutex7.c (do_test): Limit thread stack size.
6888 * tst-once2.c (do_test): Likewise.
6889 * tst-tls3.c (do_test): Likewise.
6890 * tst-tls1.c (do_test): Likewise.
6891 * tst-signal3.c (do_test): Likewise.
6892 * tst-kill6.c (do_test): Likewise.
6893 * tst-key4.c (do_test): Likewise.
6894 * tst-join4.c (do_test): Likewise.
6895 * tst-fork1.c (do_test): Likewise.
6896 * tst-context1.c (do_test): Likewise.
6897 * tst-cond2.c (do_test): Likewise.
6898 * tst-cond10.c (do_test): Likewise.
6899 * tst-clock2.c (do_test): Likewise.
6900 * tst-cancel10.c (do_test): Likewise.
6901 * tst-basic2.c (do_test): Likewise.
6902 * tst-barrier4.c (do_test): Likewise.
6904 2004-03-05 Ulrich Drepper <drepper@redhat.com>
6906 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6908 2004-03-01 Ulrich Drepper <drepper@redhat.com>
6910 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6911 (__pthread_cond_timedwait): Optimize wakeup test.
6912 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6913 (__pthread_cond_wait): Likewise.
6914 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6915 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6918 2004-02-29 Ulrich Drepper <drepper@redhat.com>
6920 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6921 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
6922 the atomic instruction needed.
6923 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6924 (__lll_mutex_lock_wait): Likewise.
6926 2004-02-28 Ulrich Drepper <drepper@redhat.com>
6928 * Makefile (tests): Add tst-cond14 and tst-cond15.
6929 * tst-cond14.c: New file.
6930 * tst-cond15.c: New file.
6932 2004-02-27 Ulrich Drepper <drepper@redhat.com>
6934 * sysdeps/pthread/createthread.c (create_thread): Remove use of
6935 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
6936 needs to be implemented differently to be useful.
6938 2004-02-26 Ulrich Drepper <drepper@redhat.com>
6940 * pthread_attr_setschedparam.c: Don't test priority against limits
6941 here. Set ATTR_FLAG_SCHED_SET flag.
6942 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6943 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6944 from parent thread to child. If attribute is used and scheduling
6945 parameters are not inherited, copy parameters from attribute or
6946 compute them. Check priority value.
6947 * pthread_getschedparam.c: If the parameters aren't known yet get
6948 them from the kernel.
6949 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6950 ATTR_FLAG_POLICY_SET flag for thread.
6951 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6952 and ATTR_FLAG_POLICY_SET.
6954 * sysdeps/pthread/createthread.c: Use tgkill if possible.
6956 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6957 fail if stack address hasn't been set. Just return 0.
6959 2004-02-25 Ulrich Drepper <drepper@redhat.com>
6961 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
6962 libpthread for the files in this list.
6963 (CFLAGS-tst-unload): Removed.
6964 * tst-unload.c (do_test): Don't use complete path for
6967 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6970 2004-02-22 Ulrich Drepper <drepper@redhat.com>
6972 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6973 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6974 operation per round is needed.
6975 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6976 (__lll_mutex_lock_wait): Likewise.
6978 2004-02-20 Ulrich Drepper <drepper@redhat.com>
6980 * tst-cancel9.c (cleanup): Don't print to stderr.
6982 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6984 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6986 2004-02-20 Jakub Jelinek <jakub@redhat.com>
6988 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6989 (__syscall_error_handler2): Call CDISABLE.
6990 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6991 (__syscall_error_handler2): Call CDISABLE.
6993 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6994 Release lock before the loop, don't reacquire it.
6996 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6998 2004-02-19 Andreas Schwab <schwab@suse.de>
7000 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7003 2004-02-18 Ulrich Drepper <drepper@redhat.com>
7005 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7006 (pthread_barrier_wait): After wakeup, release lock only when the
7007 last thread stopped using the barrier object.
7008 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7009 (pthread_barrier_wait): Likewise.
7010 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7012 * Makefile (tests): Add tst-barrier4.
7013 * tst-barrier4.c: New file.
7015 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7016 (__pthread_cond_timedwait): Perform timeout test while holding
7017 internal lock to prevent wakeup race.
7018 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7019 * sysdeps/pthread/pthread_cond_timedwait.c
7020 (__pthread_cond_timedwait): Likewise.
7021 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7022 (__pthread_cond_timedwait): Likewise.
7024 2004-02-18 Jakub Jelinek <jakub@redhat.com>
7026 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7027 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7028 * Makefile (tests): Add tst-rwlock13.
7029 * tst-rwlock13.c: New test.
7031 2004-02-16 Ulrich Drepper <drepper@redhat.com>
7033 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7034 (__condvar_tw_cleanup): Little optimization.
7035 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7037 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
7039 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7040 libpthread as "lib" parameter to SHLIB_COMPAT.
7041 (__novmx_siglongjmp): Fix typo in function name.
7042 (__novmx_longjmp): Fix typo in function name.
7044 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7046 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7049 * sysdeps/generic/pt-longjmp.c: Moved to...
7050 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
7052 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
7054 * Makefile (libpthread-routines): Add pt-cleanup.
7055 * pt-longjmp.c: Removed.
7056 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7057 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7058 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7059 Version longjmp, siglongjmp for GLIBC_2.3.4.
7060 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7062 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7064 * sysdeps/pthread/pthread_cond_timedwait.c
7065 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
7066 Reuse code. Add __builtin_expects.
7068 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7069 (__pthread_cond_timedwait): Get internal lock in case timeout has
7070 passed before the futex syscall.
7071 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7073 2004-01-20 Ulrich Drepper <drepper@redhat.com>
7075 * allocatestack.c: Pretty printing.
7077 * sysdeps/pthread/createthread.c (create_thread): Don't add
7078 CLONE_DETACHED bit if it is not necessary.
7080 2004-01-16 Ulrich Drepper <drepper@redhat.com>
7082 * pthread_getattr_np.c: Include ldsodefs.h.
7084 2004-01-16 Richard Henderson <rth@redhat.com>
7086 * allocatestack.c: Don't declare __libc_stack_end.
7087 * init.c (__pthread_initialize_minimal_internal): Likewise.
7088 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7090 2004-01-15 Richard Henderson <rth@redhat.com>
7092 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7093 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7094 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7095 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7096 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7097 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7098 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7099 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7101 2004-01-14 Ulrich Drepper <drepper@redhat.com>
7103 * init.c (pthread_functions): Make array const.
7105 2004-01-13 Ulrich Drepper <drepper@redhat.com>
7107 * allocatestack.c (__make_stacks_executable): Change interface.
7108 Check parameters. Pass parameter on to libc counterpart.
7109 * pthreadP.h: Change declaration.
7111 2004-01-13 Richard Henderson <rth@redhat.com>
7113 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7115 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7118 * sysdeps/alpha/Makefile: New file.
7119 * sysdeps/alpha/tcb-offsets.sym: New file.
7120 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7121 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7123 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7126 2004-01-08 Jakub Jelinek <jakub@redhat.com>
7128 * Makefile (tests): Add tst-backtrace1.
7129 * tst-backtrace1.c: New test.
7131 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7133 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7134 register as second parameter to the REGISTER macro.
7135 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7136 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7137 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7138 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7139 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7140 of thread register as second parameter to REGISTER macro in 64 case.
7142 2004-01-03 Ulrich Drepper <drepper@redhat.com>
7144 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7145 (CFLAGS-getpid.o): Defined.
7146 (CFLAGS-getpid.os): Defined.
7148 2003-12-31 Ulrich Drepper <drepper@redhat.com>
7150 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7151 returned for main thread does not overlap with any other VMA.
7152 Patch by Jakub Jelinek.
7154 2003-12-29 Jakub Jelinek <jakub@redhat.com>
7156 * tst-raise1.c: Include stdio.h.
7158 2003-12-23 Jakub Jelinek <jakub@redhat.com>
7160 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7161 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7162 If pid is 0, set it to selftid.
7163 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7164 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7165 != 0, return self->tid without doing a syscall.
7166 * descr.h (struct pthread): Move pid field after tid.
7168 * Makefile (tests): Add tst-raise1.
7169 * tst-raise1.c: New file.
7171 2003-12-23 Roland McGrath <roland@redhat.com>
7173 * tst-oddstacklimit.c: New file.
7174 * Makefile (tests): Add it.
7175 (tst-oddstacklimit-ENV): New variable.
7177 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7178 value up to page size for __default_stacksize.
7180 2003-12-21 Ulrich Drepper <drepper@redhat.com>
7182 * Makefile (tests): Add tst-eintr5.
7183 * tst-eintr5.c: New file.
7185 * eintr.c (eintr_source): Prevent sending signal to self.
7187 * tst-eintr2.c (tf1): Improve error message.
7189 2003-12-20 Ulrich Drepper <drepper@redhat.com>
7191 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7192 * sysdeps/unix/sysv/linux/getpid.c: New file.
7193 * pthread_cancel.c: Add comment explaining use of PID field.
7194 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7195 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7196 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7197 temporarily to signal the field must not be relied on and updated
7199 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7200 temporarily negative.
7201 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7203 2003-12-19 Ulrich Drepper <drepper@redhat.com>
7205 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7206 (eintr_source): If ARG != NULL, use pthread_kill.
7207 * tst-eintr1.c: Adjust for this change.
7208 * tst-eintr2.c: Likewise.
7209 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7210 * tst-eintr3.c: New file.
7211 * tst-eintr4.c: New file.
7213 2003-12-19 Jakub Jelinek <jakub@redhat.com>
7215 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7216 if CANCELSTATE_BITMASK is set.
7217 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7220 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7221 (tests-reverse): Add tst-cancel23.
7222 * tst-cancel22.c: New test.
7223 * tst-cancel23.c: New test.
7225 2003-12-18 Ulrich Drepper <drepper@redhat.com>
7227 * tst-eintr1.c: Better error messages.
7229 * Makefile (tests): Add tst-eintr2.
7230 * tst-eintr2.c: New file.
7232 2003-12-18 Jakub Jelinek <jakub@redhat.com>
7234 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7235 (CFLAGS-tst-cancelx21.c): Set.
7236 * tst-cancel21.c: New test.
7237 * tst-cancelx21.c: New test.
7239 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7241 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7242 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7243 * pt-longjmp.c: Include jmpbuf-unwind.h.
7244 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7245 _JMPBUF_UNWINDS. Adjust compared pointers.
7246 * init.c (__pthread_initialize_minimal_internal): Initialize
7247 pd->stackblock_size.
7248 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7249 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7250 * sysdeps/i386/jmpbuf-unwind.h: New file.
7251 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7252 * sysdeps/s390/jmpbuf-unwind.h: New file.
7253 * sysdeps/sh/jmpbuf-unwind.h: New file.
7254 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7255 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7256 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7257 (_JMPBUF_CFA_UNWINDS): Remove.
7258 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7260 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7262 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7263 (CFLAGS-tst-cancelx20.c): Set.
7264 * tst-cancel20.c: New test.
7265 * tst-cancelx20.c: New test.
7267 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7269 * init.c (__pthread_initialize_minimal_internal): Don't treat
7270 architectures with separate register stack special here when
7271 computing default stack size.
7273 2003-12-17 Roland McGrath <roland@redhat.com>
7275 * Makefile (tst-cancelx7-ARGS): New variable.
7276 Reportd by Greg Schafer <gschafer@zip.com.au>.
7278 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7280 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7281 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7282 (tst-stack3-ENV): Set.
7283 ($(objpfx)tst-stack3-mem): New.
7284 * tst-stack3.c: New test.
7286 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7288 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7289 Add unwind directives. Drop unused .regstk directive.
7290 (_fini_EPILOG_BEGINS): Add unwind directives.
7292 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7294 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7295 Assume parameter is a pointer.
7296 (lll_futex_wake): Likewise.
7297 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7299 (lll_futex_wake): Likewise.
7300 Reported by Boris Hu.
7301 * sysdeps/unix/sysv/linux/unregister-atfork.c
7302 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7304 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7306 2003-12-10 Ulrich Drepper <drepper@redhat.com>
7308 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7309 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7310 __rtld_lock_initialize for ld.so lock.
7311 Patch in part by Adam Li <adam.li@intel.com>.
7313 2003-12-02 David Mosberger <davidm@hpl.hp.com>
7315 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7316 in $(gnulib). Also, remove stale comment.
7318 2003-11-12 David Mosberger <davidm@hpl.hp.com>
7320 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7321 advantage of new syscall stub and optimize accordingly.
7323 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7324 from SYS_futex, to match expectations of
7325 sysdep.h:DO_INLINE_SYSCALL.
7326 (lll_futex_clobbers): Remove.
7327 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7328 (lll_futex_wake): Likewise.
7329 (lll_futex_requeue): Likewise.
7330 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7331 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7333 (__lll_mutex_lock): Likewise.
7334 (__lll_mutex_cond_lock): Likewise.
7335 (__lll_mutex_timed_lock): Likewise.
7336 (__lll_mutex_unlock): Likewise.
7337 (__lll_mutex_unlock_force): Likewise.
7339 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7340 comes before the include of <sysdep.h>.
7341 (THREAD_SELF_SYSINFO): New macro.
7342 (THREAD_SYSINFO): Likewise.
7343 (INIT_SYSINFO): New macro.
7344 (TLS_INIT_TP): Call INIT_SYSINFO.
7346 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7348 * sysdeps/pthread/createthread.c (create_thread): Use
7349 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7350 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7351 THREAD_SELF_SYSINFO instead of open code.
7352 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7353 (THREAD_SYSINFO): Likewise.
7355 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7357 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7359 2003-12-06 Ulrich Drepper <drepper@redhat.com>
7361 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7362 instead of .init. Patch by David Mosberger.
7364 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
7366 * sysdeps/pthread/configure.in: Remove broken declaration in C
7367 cleanup handling check.
7369 2003-11-30 Andreas Jaeger <aj@suse.de>
7371 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7372 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7375 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7377 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7378 * pthread_attr_destroy.c: Include shlib-compat.h.
7379 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7380 is set in iattr->flags.
7381 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7383 2003-11-21 Jakub Jelinek <jakub@redhat.com>
7385 * Makefile (distribute): Add tst-cleanup4aux.c.
7387 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7390 2003-11-21 Ulrich Drepper <drepper@redhat.com>
7392 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7393 pthread_cond_signal.
7395 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7396 store mutex address if the current value is ~0l.
7397 * sysdeps/pthread/pthread_cond_timedwait.c
7398 (__pthread_cond_timedwait): Likewise.
7399 * sysdeps/pthread/pthread_cond_broadcast.c
7400 (__pthread_cond_broadcast): Don't use requeue for pshared
7403 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7404 (__pthread_cond_wait): Don't store mutex address if the current
7406 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7407 (__pthread_cond_timedwait): Likewise.
7408 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7409 (__pthread_cond_broadcast): Don't use requeue for pshared
7412 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7413 element with ~0l for pshared condvars, with NULL otherwise.
7415 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7416 (__pthread_cond_wait): Don't store mutex address if the current
7418 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7419 (__pthread_cond_timedwait): Likewise.
7420 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7421 (__pthread_cond_broadcast): Don't use requeue for pshared
7424 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7425 * tst-cond12.c: New file.
7426 * tst-cond13.c: New file.
7428 2003-11-17 Ulrich Drepper <drepper@redhat.com>
7430 * sysdeps/pthread/configure.in: Make missing forced unwind support
7433 2003-11-11 Ulrich Drepper <drepper@redhat.com>
7435 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7437 2003-11-06 Ulrich Drepper <drepper@redhat.com>
7439 * Makefile: Add magic to clean up correctly.
7441 2003-11-05 Jakub Jelinek <jakub@redhat.com>
7443 * unwind.c (FRAME_LEFT): Define.
7444 (unwind_stop): Handle old style cleanups here.
7445 (__pthread_unwind): Handle old style cleanups only if
7446 !HAVE_FORCED_UNWIND.
7447 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7448 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7449 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7450 ($(objpfx)tst-cleanupx4): Likewise.
7451 * tst-cleanup4.c: New test.
7452 * tst-cleanup4aux.c: New.
7453 * tst-cleanupx4.c: New test.
7455 2003-11-04 Ulrich Drepper <drepper@redhat.com>
7457 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7458 lll_mutex_*lock macros to skip atomic operations on some archs.
7460 2003-11-03 Ulrich Drepper <drepper@redhat.com>
7462 * sysdeps/pthread/tst-timer.c (main): Initialize
7463 sigev2.sigev_value as well.
7465 2003-10-15 Roland McGrath <roland@redhat.com>
7467 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7469 * sysdeps/pthread/configure: Regenerated.
7471 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7473 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7474 locking macros. No distinction between normal and mutex locking
7476 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7477 Merge bits from lowlevelmutex.S we still need.
7478 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7479 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7480 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7481 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7482 new mutex implementation.
7483 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7484 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7485 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7486 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7487 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7488 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7489 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7490 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7491 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7492 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7493 symbol for entry point to avoid cancellation.
7495 2003-10-07 Jakub Jelinek <jakub@redhat.com>
7497 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7499 (SAVE_OLDTYPE_0): Fix a typo.
7501 2003-10-03 Ulrich Drepper <drepper@redhat.com>
7503 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7504 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7506 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7508 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7511 2003-10-02 Jakub Jelinek <jakub@redhat.com>
7513 * Makefile (tests): Add tst-cancel19.
7514 * tst-cancel19.c: New test.
7516 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7518 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7519 restoring of the old cancellation type.
7521 2003-09-30 Jakub Jelinek <jakub@redhat.com>
7523 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7525 2003-09-27 Wolfram Gloger <wg@malloc.de>
7527 * sysdeps/pthread/malloc-machine.h: New file
7529 2003-09-24 Roland McGrath <roland@redhat.com>
7531 * allocatestack.c (__make_stacks_executable): Don't ignore return
7532 value from _dl_make_stack_executable.
7534 2003-09-24 Ulrich Drepper <drepper@redhat.com>
7536 * allocatestack.c (__make_stacks_executable): Also change
7537 permission of the currently unused stacks.
7539 * allocatestack.c (change_stack_perm): Split out from
7540 __make_stacks_executable.
7541 (allocate_stack): If the required permission changed between the time
7542 we started preparing the stack and queueing it, change the permission.
7543 (__make_stacks_executable): Call change_stack_perm.
7545 * Makefile: Build tst-execstack-mod locally.
7546 * tst-execstack-mod.c: New file.
7548 2003-09-23 Jakub Jelinek <jakub@redhat.com>
7550 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7552 2003-09-23 Roland McGrath <roland@redhat.com>
7554 * tst-execstack.c: New file.
7555 * Makefile (tests): Add it.
7556 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7557 (LDFLAGS-tst-execstack): New variable.
7559 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7560 whether to use PROT_EXEC for stack mmap.
7561 (__make_stacks_executable): New function.
7562 * pthreadP.h: Declare it.
7563 * init.c (__pthread_initialize_minimal_internal): Set
7564 GL(dl_make_stack_executable_hook) to that.
7566 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7568 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7569 recommendation from AMD re avoidance of lock prefix.
7571 2003-09-22 Jakub Jelinek <jakub@redhat.com>
7573 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7574 lll_futex_timed_wait instead of lll_futex_wait.
7575 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7576 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7577 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7578 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7579 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7580 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7581 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7582 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7583 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7584 Completely revamp the locking macros. No distinction between
7585 normal and mutex locking anymore.
7586 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7587 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7588 __lll_lock_timedwait): Fix prototypes.
7589 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7590 __lll_lock_timedwait): Likewise.
7591 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7592 macros, add __builtin_expect.
7593 (lll_mutex_timedlock): Likewise. Fix return value.
7594 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7595 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7596 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7597 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7598 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7599 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7600 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7601 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7603 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7605 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7606 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7607 operation if possible.
7609 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7610 like jumping over the lock prefix.
7612 2003-09-21 Ulrich Drepper <drepper@redhat.com>
7614 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7615 locking macros. No distinction between normal and mutex locking
7617 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7618 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7619 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7620 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7621 locking. Merge bits from lowlevelmutex.S we still need.
7622 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7623 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7624 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7625 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7626 * Makefile (routines): Remove libc-lowlevelmutex.
7627 (libpthread-rountines): Remove lowlevelmutex.
7628 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7629 for new mutex implementation.
7630 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7631 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7632 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7633 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7634 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7636 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7638 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7639 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7640 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7641 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7642 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7643 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7644 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7645 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7647 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7649 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7650 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7651 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7653 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7654 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7656 2003-09-20 Ulrich Drepper <drepper@redhat.com>
7658 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7659 in parameters of asm with output parameters.
7661 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7662 type of DECR parameter to int.
7663 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7665 2003-09-18 Jakub Jelinek <jakub@redhat.com>
7667 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7668 guardsize for each thread.
7670 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7672 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7673 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7674 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7676 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7677 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7679 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7680 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7681 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7682 (pthread_getaffinity_np): Add hidden_def.
7684 * Makefile (tests): Add tst-attr3.
7685 * tst-attr3.c: New test.
7687 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7689 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7691 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7692 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7694 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7696 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7697 * tst-align.c: Include tst-stack-align.h.
7698 (tf, do_test): Use TEST_STACK_ALIGN macro.
7700 2003-09-17 Ulrich Drepper <drepper@redhat.com>
7702 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7705 2003-09-16 Ulrich Drepper <drepper@redhat.com>
7707 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7708 stack-related values for the initial thread.
7710 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7712 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7714 2003-09-11 Ulrich Drepper <drepper@redhat.com>
7716 * pthread_mutex_lock.c: Minor code rearrangements.
7718 2003-09-05 Roland McGrath <roland@redhat.com>
7720 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7721 Instead, include ../nptl_db/db_info.c to do its magic.
7722 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7723 (__pthread_pthread_key_2ndlevel_size): Likewise.
7724 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7725 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7726 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7727 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7728 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7729 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7730 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7731 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7732 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7733 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7734 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7735 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7736 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7737 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7738 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7739 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7740 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7742 2003-09-08 Ulrich Drepper <drepper@redhat.com>
7744 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7745 of pthread_t to be compatible with LT.
7746 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7747 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7748 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7749 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7750 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7751 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7752 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7754 2003-09-04 Ulrich Drepper <drepper@redhat.com>
7756 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7758 2003-09-04 Jakub Jelinek <jakub@redhat.com>
7760 * unwind-forcedunwind.c: Move to...
7761 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7762 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7763 * sysdeps/pthread/jmpbuf-unwind.h: New file.
7764 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7765 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7766 * unwind.c: Include jmpbuf-unwind.h.
7767 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7769 2003-09-02 Jakub Jelinek <jakub@redhat.com>
7771 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7772 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7773 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7774 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7775 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7776 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7777 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7778 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7779 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7780 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7781 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7783 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7784 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7785 * Makefile (tests): Add tst-stack2.
7786 * tst-stack2.c: New test.
7787 * tst-stack1.c: Include limits.h and sys/param.h.
7788 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7790 * pthread_condattr_setpshared.c: Include errno.h.
7791 (pthread_condattr_setpshared): Return EINVAL if pshared
7792 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7794 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7795 defined symbol for entry point to avoid cancellation.
7796 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7798 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7800 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7802 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7804 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7806 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7807 __close_nocancel, __read_nocancel, __write_nocancel,
7808 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7809 libpthread.so or librt.so, define to corresponding function
7810 without _nocancel suffix.
7811 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7812 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7813 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7815 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7817 2003-09-02 Ulrich Drepper <drepper@redhat.com>
7819 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7820 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7822 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7823 in subsections has a symbol associated with it.
7825 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7826 defined symbol for entry point to avoid cancellation.
7827 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7829 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7831 * Makefile (tests): Add tst-tls5.
7832 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7833 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7834 ($(objpfx)tst-tls5): New.
7835 ($(objpfx)tst-tls6.out): Likewise.
7836 (tests): Depend on $(objpfx)tst-tls6.out.
7837 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7838 (do_test): Check pthread_self () return value alignment.
7839 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7840 (tf): Check pthread_self () return value alignment.
7841 * tst-tls5.c: New test.
7843 * tst-tls5mod.c: New.
7844 * tst-tls5moda.c: New.
7845 * tst-tls5modb.c: New.
7846 * tst-tls5modc.c: New.
7847 * tst-tls5modd.c: New.
7848 * tst-tls5mode.c: New.
7849 * tst-tls5modf.c: New.
7850 * tst-tls6.sh: New test.
7852 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7853 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7854 * init.c (pthread_functions): Initialize them.
7855 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7856 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7857 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7858 pthread_cond_timedwait@@GLIBC_2.3.2.
7860 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7862 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7863 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7864 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7865 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7866 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7867 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7869 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7871 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7872 _POSIX_THREAD_PRIORITY_SCHEDULING.
7873 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7875 2003-08-31 Ulrich Drepper <drepper@redhat.com>
7877 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7878 nested function, use static inline function from libio.h.
7879 Code by Richard Henderson.
7881 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7884 2003-08-30 Jakub Jelinek <jakub@redhat.com>
7886 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7887 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7888 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7889 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7890 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7891 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7892 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7893 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7894 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7895 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7896 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7897 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7898 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7899 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7900 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7901 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7902 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7903 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7904 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7905 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7906 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7907 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7908 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7909 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7910 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7911 * sysdeps/sparc/tls.h: New file.
7912 * sysdeps/sparc/tcb-offsets.sym: New file.
7913 * sysdeps/sparc/Makefile: New file.
7914 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7915 * init.c [__sparc__] (__NR_set_tid_address): Define.
7917 2003-08-29 Jakub Jelinek <jakub@redhat.com>
7919 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7920 _IO_release_lock): Define.
7922 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
7924 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7925 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
7927 2003-08-27 Ulrich Drepper <drepper@redhat.com>
7929 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7930 (__pthread_cleanup_class): Add missing return types of member
7933 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
7935 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7936 (lll_mutex_unlock_force): Add memory barrier between store and futex
7939 2003-08-25 Ulrich Drepper <drepper@redhat.com>
7941 * tst-cancel4.c (do_test): Also unlink tempfname and remove
7942 tempmsg in first loop.
7944 2003-08-18 Ulrich Drepper <drepper@redhat.com>
7946 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7947 _POSIX_THREAD_PRIORITY_SCHEDULING.
7948 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7950 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7952 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7953 (__rtld_lock_default_lock_recursive,
7954 __rtld_lock_default_unlock_recursive): Define.
7955 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7956 __rtld_lock_unlock_recursive): Define using
7957 GL(_dl_rtld_*lock_recursive).
7958 * init.c (__pthread_initialize_minimal_internal): Initialize
7959 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7960 Lock GL(_dl_load_lock) the same number of times as
7961 GL(_dl_load_lock) using non-mt implementation was nested.
7963 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7964 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7966 2003-08-06 Jakub Jelinek <jakub@redhat.com>
7968 * tst-cancel17.c (do_test): Make len2 maximum of page size and
7971 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7973 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7975 2003-08-03 Jakub Jelinek <jakub@redhat.com>
7977 * sysdeps/pthread/createthread.c (do_clone): Move error handling
7978 to first syscall error check. Move syscall error check for tkill
7979 into __ASSUME_CLONE_STOPPED #ifdef.
7981 2003-08-02 Ulrich Drepper <drepper@redhat.com>
7983 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7984 is not defined, do explicit synchronization.
7985 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
7986 is not defined also unlock pd->lock for non-debugging case in case
7988 * pthread_create.c (start_thread): Always get and release pd->lock
7989 if __ASSUME_CLONE_STOPPED is not defined.
7990 (start_thread_debug): Removed. Adjust users.
7991 * allocatestack.c (allocate_stack): Always initialize lock if
7992 __ASSUME_CLONE_STOPPED is not defined.
7993 * Makefile (tests): Add tst-sched1.
7994 * tst-sched1.c: New file.
7996 * sysdeps/pthread/createthread.c (do_clone): Only use
7997 sched_setschduler and pass correct parameters.
7999 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8001 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8002 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8003 PTHREAD_STACK_MIN in comments.
8005 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8007 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8008 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8010 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8011 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8012 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8013 (__pthread_cleanup_upto): Fix prototype.
8014 (_longjmp_unwind): Adjust caller.
8015 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8016 Change second argument to const struct pointer.
8017 * tst-sem8.c (main): Remove unused s2 and s3 variables.
8018 * tst-sem9.c (main): Likewise.
8019 * unwind.c: Include string.h for strlen prototype.
8021 2003-07-31 Ulrich Drepper <drepper@redhat.com>
8023 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8024 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8025 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8027 Patch by Nicholas Miell <nmiell@attbi.com>.
8029 2003-07-30 Jakub Jelinek <jakub@redhat.com>
8031 * init.c (__pthread_initialize_minimal_internal): Initialize
8032 GL(dl_init_static_tls).
8033 * pthreadP.h (__pthread_init_static_tls): New prototype.
8034 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8036 * Makefile (tests): Add tst-tls4.
8037 (modules-names): Add tst-tls4moda and tst-tls4modb.
8038 ($(objpfx)tst-tls4): Link against libdl and libpthread.
8039 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8041 * tst-tls4.c: New file.
8042 * tst-tls4moda.c: New file.
8043 * tst-tls4modb.c: New file.
8045 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
8047 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8048 before __timer_dealloc.
8049 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8050 Don't call list_unlink.
8052 2003-07-29 Roland McGrath <roland@redhat.com>
8054 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8056 2003-07-25 Jakub Jelinek <jakub@redhat.com>
8058 * tst-cancel17.c (do_test): Check if aio_cancel failed.
8059 Don't reuse struct aiocb A if it failed.
8060 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8061 not just one byte, as that does not block.
8063 2003-07-22 Jakub Jelinek <jakub@redhat.com>
8065 * sysdeps/pthread/unwind-resume.c: New file.
8066 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8067 unwind-resume in csu subdir.
8068 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8070 (librt-sysdep_routines, librt-shared-only-routines): Add
8072 * sysdeps/pthread/rt-unwind-resume.c: New file.
8073 * unwind-forcedunwind.c: New file.
8074 * Makefile (libpthread-routines): Add unwind-forcedunwind.
8075 (libpthread-shared-only-routines): Likewise.
8076 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8077 * pthreadP.h (pthread_cancel_init): New prototype.
8078 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8080 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8081 attr argument const struct pthread_attr *.
8083 * res.c (__res_state): Return __resp.
8084 * descr.h: Include resolv.h.
8085 (struct pthread): Add res field.
8086 * pthread_create.c: Include resolv.h.
8087 (start_thread): Initialize __resp.
8088 * Makefile (tests): Add tst-_res1.
8089 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8090 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8091 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8093 * tst-_res1.c: New file.
8094 * tst-_res1mod1.c: New file.
8095 * tst-_res1mod2.c: New file.
8097 2003-07-21 Ulrich Drepper <drepper@redhat.com>
8099 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8101 * Makefile: Define various *-no-z-defs variables for test DSOs
8102 which has undefined symbols.
8104 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8106 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8107 Retry if the stwcx fails to store once_control.
8109 2003-07-20 Ulrich Drepper <drepper@redhat.com>
8111 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8112 pthread_attr_setaffinity.
8113 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8114 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8115 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8116 * pthread_attr_destroy.c: Free cpuset element if allocated.
8117 * pthread_create.c: Pass iattr as additional parameter to
8119 * sysdeps/pthread/createthread.c: If attribute is provided and
8120 a new thread is created with affinity set or scheduling parameters,
8121 start thread with CLONE_STOPPED.
8122 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8123 pthread_attr_setaffinity.
8124 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8127 2003-07-15 Ulrich Drepper <drepper@redhat.com>
8129 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8131 2003-07-14 Ulrich Drepper <drepper@redhat.com>
8133 * sysdeps/pthread/configure.in: Require CFI directives also for
8136 2003-07-15 Jakub Jelinek <jakub@redhat.com>
8138 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8141 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8143 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8145 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8146 registers as variables. Call __pthread_mutex_unlock_usercnt.
8147 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8148 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8149 not self pointer in __writer. Compare with TID to determine
8151 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8152 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8154 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8156 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8157 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8158 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8159 macros also when compiling librt.
8161 2003-07-11 Jakub Jelinek <jakub@redhat.com>
8163 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8164 -fasynchronous-unwind-tables.
8165 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8166 (PSEUDO): Add cfi directives.
8167 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8169 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8172 2003-07-08 Jakub Jelinek <jakub@redhat.com>
8174 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8175 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8176 * unwind.c (__pthread_unwind_next): Add hidden_def.
8177 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8179 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8180 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8181 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8183 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8184 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8186 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8187 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8188 __pthread_unregister_cancel and __pthread_unwind_next.
8190 2003-07-04 Jakub Jelinek <jakub@redhat.com>
8192 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8193 different symbol for the cancellation syscall wrapper and
8194 non-cancellation syscall wrapper.
8195 (PSEUDO_END): Define.
8197 2003-07-05 Richard Henderson <rth@redhat.com>
8199 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8200 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8201 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8202 return actual return value from the syscall, not 0.
8204 2003-07-07 Ulrich Drepper <drepper@redhat.com>
8206 * descr.h (struct pthread): Add pid field.
8207 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8208 (__reclaim_stacks): Likewise.
8209 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8210 also check for PID of the signal source.
8211 (__pthread_initialize_minimal_internal): Also initialize pid field
8212 of initial thread's descriptor.
8213 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8214 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8215 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8216 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8217 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8219 2003-07-05 Ulrich Drepper <drepper@redhat.com>
8221 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8222 Fix use of parameter.
8223 (__libc_cleanup_pop): Likewise.
8225 2003-07-04 Ulrich Drepper <drepper@redhat.com>
8227 * init.c (sigcancel_handler): Change parameters to match handler
8228 for SA_SIGACTION. Check signal number and code to recognize
8229 invalid invocations.
8231 2003-07-03 Roland McGrath <roland@redhat.com>
8233 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8234 Apply sizeof (struct pthread) bias to r13 value.
8236 2003-07-03 Ulrich Drepper <drepper@redhat.com>
8238 * sysdeps/pthread/configure.in: Require CFI directives.
8240 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8242 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8243 libpthread compilation.
8244 * unwind.c (__pthread_unwind): Add hidden_def.
8245 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8247 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8249 * libc-cancellation.c (__libc_cleanup_routine): Define.
8250 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8251 (__pthread_cleanup_pop): Define.
8253 2003-07-01 Richard Henderson <rth@redhat.com>
8255 * sysdeps/alpha/elf/pt-initfini.c: New file.
8256 * sysdeps/alpha/pthread_spin_lock.S: New file.
8257 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8258 * sysdeps/alpha/pthreaddef.h: New file.
8259 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8260 * sysdeps/alpha/tls.h: New file.
8261 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8262 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8263 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8264 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8265 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8266 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8267 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8268 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8269 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8270 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8272 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8274 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8275 cleanup support and unwind info.
8277 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8279 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8280 Use correct cleanup handler registration. Add unwind info.
8281 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8282 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8283 * tst-once3.c: Add cleanup handler and check it is called.
8284 * tst-once4.c: Likewise.
8285 * tst-oncex3.c: New file.
8286 * tst-oncex4.c: New file.
8287 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8289 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8291 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8293 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8295 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8296 (tf_msgsnd): Likewise.
8298 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8299 premature returns a bit more.
8301 2003-06-26 Ulrich Drepper <drepper@redhat.com>
8303 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8304 definition to the front.
8306 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8307 the cleanup functions to make the names unique. Fix dwarf opcode
8309 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8310 functions to make the names unique. Fix CFA offset for two blocks.
8312 2003-06-25 Ulrich Drepper <drepper@redhat.com>
8314 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8315 missing closing braces.
8316 Patch by Christophe Saout <christophe@saout.de>.
8318 2003-06-24 Roland McGrath <roland@redhat.com>
8320 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8322 2003-06-24 Ulrich Drepper <drepper@redhat.com>
8324 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8325 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8327 * pthreadP.h: Declare __find_thread_by_id.
8328 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8329 * pthread_clock_gettime.c: Allow using other thread's clock.
8330 * pthread_clock_settime.c: Likewise.
8331 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8332 * Makefile: Add rules to build and run tst-clock2.
8333 * tst-clock2.c: New file.
8335 2003-06-23 Ulrich Drepper <drepper@redhat.com>
8337 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8338 to use exception-based cleanup handler.
8339 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8341 * tst-cond8.c (ch): Announce that we are done.
8343 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8345 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8346 Also test aio_suspend with timeout value.
8348 2003-06-22 Ulrich Drepper <drepper@redhat.com>
8350 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8351 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8354 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8355 (__pthread_mutex_lock_internal): Likewise.
8356 (__pthread_mutex_unlock_internal): Likewise.
8357 (__pthread_mutex_unlock_usercnt): Declare.
8358 * pthread_mutex_destroy.c: Always fail if used in any way.
8359 * pthread_mutex_init.c: Update comment.
8360 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8361 * pthread_mutex_timedlock.c: Adjust __nusers.
8362 * pthread_mutex_trylock.c: Adjust __nusers.
8363 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8364 and public interfaces are wrapper with pass additional parameter.
8365 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8367 * tst-mutex8.c: New file.
8368 * Makefile (tests): Add tst-mutex8.
8369 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8370 __pthread_mutex_unlock_usercnt.
8371 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8372 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8373 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8374 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8375 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8376 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8377 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8379 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8380 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8381 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8382 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8383 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8385 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8386 * pthread_mutex_timedlock.c: Likewise.
8387 * pthread_mutex_trylock.c: Adjust __nusers.
8388 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8389 * tst-mutex9.c: New file.
8390 * Makefile (tests): Add tst-mutex9.
8391 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8392 * sysdeps/ia64/tls.h: Likewise.
8393 * sysdeps/powerpc/tls.h: Likewise.
8394 * sysdeps/s390/tls.h: Likewise.
8395 * sysdeps/sh/tls.h: Likewise.
8396 * sysdeps/x86_64/tls.h: Likewise.
8397 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8398 Change type of __owner.
8399 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8400 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8401 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8402 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8403 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8405 2003-06-19 Jakub Jelinek <jakub@redhat.com>
8407 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8408 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8410 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8411 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8412 instead of nr to lll_futex_wake. Only set errno and return -1
8415 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8416 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8417 return actual return value from the syscall, not 0.
8419 2003-06-18 Ulrich Drepper <drepper@redhat.com>
8421 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8422 find a random value.
8423 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8426 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8427 compat_timer_settime.
8428 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8429 compat_timer_gettime.
8430 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8431 compat_timer_getoverrun.
8432 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8433 compat_timer_delete.
8435 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8436 error-checking mutex detect busy mutexes.
8438 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8440 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8441 Add ax to clobber list.
8442 (lll_mutex_cond_lock): Likewise.
8443 (lll_mutex_unlock): Likewise.
8444 (lll_lock): Likewise.
8445 (lll_unlock): Likewise.
8447 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8448 * tst-cancel18.c: New file.
8449 * tst-cancelx18.c: New file.
8451 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8454 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8455 * tst-cancel17.c: New file.
8456 * tst-cancelx17.c: New file.
8458 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8459 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8460 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8462 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8464 2003-06-16 Jakub Jelinek <jakub@redhat.com>
8466 * sysdeps/pthread/createthread.c (create_thread): Set
8467 header.multiple_threads unconditionally.
8468 * allocatestack.c (allocate_stack): Likewise.
8469 * descr.h (struct pthread): Add header.multiple_threads
8471 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8472 Define for librt. #error if neither libpthread, libc nor librt.
8473 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8475 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8476 CDISABLE): Likewise.
8477 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8478 CDISABLE): Likewise.
8479 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8480 CDISABLE): Likewise.
8481 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8482 CDISABLE): Likewise. Access header.multiple_threads outside of
8483 libc and libpthread.
8484 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8486 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8487 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8489 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8491 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8492 Also test early cancellation before the thread reaches the cancellation
8495 * Makefile: Compile forward.c with exceptions.
8497 * sysdeps/unix/sysv/linux/sleep.c: New file.
8499 2003-06-16 Ulrich Drepper <drepper@redhat.com>
8501 * Makefile: Add CFLAGS definition to compile function wrappers
8502 duplicated from libc with exceptions.
8503 * tst-cancel4.c: Also check cancellation handlers.
8505 * Makefile: Add rules to build and run tst-cancel16 and
8506 tst-cancelx16. Add missing CFLAGS definitions.
8507 * tst-cancel16.c: New file.
8508 * tst-cancelx16.c: New file.
8510 2003-06-15 Ulrich Drepper <drepper@redhat.com>
8512 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8513 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8514 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8515 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8517 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8518 (LIBC_CANCEL_RESET): Likewise.
8519 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8520 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8522 (CFLAGS-libcrt-cancellation.c): Define.
8523 * sysdeps/pthread/librt-cancellation.c: New file.
8524 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8525 macros also when compiling librt.
8526 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8527 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8528 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8529 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8530 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8531 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8532 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8534 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8535 compat_timer_create.
8537 2003-06-14 Ulrich Drepper <drepper@redhat.com>
8539 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8541 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8543 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8544 Add libc_hidden_def.
8546 2003-06-13 Roland McGrath <roland@redhat.com>
8548 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8549 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8551 2003-06-11 Ulrich Drepper <drepper@redhat.com>
8553 * allocatestack.c (queue_stack): Always inline.
8554 * ptreadhP.h (__do_cancel): Likewise.
8556 2003-06-10 Jakub Jelinek <jakub@redhat.com>
8558 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8561 2003-06-10 Ulrich Drepper <drepper@redhat.com>
8563 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8564 (__pthread_cond_signal): Remove incorrect second addition for
8567 2003-06-09 Ulrich Drepper <drepper@redhat.com>
8569 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8570 (__pthread_cond_signal): Use correct futex pointer in
8571 __lll_mutex_lock_wait call.
8573 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8574 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8576 2003-06-08 Ulrich Drepper <drepper@redhat.com>
8578 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8580 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8583 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8584 hand-written CFI generation code. Since ENTRY/END also initiated
8585 CFI frames this caused two CFI sets to be generated.
8587 2003-06-07 Ulrich Drepper <drepper@redhat.com>
8589 * cleanup_routine.c: New file.
8590 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8591 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8593 * Makefile (libpthread-routines): Add cleanup_routine.
8594 Add more CFLAGS variables to compile with exceptions. Add comments
8595 why which file needs unwind tables.
8596 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8598 * tst-cancelx1.c: New file.
8599 * tst-cancelx2.c: New file.
8600 * tst-cancelx3.c: New file.
8601 * tst-cancelx4.c: New file.
8602 * tst-cancelx5.c: New file.
8603 * tst-cancelx6.c: New file.
8604 * tst-cancelx7.c: New file.
8605 * tst-cancelx8.c: New file.
8606 * tst-cancelx9.c: New file.
8607 * tst-cancelx10.c: New file.
8608 * tst-cancelx11.c: New file.
8609 * tst-cancelx12.c: New file.
8610 * tst-cancelx13.c: New file.
8611 * tst-cancelx14.c: New file.
8612 * tst-cancelx15.c: New file.
8613 * tst-cleanupx0.c: New file.
8614 * tst-cleanupx0.expect: New file.
8615 * tst-cleanupx1.c: New file.
8616 * tst-cleanupx2.c: New file.
8617 * tst-cleanupx3.c: New file.
8619 * tst-cleanup0.c: Make standard compliant.
8620 * tst-cleanup1.c: Likewise.
8622 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8623 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8624 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8625 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8626 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8627 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8628 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8630 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8631 * tst-cancel12.c: New file.
8632 * tst-cancel13.c: New file.
8633 * tst-cancel14.c: New file.
8634 * tst-cancel15.c: New file.
8635 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8638 * tst-cancel1.c: Add some comments.
8640 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8643 2003-06-06 Ulrich Drepper <drepper@redhat.com>
8645 * Makefile (CFLAGS-pthread_cancel.c): Define.
8647 2003-06-05 Ulrich Drepper <drepper@redhat.com>
8649 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8650 Change type of __writer element to int.
8651 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8652 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8653 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8654 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8655 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8656 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8657 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8658 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8659 Compare with TID to determine deadlocks.
8660 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8661 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8662 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8663 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8664 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8665 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8667 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8669 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8670 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8671 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8673 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8675 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8676 * Makefile (tests): Add tst-rwlock12.
8677 * tst-rwlock12.c: New file.
8679 2003-06-05 Jakub Jelinek <jakub@redhat.com>
8681 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8682 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8683 Remove bogus hidden_proto.
8684 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8686 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8687 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8688 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8689 ___lll_mutex_timedlock): Likewise.
8691 2003-06-04 Ulrich Drepper <drepper@redhat.com>
8693 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8694 (__pthread_cond_signal): Add some code to eventually handle
8697 2003-06-01 Ulrich Drepper <drepper@redhat.com>
8699 * Makefile (tests): Add tst-exec4.
8700 (tst-exec4-ARGS): Define.
8701 * tst-exec4.c: New file.
8703 2003-05-31 Ulrich Drepper <drepper@redhat.com>
8705 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8706 Also fail if tv_nsec < 0.
8707 (__lll_timedwait_tid): Likewise.
8708 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8709 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8711 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8713 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8715 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8717 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8719 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8722 * Makefile (tests): Add tst-sem8 and tst-sem9.
8723 * tst-sem8.c: New file.
8724 * tst-sem9.c: New file.
8725 * sem_open.c: Fix creation of in_use record if the file exists but
8728 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8731 * sysdeps/pthread/timer_create.c (timer_create): In case
8732 evp==NULL, assign timer ID to sival_ptr.
8734 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8735 struct pthread_unwind_buf *.
8736 (struct pthread): Likewise for cleanup_jmp_buf element.
8738 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8739 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8740 * unwind.c (__pthread_unwind_next): Likewise.
8742 2003-05-30 Ulrich Drepper <drepper@redhat.com>
8744 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8745 (lll_futex_timed_wait): Use int for futex value parameter.
8746 (lll_futex_wake): Likewise.
8747 (lll_futex_requeue): Likewise.
8749 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8750 Replace one memory operation with one register operation.
8752 * tst-join4.c (do_test): Fix error message.
8754 * tst-rwlock6.c (do_test): Use correct format specifier.
8756 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8757 (__lll_mutex_lock_wait): Replace one memory operation with one
8759 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8760 (__lll_mutex_lock_wait): Likewise.
8762 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8763 (__lll_mutex_cond_lock): Add one to value parameter of
8764 __lll_lock_wait to reflect reality in the futex syscall.
8765 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8766 (lll_mutex_cond_lock): Likewise.
8768 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8770 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8772 (lll_mutex_cond_lock): Define.
8774 2003-05-29 Ulrich Drepper <drepper@redhat.com>
8776 * Makefile (tests): Add tst-signal6.
8777 * tst-signal6.c: New file.
8779 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8780 (__lll_mutex_unlock_force): New function
8781 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8783 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8784 (__lll_mutex_unlock_force): New function.
8785 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8787 * tst-rwlock7.c (do_test): Use correct format specifier.
8789 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8790 Find break parameter in correct asm argument.
8792 2003-05-27 Jakub Jelinek <jakub@redhat.com>
8794 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8796 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8798 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8800 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8801 lll_futex_requeue, lll_mutex_unlock_force): Define.
8803 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8805 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8806 (pthread_cond_t): Add __mutex.
8807 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8808 lll_futex_requeue, lll_mutex_unlock_force): Define.
8810 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8812 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8813 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8815 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8817 (lll_futex_wait, lll_futex_wake): Define.
8818 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8819 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8820 FUTEX_REQUEUE instead of FUTEX_WAIT.
8821 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8822 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8823 mutex which was used in condvar structure. Call
8824 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8825 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8827 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8828 include tcb-offsets.h. Read wakeup value in locked region.
8829 Use the value of gbr register as THREAD_ID.
8830 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8831 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8832 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8834 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8837 2003-05-28 Ulrich Drepper <drepper@redhat.com>
8839 * sysdeps/pthread/pthread_cond_broadcast.c
8840 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8842 2003-05-26 Ulrich Drepper <drepper@redhat.com>
8844 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8845 typo in register name.
8846 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8847 correctly. Actually use requeue. Little optimization.
8848 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8849 mutex address early. Handle cancellation state as 32-bit value.
8850 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8851 Remove unnecessary label.
8853 2003-05-25 Ulrich Drepper <drepper@redhat.com>
8855 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8856 instead of FUTEX_WAIT.
8857 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8858 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8859 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8860 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8861 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8862 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8863 used in condvar structure. Call __pthread_mutex_cond_lock instead
8864 of __pthread_mutex_lock_internal.
8865 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8866 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8867 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8868 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8869 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8870 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8871 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8872 Add pthread_mutex_cond_lock.
8873 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8874 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8875 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8876 lll_mutex_cond_lock.
8877 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8878 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8879 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8881 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8882 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8884 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8885 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8887 * pthreadP.h: Declare __pthread_mutex_cond_lock.
8888 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8889 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
8890 macro don't define aliases.
8892 * cancellation.c: Remove __pthread_enable_asynccancel_2.
8893 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8894 * sysdeps/pthread/pthread_cond_timedwait.c: Use
8895 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8896 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8897 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8898 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8899 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8900 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8902 2003-05-17 Ulrich Drepper <drepper@redhat.com>
8904 * sem_open.c: Fix one endless loop. Implement correct semantics
8905 wrt opening the same semaphore more then once.
8906 * sem_close.c: Adjust for sem_open change.
8907 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
8908 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8909 * Makefile (tests): Add tst-sem7.
8910 * tst-sem7.c: New file.
8912 2003-05-16 Roland McGrath <roland@redhat.com>
8914 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8915 uninitialized variable braino.
8917 2003-05-16 Ulrich Drepper <drepper@redhat.com>
8919 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8920 test for syscall availability.
8922 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8923 __no_posix_timers to -1 if the syscalls don't exist.
8925 * pthread_join.c (pthread_join): Set tid field of the joined
8926 thread to -1. This isn't necessary but helps to recognize some
8927 error conditions with almost no cost.
8929 * allocatestack.c (FREE_P): Also negative values indicate an
8932 * unwind.c: Include <unistd.h>.
8934 2003-05-14 Ulrich Drepper <drepper@redhat.com>
8936 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8938 2003-05-14 Jakub Jelinek <jakub@redhat.com>
8940 * Makefile (crti-objs, crtn-objs): New variables.
8941 (omit-deps, extra-objs): Add crtn.
8942 ($(objpfx)libpthread.so): Depend on both crti and crtn
8943 and links to them in multidir.
8944 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8946 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
8948 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8949 (lll_mutex_unlock): Use atomic_exchange_rel.
8951 2003-05-11 Ulrich Drepper <drepper@redhat.com>
8953 * cond-perf.c (cons): Add missing locking around setting of alldone.
8955 2003-05-10 Ulrich Drepper <drepper@redhat.com>
8957 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8959 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8961 2003-05-09 Ulrich Drepper <drepper@redhat.com>
8963 * tst-sem6.c: New file.
8964 * Makefile (tests): Add tst-sem6.
8966 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8967 Use atomic_exchange_rel instead of atomic_exchange.
8968 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8971 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8972 code for lll_futex_wait and lll_futex_wake in static apps. Use
8973 vsyscall is possible.
8975 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8976 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8977 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8978 pthread_setaffinity_np.
8979 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8980 and pthread_setaffinity_np.
8981 * Makefile (libpthread-routines): Add pthread_getaffinity and
8982 pthread_setaffinity.
8984 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8985 use it in case mmap to allocate the stack fails.
8986 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8987 ARCH_MAP_FLAGS here.
8988 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8991 2003-05-08 Ulrich Drepper <drepper@redhat.com>
8993 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8994 handler implementation. It is now lockless in fork().
8995 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8996 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8997 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
8998 declare the __fork_*_lists.
8999 (struct fork_handler): Include pointers to all three functions.
9000 Add next, refcntr and need_signal elements.
9001 (__fork_handlers): New declaration.
9002 (__register_atfork_malloc): Remove declaration.
9003 (HAVE_register_atfork_malloc): Remove definition.
9004 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9005 __pthread_child_handler variable.
9006 (__libc_pthread_init): Use __register_atfork instead of explicitly
9008 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9010 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9012 * unwind.c (unwind_cleanup): Print error message and then abort. This
9013 function must never be reached.
9015 * cond-perf.c: New file.
9017 2003-05-05 Ulrich Drepper <drepper@redhat.com>
9019 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9021 2003-05-04 Roland McGrath <roland@redhat.com>
9023 * Makefile ($(objpfx)../libc.so): New target.
9025 2003-05-02 Ulrich Drepper <drepper@redhat.com>
9027 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9028 (pthread_condattr_t): Size is only an int, don't use long for
9030 (pthread_mutexattr_t): Likewise.
9031 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9032 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9033 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9035 2003-05-01 Ulrich Drepper <drepper@redhat.com>
9037 * sysdeps/i386/tls.h: Define THREAD_ID.
9038 * sysdeps/ia64/tls.h: Likewise.
9039 * sysdeps/powerpc/tls.h: Likewise.
9040 * sysdeps/s390/tls.h: Likewise.
9041 * sysdeps/sh/tls.h: Likewise.
9042 * sysdeps/x86_64/tls.h: Likewise.
9043 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9045 * pthread_mutex_timedlock.c: Likewise.
9046 * pthread_mutex_trylock.c: Likewise.
9047 * pthread_mutex_unlock.c: Likewise.
9048 * pthread_rwlock_trywrlock.c: Likewise.
9049 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9050 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9051 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9052 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9054 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9057 2003-04-29 Jakub Jelinek <jakub@redhat.com>
9059 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9060 (__SIZEOF_PTHREAD_COND_T): Define to 48.
9061 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9062 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9063 Make __align long long instead of long.
9064 (pthread_rwlock_t): Formatting.
9065 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9066 (pthread_rwlock_t): Formatting.
9067 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9068 (pthread_cond_t): Make __align long long instead of long.
9069 (pthread_rwlock_t): Move __flags field to the same position as in
9072 2003-04-30 Ulrich Drepper <drepper@redhat.com>
9074 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9075 * tst-rwlock7.c (do_test): Likewise.
9077 2003-04-26 Roland McGrath <roland@redhat.com>
9079 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9081 2003-04-22 Jakub Jelinek <jakub@redhat.com>
9083 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9084 sizeof (struct pthread).
9085 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9087 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9089 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9091 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9093 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9095 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9097 (NO_TLS_OFFSET): Define.
9098 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9099 add TLS_TCB_SIZE unnecessarily.
9101 2003-04-22 Roland McGrath <roland@redhat.com>
9103 * Makeconfig (shared-thread-library): Reverse link order to work
9106 2003-04-22 Ulrich Drepper <drepper@redhat.com>
9108 * semaphore.h: Fix typo in comment.
9110 2003-04-21 Ulrich Drepper <drepper@redhat.com>
9112 * sysdeps/pthread/sigfillset.c: New file.
9114 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9115 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9116 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9117 * sysdeps/pthread/sigaction.c: Likewise.
9118 * sysdeps/pthread/sigprocmask.c: New file.
9119 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9121 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9122 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9125 2003-04-19 Ulrich Drepper <drepper@redhat.com>
9127 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9128 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9130 * sysdeps/unix/sysv/linux/unregister-atfork.c
9131 (__unregister_atfork): Don't free memory not allocated dynamically.
9133 * semaphore.h: Remove __THROW marker from cancellation points.
9134 * nptl/sysdeps/pthread/pthread.h: Likewise.
9136 2003-04-18 Ulrich Drepper <drepper@redhat.com>
9138 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9139 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9142 2003-04-16 Jakub Jelinek <jakub@redhat.com>
9144 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9146 2003-04-15 Roland McGrath <roland@redhat.com>
9148 * forward.c (__pthread_unwind): Tweak to avoid warning.
9150 2003-04-15 Ulrich Drepper <drepper@redhat.com>
9152 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9154 2003-04-14 Ulrich Drepper <drepper@redhat.com>
9156 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9157 overflow CFA advance instructions.
9158 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9160 2003-04-14 Jakub Jelinek <jakub@redhat.com>
9162 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9163 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9164 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9167 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9168 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9169 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9170 DW_CFA_advance_loc for .Laddl-.Lsubl.
9172 2003-04-13 Ulrich Drepper <drepper@redhat.com>
9174 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9175 position-independent unwind data for static libraries.
9176 Add missing unwind info. Add comments.
9178 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9179 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9180 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9181 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9183 2003-04-12 Ulrich Drepper <drepper@redhat.com>
9185 * Makefile: Make sure all cancellation points are compiled with
9186 exception and asynchronous unwind tables.
9188 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9189 which mishandles loading of global object addresses in PIC.
9190 (THREAD_SETMEM_NC): Likewise.
9192 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9194 * pthread.h: Define new data structure for cleanup buffer. Declare
9195 new cleanup handler interfaces.
9196 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9197 (struct pthread): Add cleanup_jmp_buf pointer. Define
9198 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9199 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9200 it. Declare old cleanup handler installation functions.
9201 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9203 * cleanup_defer.c: Likewise.
9204 * cleanup_compat.c: New file. Old cleanup code.
9205 * cleanup_def_compat.c: New file. Old cleanup code.
9206 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9207 if own thread descriptor.
9208 * unwind.c: New file.
9209 * forward.c: Add __pthread_unwind.
9210 * init.c (pthread_functions): Add __pthread_unwind.
9211 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9212 Add ptr___pthread_unwind.
9213 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9214 and unwind function.
9215 * Makefile (libpthread-routines): Add cleanup_compat,
9216 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9217 table generation if necessary.
9218 * version.c: Record whether unwind support is compiled in.
9219 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9220 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9222 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9223 complication to generate unwind information for syscall wrappers.
9224 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9225 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9226 __cleanup_fct_attribute.
9228 * Makefile: Add rules to build and run tst-cleanup0.
9229 * tst-cleanup0.c: New file.
9230 * tst-cleanup0.expect: New file.
9232 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9233 caller. Optimize to avoid often unecessary local variable.
9235 2003-04-11 Roland McGrath <roland@redhat.com>
9237 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9238 sets variable `multidir'; include that.
9239 (generated): Add it.
9240 ($(objpfx)$(multidir)/crti.o): New target.
9241 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9243 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9245 * tst-attr2.c (do_test): Add cast to avoid warning.
9246 * tst-mutex4.c (do_test): Likewise.
9248 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9250 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9253 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9255 * Makefile (tests): Add tst-detach1.
9256 * tst-detach1.c: New file.
9258 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9260 * sysdeps/pthread/pthread.h: Remove duplicate
9261 pthread_cleanup_{push,pop} definitions.
9263 * tst-barrier2.c: Eliminate warnings.
9264 * tst-cancel4.c: Likewise.
9265 * tst-cond4.c: Likewise.
9266 * tst-cond6.c: Likewise.
9267 * tst-detach1.c: Likewise.
9268 * tst-rwlock4.c: Likewise.
9269 * tst-rwlock6.c: Likewise.
9270 * tst-rwlock7.c: Likewise.
9271 * tst-sem3.c: Likewise.
9272 * tst-spin2.c: Likewise.
9273 * tst-umask1.c: Likewise.
9275 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9277 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9279 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9281 * descr.h (struct pthread): Move cancelhandling member to the front.
9283 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9285 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9286 malloc_parent, and malloc_child statically.
9287 (__register_atfork_malloc): New function.
9288 (free_mem): Don't free any of the malloc_* variables on the list.
9289 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9290 Define HAVE_register_atfork_malloc.
9292 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9294 * sysdeps/pthread/createthread.c (create_thread): Add some more
9295 comments explaining when to set multiple_threads and when not.
9297 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9298 THREAD_ATOMIC_BIT_SET if not already defined.
9299 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9300 THREAD_ATOMIC_BIT_SET:
9301 * sysdeps/x86_64/tls.h: Likewise.
9302 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9303 THREAD_ATOMIC_CMPXCHG_VAL.
9304 (_pthread_cleanup_pop_restore): Likewise.
9305 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9306 (__pthread_enable_asynccancel_2): Likewise.
9307 (__pthread_disable_asynccancel): Likewise.
9308 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9309 (__libc_disable_asynccancel): Likewise.
9310 * init.c (sigcancel_handler): Likewise.
9311 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9312 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9314 2003-04-03 Ulrich Drepper <drepper@redhat.com>
9316 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9317 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9318 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9319 * Makefile (tests): Add tst-cancel11.
9320 * tst-cancel11.c: New file.
9322 2003-04-01 Ulrich Drepper <drepper@redhat.com>
9324 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9325 round, not the first. Use specific_used flag instead of local
9326 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9327 (__free_tcb): Don't call deallocate_tsd here.
9328 (start_thread): Call deallocate_tsd here.
9329 * pthread_setspecific.c: Set specific_used flag really only when
9331 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9332 * tst-tsd3.c: New file.
9333 * tst-tsd4.c: New file.
9335 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9337 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9338 Use atomic_exchange_and_add instead of __lll_add.
9339 (__lll_mutex_timedlock): Likewise.
9340 Patch by Ian Wienand.
9342 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9344 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9345 (SINGLE_THREAD_P): Fix typo.
9346 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9348 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9350 * Makefile (tests): Add tst-align.
9351 * tst-align.c: New file.
9352 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9354 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9357 * tst-tsd2.c: Add casts to avoid warnings.
9359 2003-03-30 Ulrich Drepper <drepper@redhat.com>
9361 * descr.h (struct pthread): Move most often used elements to the front.
9363 2003-03-29 Ulrich Drepper <drepper@redhat.com>
9365 * Makefile (libpthread-routines): Add pthread_atfork.
9366 (libpthread-static-only-routines): Add pthread_atfork.
9368 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9370 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9372 (INSTALL_DTV): Add parens.
9373 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9374 Use passed descr instead of THREAD_SELF.
9375 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9376 (__lll_mutex_timedlock_wait): Correct expected value after
9378 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9379 Release lock before waking up the waiters.
9380 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9381 criteria. Reorderstruct passed to cleanup handler. Fix
9382 handling of cancellation and failung pthread_mutex_unlock call.
9383 Use __pthread_enable_asynccancel_2 instead of
9384 __pthread_enable_asynccancel.
9385 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9386 Return result of lock re-get if it fails.
9387 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9388 for __pthread_cleanup_push.
9389 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9390 completely broken rwlock implementation.
9391 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9392 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9393 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9394 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9395 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9396 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9397 versioned_symbol macro.
9398 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9399 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9401 2003-03-27 Ulrich Drepper <drepper@redhat.com>
9403 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9404 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9406 (struct timer): Remove th and bar field.
9407 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9408 debugging code. Create only one helper thread.
9409 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9411 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9412 Renamed. Define statically. Use thread info from siginfo.
9413 (__helper_once): New variable.
9414 (__helper_tid): New variable.
9415 (__reset_helper_control): New function.
9416 (__start_helper_thread): New function.
9418 * pthread_create.c (start_thread): Don't use setjmp inside
9419 __builtin_expect to work around gcc bug.
9421 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9422 timer_delete syscall fails, but not with ENOSYS, set
9425 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9426 (timer_settime): Fix typo.
9427 * sysdeps/unix/sysv/linux/timer_getoverr.c
9428 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9430 2003-03-27 Jakub Jelinek <jakub@redhat.com>
9432 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9433 offset of cleanupbuf.__prev.
9435 2003-03-26 Jakub Jelinek <jakub@redhat.com>
9437 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9440 2003-03-26 Ulrich Drepper <drepper@redhat.com>
9442 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9443 NULL provide default definition to syscall.
9445 2003-03-25 Roland McGrath <roland@redhat.com>
9447 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9448 (timer_id2ptr): Fix typo.
9450 2003-03-25 Ulrich Drepper <drepper@redhat.com>
9452 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9453 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9454 * sysdeps/ia64/pthreaddef.h: Likewise.
9455 * sysdeps/powerpc/pthreaddef.h: Likewise.
9456 * sysdeps/s390/pthreaddef.h: Likewise.
9457 * sysdeps/sh/pthreaddef.h: Likewise.
9458 * sysdeps/x86_64/pthreaddef.h: Likewise.
9459 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9460 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9462 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9463 SIGTIMER is not unblocked.
9464 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9466 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9468 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9469 pass pointer through as ID.
9470 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9471 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9472 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9473 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9474 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9475 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9476 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9477 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9478 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9479 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9480 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9481 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9482 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9483 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9484 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9485 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9486 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9487 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9488 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9489 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9490 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9491 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9492 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9493 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9494 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9495 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9496 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9497 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9498 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9499 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9500 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9501 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9502 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9504 * pthreadP.h: Remove FRAME_LEFT definition.
9505 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9506 already left frame. Programs which have this problem are not POSIX
9508 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9510 2003-03-24 Ulrich Drepper <drepper@redhat.com>
9512 * sysdeps/pthread/tst-timer.c: Check return values of the
9515 2003-03-23 Roland McGrath <roland@redhat.com>
9517 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9518 * tst-tls3mod.c: Likewise.
9519 * tst-tls1.c: Likewise.
9520 * tst-tls2.c: Likewise.
9522 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9525 * tst-join5.c (tf1, tf2): Add a cast.
9527 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9529 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9530 Don't test anything.
9531 * tst-cond4.c: Likewise.
9532 * tst-cond6.c: Likewise.
9533 * tst-flock2.c: Likewise.
9534 * tst-mutex4.c: Likewise.
9535 * tst-rwlock4.c: Likewise.
9536 * tst-signal1.c: Likewise.
9537 * tst-spin2.c: Likewise.
9538 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9540 * tst-mutex4.c: Use test-skeleton.c.
9541 * tst-spin2.c: Likewise.
9542 * tst-sysconf.c: Likewise.
9543 * tst-barrier2.c: Likewise.
9544 * tst-cond4.c: Likewise.
9545 * tst-cond6.c: Likewise.
9546 * tst-rwlock4.c: Likewise.
9547 * tst-unload.c: Likewise.
9548 * tst-flock2.c (do_test): Use return instead of exit.
9550 2003-03-22 Jakub Jelinek <jakub@redhat.com>
9552 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9554 2003-03-21 Ulrich Drepper <drepper@redhat.com>
9556 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9557 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9558 instead of __lll_compare_and_swap.
9559 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9561 Removed definition if __lll_compare_and_swap.
9563 * cancellation.c: Adjust for new form of compare&exchange macros.
9564 * cleanup_defer.c: Likewise.
9566 * libc-cancellation.c: Likewise.
9567 * old_pthread_cond_broadcast.c: Likewise.
9568 * old_pthread_cond_signal.c: Likewise.
9569 * old_pthread_cond_timedwait.c: Likewise.
9570 * old_pthread_cond_wait.c: Likewise.
9571 * pthread_cancel.c: Likewise.
9572 * pthread_create.c: Likewise.
9573 * pthread_detach.c: Likewise.
9574 * pthread_join.c: Likewise.
9575 * pthread_key_delete.c: Likewise.
9576 * pthread_setcancelstate.c: Likewise.
9577 * pthread_setcanceltype.c: Likewise.
9578 * pthread_timedjoin.c: Likewise.
9579 * pthread_tryjoin.c: Likewise.
9580 * sysdeps/pthread/createthread.c: Likewise.
9582 2003-03-20 Ulrich Drepper <drepper@redhat.com>
9584 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9585 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9586 definitions. Replace uses with calls to atomic_* functions.
9587 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9588 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9589 __lll_test_and_set calls with atomic_exchange_and_add and
9590 atomic_exchange calls respectively.
9591 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9592 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9593 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9594 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9595 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9596 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9597 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9599 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9600 returns the old value.
9602 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9604 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9605 int for variable OLDVAL and correct inline assembler contraint.
9606 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9607 type int for variable OLD.
9609 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9611 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9612 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9613 instead of multiple_threads field in the TCB.
9615 2003-03-19 Ulrich Drepper <drepper@redhat.com>
9617 * sysdeps/i386/i686/bits/atomic.h: Removed.
9618 * sysdeps/i386/i586/bits/atomic.h: Removed.
9619 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9620 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9621 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9622 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9623 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9624 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9625 * atomic.h: Removed. Moved to glibc.
9627 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9628 support for clock selection.
9630 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9633 2003-03-18 Roland McGrath <roland@redhat.com>
9635 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9636 Add __lll_rel_instr first. Add memory clobber.
9637 (lll_mutex_unlock): Use __lll_test_and_set.
9638 From Paul Mackerras <paulus@samba.org>.
9640 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9642 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9643 (SINGLE_THREAD_P): Add `header.' prefix.
9644 From Paul Mackerras <paulus@samba.org>.
9646 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9647 pthread_timedjoin_np to ...
9648 (libpthread: GLIBC_2.3.3): ... here.
9649 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9651 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9652 Avoid shadowing VAL variable.
9654 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9657 2003-03-18 Ulrich Drepper <drepper@redhat.com>
9659 * Makefile (tests): Add tst-cond11.
9660 * tst-cond11.c: New file.
9662 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9663 struct passed to cleanup handler to eliminate one more
9665 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9667 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9668 (pthrad_cond_t): Replace __unused field with __clock.
9670 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9671 waken all waiters in cleanup handler.
9672 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9673 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9675 * pthread_condattr_getclock.c: New file.
9676 * pthread_condattr_setclock.c: New file.
9677 * sysdeps/pthread/pthread.h: Declare these new functions.
9678 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9679 * Makefile (libpthread-routines): Add the new functions.
9680 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9681 Renamed field to value. Document use of the bits.
9682 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9684 * pthread_condattr_setpshared.c: Likewise.
9685 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9686 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9687 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9689 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9690 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9691 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9692 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9693 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9694 Implement clock selection.
9695 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9696 * pthread-errnos.sym: Add ENOSYS.
9697 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9698 _POSIX_CLOCK_SELECTION.
9699 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9701 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9702 invalid .size directive.
9704 2003-03-17 Roland McGrath <roland@redhat.com>
9706 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9709 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9711 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9712 Use __lll_add instead of spelling it out. Use protected symbol names.
9713 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9715 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9716 Renamed from lll_compare_and_swap. Use new name where necessary.
9717 (__lll_add): Defined.
9718 (__lll_dec_if_positive): Defined.
9719 (__lll_test_and_set): Defined.
9720 * sysdeps/ia64/pthread_spin_init.c: Removed.
9721 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9722 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9723 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9724 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9725 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9726 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9727 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9728 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9729 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9730 __sync_lock_release_si.
9731 Patch by Jakub Jelinek.
9733 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9734 Fix timeout handling.
9735 (__lll_timedwait_tid): Likewise.
9736 (lll_unlock_wake_cb): Wake up other waiters if necessary.
9737 Patch by Jakub Jelinek.
9739 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9741 2003-03-17 Roland McGrath <roland@redhat.com>
9743 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9744 * sysdeps/pthread/pthread_spin_init.c: New file.
9745 * sysdeps/pthread/pthread_spin_unlock.c: New file.
9746 * sysdeps/powerpc/Makefile: New file.
9747 * sysdeps/powerpc/pthread_spin_lock.c: New file.
9748 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9749 * sysdeps/powerpc/pthreaddef.h: New file.
9750 * sysdeps/powerpc/tcb-offsets.sym: New file.
9751 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9752 * sysdeps/powerpc/tls.h: New file.
9753 * sysdeps/powerpc/bits/atomic.h: New file.
9754 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9755 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9756 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9758 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9759 * sysdeps/unix/sysv/linux/sem_post.c: New file.
9760 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9761 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9762 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9763 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9764 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9765 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9766 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9767 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9768 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9769 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9770 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9771 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9772 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9774 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9776 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9777 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9778 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9779 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9780 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9782 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9784 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9785 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9786 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9787 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9788 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9790 2003-03-16 Roland McGrath <roland@redhat.com>
9792 * tst-fork4.c: Include <string.h>.
9793 * tst-signal2.c: Likewise.
9794 * tst-mutex5.c (do_test): exit -> return.
9795 * tst-mutex2.c: Include <stdlib.h>.
9797 2003-03-16 Ulrich Drepper <drepper@redhat.com>
9799 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9800 (__lll_mutex_timedlock_wait): Correct expected value after
9801 spurious wakeup. Otherwise we would never wait again.
9803 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9804 zone versus inline asm stupidity. Use correct instructions.
9806 * tst-rwlock6.c: Add some more status output.
9808 2003-03-15 Roland McGrath <roland@redhat.com>
9810 * sysdeps/pthread/configure.in: New file.
9811 * sysdeps/pthread/configure: New file (generated).
9813 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9815 * allocatestack.c (allocate_stack): Store the exact stack size of
9816 user allocated stacks.
9818 2003-03-15 Jakub Jelinek <jakub@redhat.com>
9820 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9821 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9822 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9823 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9824 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9825 Use `header.' prefix.
9826 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9828 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9830 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9831 __builtin_frame_address, use stack pointer.
9833 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9834 instead of __builtin_frame_pointer.
9836 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9838 * tst-basic1.c (do_test): Add cast to avoid warning.
9839 * tst-basic2.c (do_test): Likewise.
9841 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9842 amount of stack correction.
9844 * tst-fork4.c: Use test-skeleton.c.
9846 2003-03-14 Roland McGrath <roland@redhat.com>
9848 * init.c: Fix typo "#eli" for "#else".
9850 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9852 * allocatestack.c (__stack_user): Use hidden_data_def.
9853 * pthread_create.c (__pthread_keys): Likewise.
9855 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9857 2003-03-14 Roland McGrath <roland@redhat.com>
9859 * tst-fork4.c: New file.
9860 * Makefile (tests): Add it.
9862 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9863 we always define the padding space.
9864 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9865 stopped supporting its own extensions fully.
9866 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9867 struct also called `header', so `header.multiple_threads' is the field
9868 name to use on all machines.
9869 * allocatestack.c (allocate_stack): Use `header.' prefix.
9870 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9871 * pthread_create.c (__pthread_create_2_1): Likewise.
9872 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9873 (THREAD_SELF): Likewise.
9874 * sysdeps/x86_64/tls.h: Likewise.
9875 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9876 (SINGLE_THREAD_P): Likewise.
9877 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9878 (SINGLE_THREAD_P): Likewise.
9879 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9880 (SINGLE_THREAD_P): Likewise.
9882 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9885 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9887 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9888 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9890 * pthread_create.c (start_thread): setjmp is expected to return 0.
9892 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9893 (THREAD_GETMEM_NC): Likewise.
9895 2003-03-13 Ulrich Drepper <drepper@redhat.com>
9897 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9898 and the size of the stack which must be allocated is a multiple,
9899 allocate one more page.
9900 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9901 MULTI_PAGE_ALIASING.
9903 2003-03-13 Roland McGrath <roland@redhat.com>
9905 * pthread_create.c (start_thread): Set EXITING_BIT after the
9906 event-reporting (and destructors), not before.
9908 2003-03-13 Jakub Jelinek <jakub@redhat.com>
9910 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9911 lll_futex_wake): Declare register variables as long int instead of
9912 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9913 Make syscall arguments clobbered by the syscall.
9914 (lll_futex_wait): Define using lll_futex_timed_wait.
9916 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9919 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9922 * allocatestack.c (nptl_ncreated): Only declare if
9923 COLORING_INCREMENT != 0.
9925 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9926 (__libc_enable_asynccancel_2): Remove prototype.
9928 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9929 ctid to match kernel.
9931 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9933 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9934 libc_multiple_threads.
9935 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9936 __libc_multiple_threads to...
9937 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
9939 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9941 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9942 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9944 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9945 (__pthread_once_internal): Define.
9947 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9948 macros instead of .symver directly.
9949 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9950 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9952 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9953 * sysdeps/x86_64/tcb-offsets.sym: New file.
9954 * sysdeps/x86_64/Makefile: New file.
9956 * sysdeps/i386/tcb-offsets.sym: Add SELF.
9957 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9958 to access own pthread_t in TCB.
9959 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9961 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9963 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9965 2003-03-12 Roland McGrath <roland@redhat.com>
9967 * pthread-errnos.sym: New file.
9968 * Makefile (gen-as-const-headers): New variable, list that file.
9969 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9970 header <pthread-errnos.h> instead of defining errno values here.
9971 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9972 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9973 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9974 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9975 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9977 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9979 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9980 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9981 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9982 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9983 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9984 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9985 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9986 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9987 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9988 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9989 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9990 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9991 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9992 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9993 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9994 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9995 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9996 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9997 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9998 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9999 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10000 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10001 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10002 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10003 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10004 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10005 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10007 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10008 CLONE_CHILD_SETTID worked.
10010 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10012 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10014 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10017 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10018 (pthread_cond_t): Add padding.
10020 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10021 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10022 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10024 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10025 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10026 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10027 (__pthread_rwlock_timedrdlock): Likewise.
10028 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10029 (__pthread_rwlock_wrlock): Likewise.
10030 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10031 (__pthread_rwlock_rdlock): Likewise.
10033 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10035 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10036 result of lock re-get if it fails.
10038 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10040 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10041 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10042 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10043 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10044 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10045 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10046 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10047 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10048 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10049 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10051 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10052 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10054 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10055 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10056 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10057 (create_thread): Likewise.
10058 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10059 * init.c (__pthread_initialize_minimal_internal): Initialize
10060 __libc_multiple_threads_ptr if necessary.
10061 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
10062 __pthread_multiple_threads and __libc_multiple_threads_ptr.
10063 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10064 __libc_multiple_threads.
10065 (__libc_pthread_init): Return pointer to __libc_pthread_init if
10068 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10069 (THREAD_SETMEM_NC): Likewise.
10071 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10072 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10073 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10074 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10076 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10077 Eliminate one entire instruction.
10079 * cancellation.c (__pthread_enable_asynccancel_2): New function.
10080 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10081 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10082 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10083 instead of __pthread_enable_asynccancel.
10084 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10085 (__pthread_cond_wait): Likewise.
10086 * sysdeps/pthread/pthread_cond_timedwait.c
10087 (__pthread_cond_timedwait): Likewise.
10088 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10090 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10091 (__condvar_cleanup): Wake up all waiters in case we got signaled
10092 after being woken up but before disabling asynchronous
10094 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10095 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10096 (__condvar_cleanup): Likewise.
10098 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10099 Make it an error if architecture has no #if case. Add x86-64.
10101 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10102 pt-initfini.s generation.
10104 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10105 (TLS_INIT_TP): Fix typo.
10107 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10109 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10110 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10112 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10113 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10114 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10115 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10116 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10117 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10118 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10119 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10121 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10123 * sysdeps/pthread/pthread_cond_timedwait.c
10124 (__pthread_cond_timedwait): Return the result of the final
10125 locking. If it succeeds, the regular function return value.
10127 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10128 Return result of the final locking.
10129 * version.c (__nptl_main): Work around problems with the strange
10130 INTERNAL_SYSCALL macro on ppc32.
10131 * init.c (__pthread_initialize_minimal_internal): Unblock
10132 SIGCANCEL in case the parent blocked it.
10133 Reported by Paul Mackerras <paulus@samba.org>.
10135 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10136 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10137 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10139 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10141 * sysdeps/pthread/pthread_cond_timedwait.c
10142 (__pthread_cond_timedwait): Unlock and fail if
10143 __pthread_mutex_unlock_internal failed.
10145 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10146 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10148 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10149 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10150 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10151 ALLOCATE_STACK): New macros.
10152 (TLS_TPADJ): New macro.
10153 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10154 (allocate_stack): Handle TLS_DTV_AT_TP and
10155 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10156 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10157 Don't set PD->self.
10158 * init.c [__ia64__] (__NR_set_tid_address): Define.
10160 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10161 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10162 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10163 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10164 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10165 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10166 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10167 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10168 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10169 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10170 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10171 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10172 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10173 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10174 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10175 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10176 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10177 * sysdeps/ia64/bits/atomic.h: New file.
10178 * sysdeps/ia64/Makefile: New file.
10179 * sysdeps/ia64/pthread_spin_init.c: New file.
10180 * sysdeps/ia64/pthread_spin_lock.c: New file.
10181 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10182 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10183 * sysdeps/ia64/pthreaddef.h: New file.
10184 * sysdeps/ia64/tcb-offsets.sym: New file.
10185 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10186 * sysdeps/ia64/tls.h: New file.
10188 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10189 to syscall instead of no arguments.
10191 2003-03-10 Ulrich Drepper <drepper@redhat.com>
10193 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10194 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10195 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10196 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10198 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10201 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10203 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10204 lowlevelbarrier.sym.
10205 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10206 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10207 Include lowlevelbarrier.h and don't define offsets locally.
10208 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10210 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10211 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10212 (__lll_mutex_timedlock_wait): Likewise.
10213 (lll_mutex_lock): Adjust asm for that.
10214 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10215 (lll_lock): Adjust asm for operand order change.
10216 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10217 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10219 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10220 Reverse order of parameters.
10221 (__lll_timedwait_tid): Remove regparms attribute.
10222 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10223 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10225 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10226 (__lll_timedwait_tid): Remove one unnecessary instruction.
10228 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10229 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10230 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10233 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10234 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10236 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10239 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10240 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10242 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10243 define LOCK here (if UP is not defined). The actual code is in
10246 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10247 LOCK is already defined. Don't define lll_unlock_wake_cb and
10248 __lll_timedwait_tid for libc.so.
10249 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10250 define LOCK here (if UP is not defined). The actual code is in
10253 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10254 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10255 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10256 instead of lowlevelsem.h.
10257 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10258 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10259 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10261 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10262 lowlevelrwlock.sym.
10263 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10264 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10265 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10267 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10269 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10270 last changed. D'oh.
10272 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10274 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10275 of __libc_locking_needed.
10276 (lll_trylock): Initialize %eax to zero.
10278 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10279 pthread_cond_t definition.
10281 2003-03-10 Roland McGrath <roland@redhat.com>
10283 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10284 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10285 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10286 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10287 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10289 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10290 Instead of setting PD->multiple_threads, set globals
10291 __pthread_multiple_threads and __libc_multiple_threads.
10292 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10293 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10294 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10296 * descr.h (struct pthread): Conditionalize first member on
10297 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10298 containing an anonymous tcbhead_t. Move `list' member out.
10299 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10300 * allocatestack.c: Remove use of `header.data.' prefix.
10301 * pthread_create.c: Likewise.
10302 * init.c (__pthread_initialize_minimal_internal): Likewise.
10303 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10304 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10305 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10306 * sysdeps/x86_64/tls.h: Likewise.
10307 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10308 (SINGLE_THREAD_P): Likewise.
10309 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10310 (SINGLE_THREAD_P): Likewise.
10311 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10312 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10314 2003-03-09 Ulrich Drepper <drepper@redhat.com>
10316 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10318 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10319 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10321 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10322 leftovers from the ia32 code.
10324 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10326 (clear_once_control): Don't load %esi.
10328 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10331 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10333 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10334 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10336 * Makefile (tests): Add tst-cond10.
10337 * tst-cond10.c: New file.
10339 2003-03-08 Ulrich Drepper <drepper@redhat.com>
10341 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10342 * tst-signal3.c (do_test): Likewise.
10343 * tst-sem5.c (do_test): Likewise.
10344 * tst-kill6.c (do_test): Likewise.
10345 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10347 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10349 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10350 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10351 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10352 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10353 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10354 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10355 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10357 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10359 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10360 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10361 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10362 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10363 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10364 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10365 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10366 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10368 * allocatestack.c (allocate_stack): If mprotect() fails free the
10371 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10373 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10375 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10376 lll_wake_tid. This was used only to work around kernel limits in
10378 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10379 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10380 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10381 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10383 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10384 (__pthread_initialize_minimal_internal): Change initialization of
10385 __static_tls_align_m1 appropriately.
10386 * pthreadP.h (__static_tls_align_m1): Renamed from
10387 __static_tls_align.
10388 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10389 instead of __static_tls_align-1.
10391 2003-03-04 Ulrich Drepper <drepper@redhat.com>
10393 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10395 * pthread_create.c: Define __pthread_keys using nocommon
10396 attribute, not by placing it explicitly in bss.
10397 Remove DEFINE_DEALLOC definition. Not needed anymore.
10399 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10400 Use it in mmap call to allocate stacks.
10402 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10404 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10405 result of the thread function.
10407 2003-03-03 Ulrich Drepper <drepper@redhat.com>
10409 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10410 version is just fine.
10412 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10413 (__pthread_child_handler): Renamed from pthread_child_handler,
10414 exported, and marked hidden. Change all users.
10415 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10416 free __pthread_child_handler from child list.
10418 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10420 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10422 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10423 Fix handling of cancellation and failing pthread_mutex_unlock call.
10424 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10425 (__pthread_cond_wait): Likewise.
10427 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10428 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10429 lll_futex_timed_wait call.
10430 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10431 (pthread_rwlock_timedwrlock): Likewise.
10433 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10434 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10435 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10437 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10438 check of lll_futex_wake return value.
10440 2003-03-03 Roland McGrath <roland@redhat.com>
10442 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10444 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10445 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10446 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10448 2003-03-02 Ulrich Drepper <drepper@redhat.com>
10450 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10451 error for CPU clocks.
10453 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10454 _POSIX_MONOTONIC_CLOCK.
10455 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10457 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10460 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10462 * descr.h (struct pthread): Move cleanup field to the front.
10464 2003-03-01 Roland McGrath <roland@redhat.com>
10466 * sem_open.c (sem_open): Braino fix.
10468 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10470 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10471 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10472 __pthread_cleanup_pop functionality.
10473 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10475 * descr.h (struct pthread): Move tid field to the front now that
10478 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10479 (__lll_mutex_timedlock_wait): Remove.
10480 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10481 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10482 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10483 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10484 (lll_unlock_wake_cb): Don't save and restore %esi.
10485 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10487 (__lll_timedwait_tid): Add alignment.
10488 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10489 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10491 (__lll_timedwait_tid): Removed.
10492 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10493 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10494 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10495 (pthread_barrier_wait): Don't save, load, and restore %esi for
10497 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10498 (__pthread_cond_signal): Don't save, load, and restore %esi.
10499 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10500 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10501 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10502 Don't save, load, and restore %esi.
10504 2003-02-27 Ulrich Drepper <drepper@redhat.com>
10506 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10507 Release lock before waking up the waiters.
10509 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10511 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10512 (reader_thread): Likewise.
10514 * sysdeps/pthread/pthread_rwlock_unlock.c
10515 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10516 to wake up readers if there are none.
10518 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10519 Release internal lock before wake threads.
10521 2003-02-26 Ulrich Drepper <drepper@redhat.com>
10523 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10524 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10526 * tst-rwlock9.c: Likewise.
10527 * tst-rwlock10.c: New file.
10528 * tst-rwlock11.c: New file.
10530 * Makefile (tests): Add tst-dlsym1.
10531 * tst-dlsym1.c: New file.
10533 * init.c (__pthread_initialize_minimal_internal): Set
10534 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10535 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10537 2003-02-24 Ulrich Drepper <drepper@redhat.com>
10539 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10541 * tst-cond2.c: Fix sychronization with child.
10543 * tst-rwlock8.c (reader_thread): Remove unused variable.
10545 * Makefile: Add rules to build and run tst-tls3.
10546 * tst-tls3.c: New file.
10547 * tst-tls3mod.c: New file.
10549 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10550 * tst-rwlock8.c: New file.
10551 * tst-rwlock9.c: New file.
10552 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10553 complete broken rwlock implementation.
10554 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10556 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10558 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10559 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10560 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10561 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10562 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10563 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10564 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10566 2003-02-23 Roland McGrath <roland@redhat.com>
10568 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10570 2003-02-23 Ulrich Drepper <drepper@redhat.com>
10572 * Makefile (tests): Add tst-context1.
10573 * tst-context1.c: New file.
10575 * Makefile (tests): Add tst-tls1 and tst-tls2.
10576 * tst-tls1.c: New file.
10577 * tst-tls2.c: New file.
10579 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10580 for failed cmpxchg.
10582 * pthread_create.c (start_thread): Set EXITING_BIT early.
10584 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10585 (THREAD_GETMEM_NC): Likewise.
10587 2003-02-22 Ulrich Drepper <drepper@redhat.com>
10589 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10590 off 3 more bytes by using offset-less instructions when possible.
10592 * Makefile: Add dependency for $(objpfx)version.d.
10594 * eintr.c (eintr_source): Add unnecessary return but the compiler
10597 * tst-kill3.c: Include <unistd.h>.
10599 2003-02-21 Roland McGrath <roland@redhat.com>
10601 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10603 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10605 * Makefile (tests): Add tst-eintr1.
10606 (distribute): Add eintr.c.
10607 * tst-eintr1.c: New file.
10608 * eintr.c: New file.
10610 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10612 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10613 Disallow sending SIGCANCEL.
10615 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
10616 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10617 * tst-kill1.c: New file.
10618 * tst-kill2.c: New file.
10619 * tst-kill3.c: New file.
10620 * tst-kill5.c: New file.
10621 * tst-kill6.c: New file.
10622 * tst-basic7.c: Renamed to...
10623 * tst-kill4.c: ...this.
10625 2003-02-21 Roland McGrath <roland@redhat.com>
10627 * Makefile (install-lib-ldscripts): New variable.
10629 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10631 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10632 * pthread_cancel.c: Use INVALID_TD_P.
10633 * pthread_detach.c: Likewise.
10634 * pthread_getschedparam.c: Likewise.
10635 * pthread_setschedparam.c: Likewise.
10636 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10637 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10638 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10639 * pthread_timedjoin.c: Likewise.
10641 * tst-basic7.c: Include <signal.h>.
10643 * pthread_join.c (pthread_join): Limited checking for invalid
10645 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10647 2003-02-20 Ulrich Drepper <drepper@redhat.com>
10649 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10650 beginning of the loop. Clear the entire first block of TSD.
10651 * Makefile (tests): Add tst-key4.
10652 * tst-key4.c: New file.
10654 2003-02-18 Ulrich Drepper <drepper@redhat.com>
10656 * Makefile (tests): Add tst-basic7.
10657 * tst-basic7.c: New file.
10659 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10660 Add some more __builtin_expect.
10662 * pthreadP.h: Define dummy version of DEBUGGING_P.
10664 2003-02-17 Ulrich Drepper <drepper@redhat.com>
10666 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10667 _POSIX_THREAD_PRIORITY_SCHEDULING.
10668 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10669 _XOPEN_REALTIME_THREADS.
10670 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10672 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10673 kernel returns EINVAL for PID <= 0, work around it.
10675 * Makefile (tests): Add tst-signal5.
10676 * tst-signal5.c: New file.
10678 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10679 and LOGIN_NAME_MAX.
10681 * tst-cancel1.c (tf): Block all signals.
10683 * Makefile (tests): Add tst-basic6.
10684 * tst-basic6.c: New file.
10686 * tst-basic1.c: Add test for process ID.
10688 * Makefile (tests): Add tst-cancel10.
10689 * tst-cancel10.c: New file.
10691 * Makefile (tests): Add tst-signal4.
10692 * tst-signal4.c: New file.
10694 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10695 __sigismember instead of sigismember. Add __builtin_expect.
10697 2003-02-16 Ulrich Drepper <drepper@redhat.com>
10699 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10700 pthread_setcancelstate, and pthread_rwlock_setpshared.
10702 * tst-cancel7.c (do_test): Make sure the pid file exists before
10703 canceling the thread.
10705 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10706 pthread_rwlock_timedrdlock tests.
10707 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10708 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10709 Check for invalid tv_nsec field.
10710 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10713 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10714 recursive mutex of overflow.
10716 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10718 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10719 going into an endless loop.
10720 * Makefile (tests): Add tst-cancel9.
10721 * tst-cancel9.c: New file.
10723 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10725 2003-02-15 Ulrich Drepper <drepper@redhat.com>
10727 * tst-mutex5.c (do_test): Add more timedlock tests.
10729 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10730 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10732 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10733 use INLINE_SYSCALL. Error number is returned, not -1.
10735 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10736 and __deallocate_stack with internal_function.
10737 * pthread_create.c: Adjust definitions appropriately.
10738 * allocatestack.c: Likewise.
10740 * pthread_join.c: Add one more __builtin_expect.
10741 * pthread_timedjoin.c: Likewise.
10743 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10744 not data of sequence number does not match.
10745 Add one __builtin_expect.
10747 * Makefile (tests): Add tst-clock1.
10748 * tst-clock1.c: New file.
10750 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10751 negative arguments.
10752 * Makefile (tests): Add tst-basic5.
10753 * tst-basic5.c: New file.
10755 2003-02-14 Ulrich Drepper <drepper@redhat.com>
10757 * Makefile (tests): Add tst-basic4.
10758 * tst-basic4.c: New file.
10760 * pthreadP.h: Add declaraction for __nptl_nthreads.
10761 * pthread_create.c: Define __nptl_nthreads
10762 (start_thread): Increment __nptl_nthreads at beginning. Decrement
10763 after thread is done. If then zero, call exit(0).
10764 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10765 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
10766 * init.c (pthread_functions): Initialize ptr_nthreads.
10767 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10768 (__reclaim_stacks): Decrement __nptl_nthreads.
10769 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10771 * Makefile (tests): Add tst-basic3.
10772 * tst-basic3.c: New file.
10774 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
10775 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
10776 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10777 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
10778 if asynchronous canceling is enabled.
10779 * pthread_join.c (pthread_join): When recognizing circular joins,
10780 take into account the other thread might be already canceled.
10781 * Makefile (tests): Add tst-join5.
10782 * tst-join5.c: New file.
10784 * Makefile (tests): Add tst-join4.
10785 * tst-join4.c: New file.
10787 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10789 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10791 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
10793 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10794 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10795 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10797 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10799 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10800 error if lll_futex_wake failed.
10802 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10804 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10805 handling of cancellation and failung pthread_mutex_unlock call.
10806 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10807 * Makefile (tests): Add tst-cond8 and tst-cond9.
10808 * tst-cond8.c: New file.
10809 * tst-cond9.c: New file.
10811 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10813 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10814 non-standard initializers with __USE_GNU.
10816 * Makefile (tests): Add tst-cleanup3.
10817 * tst-cleanup3.c: New file.
10819 2003-02-12 Ulrich Drepper <drepper@redhat.com>
10821 * Makefile (tests): Add tst-attr1 and tst-attr2.
10822 * tst-attr1.c: New file.
10823 * tst-attr2.c: New file.
10825 * Makefile: Add rules to build and run tst-atfork2 test.
10826 * tst-atfork2.c: New file.
10827 * tst-atfork2mod.c: New file.
10829 * sysdeps/unix/sysv/linux/unregister-atfork.c
10830 (__unregister_atfork): Free the memory allocated for the handlers
10831 after removing them from the lists.
10833 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10836 * tst-atfork1.c (do_test): Wait for the child we forked.
10837 Report error in child.
10839 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10841 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10843 2003-02-10 Ulrich Drepper <drepper@redhat.com>
10845 * Makefile (tests): Add tst-cancel8.
10846 * tst-cancel8.c: New file.
10848 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10849 clearing of control variable.
10850 * Makefile (tests): Add tst-once3 and tst-once4.
10851 * tst-once3.c: New file.
10852 * tst-once4.c: New file.
10854 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10856 * sysdeps/sh/Makefile: New file.
10857 * sysdeps/sh/bits/atomic.h: New file.
10858 * sysdeps/sh/pthread_spin_init.c: New file.
10859 * sysdeps/sh/pthread_spin_lock.c: New file.
10860 * sysdeps/sh/pthread_spin_trylock.S: New file.
10861 * sysdeps/sh/pthread_spin_unlock.S: New file.
10862 * sysdeps/sh/pthreaddef.h: New file.
10863 * sysdeps/sh/tcb-offsets.sym: New file.
10864 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10865 * sysdeps/sh/tls.h: New file.
10866 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10867 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10868 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10869 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10870 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10871 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10872 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10873 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10874 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10875 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10876 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10877 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10878 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10879 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10880 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10881 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10882 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10883 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10884 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10885 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10886 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10887 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10888 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10889 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10890 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10891 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10892 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10893 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10894 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10895 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10897 2003-02-08 Ulrich Drepper <drepper@redhat.com>
10899 * tst-cond2.c: Rearrange code to not rely on behavior undefined
10900 according to POSIX.
10902 * tst-basic2.c (do_test): Lock mutex before creating the thread.
10904 2003-02-07 Ulrich Drepper <drepper@redhat.com>
10906 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10907 (TLS_GET_FS): New #define.
10908 (TLS_SET_FS): New #define.
10909 Correct value of __NR_set_thread_area.
10911 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10913 2003-02-06 Ulrich Drepper <drepper@redhat.com>
10915 * Makefile (tests): Add tst-popen1.
10916 * tst-popen1.c: New file.
10918 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10919 but inactive generalization.
10920 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10921 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10922 Minor optimization, remove one instruction.
10923 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10925 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
10927 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10929 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
10931 * init.c (__NR_set_tid_address): Add #ifdef for s390.
10932 * sysdeps/pthread/pthread_barrier_wait.c: New file.
10933 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10934 * sysdeps/pthread/pthread_cond_signal.c: New file.
10935 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10936 * sysdeps/pthread/pthread_cond_wait.c: New file.
10937 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10938 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10939 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10940 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10941 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10942 * sysdeps/s390/Makefile: New file.
10943 * sysdeps/s390/bits/atomic.h: New file.
10944 * sysdeps/s390/pthread_spin_init.c: New file.
10945 * sysdeps/s390/pthread_spin_lock.c: New file.
10946 * sysdeps/s390/pthread_spin_trylock.c: New file.
10947 * sysdeps/s390/pthread_spin_unlock.c: New file.
10948 * sysdeps/s390/pthreaddef.h: New file.
10949 * sysdeps/s390/tcb-offsets.sym: New file.
10950 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10951 * sysdeps/s390/tls.h: New file.
10952 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10953 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10954 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10955 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10956 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10957 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10958 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10959 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10960 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10961 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10962 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10963 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10964 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10965 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10966 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10967 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10968 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10969 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10970 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10971 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10972 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10973 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10974 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10976 2003-02-04 Ulrich Drepper <drepper@redhat.com>
10978 * atomic.h: Add a couple more default implementations.
10979 (atomic_compare_and_exchange_acq): Use
10980 __arch_compare_and_exchange_32_acq in return value definition. It
10982 (atomic_bit_set): Renamed from atomic_set_bit.
10983 Add missing atomic_ prefixes.
10985 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10986 thread library is available, use correct value to mark initialized
10989 2003-02-03 Ulrich Drepper <drepper@redhat.com>
10991 * allocatestack.c (allocate_stack): Use __getpagesize instead of
10992 __sysconf to determine pagesize.
10994 * pthread_create.c: Include <atomic.h>.
10995 * allocatestack.c (allocate_stack): Implement coloring of the
10996 allocated stack memory. Rename pagesize to pagesize_m1. It's the
10997 size minus one. Adjust users.
10998 * sysdeps/i386/i686/Makefile: New file.
11000 2003-02-02 Ulrich Drepper <drepper@redhat.com>
11002 * allocatestack.c: Improve comment throughout the file.
11004 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11005 (__lll_lock_wait): Add branch prediction.
11006 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11007 (__lll_lock_wait): Likewise.
11008 (lll_unlock_wake_cb): Removed.
11010 2003-01-31 Ulrich Drepper <drepper@redhat.com>
11012 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11013 _POSIX_THREAD_PRIORITY_SCHEDULING.
11015 2003-01-30 Jakub Jelinek <jakub@redhat.com>
11017 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11018 Fix return type of ptr___pthread_getspecific.
11020 2003-01-29 Ulrich Drepper <drepper@redhat.com>
11022 * Makefile (tests): Add tst-umask1.
11023 (tst-umask1-ARGS): Define.
11024 * tst-umask1.c: New file.
11026 2003-01-28 Ulrich Drepper <drepper@redhat.com>
11028 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
11029 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11030 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11031 pthread_rwlock_unlock.
11032 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11033 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11034 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11035 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11036 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11038 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11039 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11041 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11042 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11043 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11045 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11046 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11048 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11049 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11050 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11052 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11053 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11055 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11057 * Makefile (libpthread-routines): Remove lowlevelcond and
11058 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11059 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11060 and pthread_cond_broadcast.
11061 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11062 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11063 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11064 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11065 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11066 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11067 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11068 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11069 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11070 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11071 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11072 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11073 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11074 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11075 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11076 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11077 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11078 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11079 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11080 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11081 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11082 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11083 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11084 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11085 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11086 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11087 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11088 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11089 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11090 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11091 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11093 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11094 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11095 of the code is moved to ...
11096 * sysdeps/pthread/createthread.c: ...here. New file.
11098 2003-01-27 Ulrich Drepper <drepper@redhat.com>
11100 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11101 (__new_sem_post): Clear %eax before returning.
11102 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11104 * Makefile (tests): Add tst-cleanup2.
11105 * tst-cleanup2.c: New file.
11107 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11108 Interpret first parameter correctly.
11110 2003-01-17 Ulrich Drepper <drepper@redhat.com>
11112 * Makefile (headers): Add bits/semaphore.h.
11114 2003-01-16 Jakub Jelinek <jakub@redhat.com>
11116 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11119 2003-01-14 Ulrich Drepper <drepper@redhat.com>
11121 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11122 must be used and mapping failed.
11123 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11125 * Makefile (CFLAGS-pthread_self.os): Define this, not
11126 CFLAGS-pthread_self.c.
11128 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11130 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11131 lll_unlock_wake_cb.
11133 * Makefile (libpthread-routines): Add version. Add rules to build
11134 version.os and banner.h.
11135 * version.c: New file.
11137 2003-01-13 Jakub Jelinek <jakub@redhat.com>
11139 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11140 the alias unconditional.
11141 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11143 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11145 * Makefile (CFLAGS-pthread_self.c): New definition.
11147 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11149 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11150 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11151 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11152 * init.c (__pthread_initialize_minimal_internal): Likewise.
11154 2003-01-07 Jakub Jelinek <jakub@redhat.com>
11156 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11158 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11159 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11160 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11161 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11162 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11163 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11165 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11167 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11168 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11169 * tst-cancel-wrappers.sh: Remove all exceptions.
11171 2003-01-05 Ulrich Drepper <drepper@redhat.com>
11173 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11174 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11176 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11177 Use __libc_pthread_functions array if SHARED.
11179 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11180 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11182 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11183 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11184 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11185 __libc_ptf_call instead of __libc_maybe_call.
11186 (PTF): New #define.
11187 (__libc_cleanup_region_start): Wrap function name with PTF call.
11188 (__libc_cleanup_region_end): Likewise.
11189 (__libc_cleanup_end): Likewise.
11191 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11192 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11193 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11194 * pthreadP.h: Add prototypes.
11196 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11197 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11198 __pthread_rwlock_unlock aliases.
11199 * pthreadP.h: Add prototypes for new aliases.
11201 * pthreadP.h (struct pthead_functions): Moved to...
11202 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11203 * init.c (pthread_functions): Add initializers for new elements.
11205 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11206 __pthread_cleanup_pop_restore aliases.
11207 * pthreadP.h: Add prototypes.
11209 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11210 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11211 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11212 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11213 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11214 * pthreadP.h: Adjust prototypes and callers.
11216 2003-01-04 Ulrich Drepper <drepper@redhat.com>
11218 * Makefile (tests): Add tst-cancel7.
11219 (tst-cancel7-ARGS): New variable.
11220 * tst-cancel7.c: New file.
11222 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11223 around gcc defficiencies.
11224 * old_pthread_cond_signal.c: Likewise.
11225 * old_pthread_cond_timedwait.c: Likewise.
11226 * old_pthread_cond_wait.c: Likewise.
11228 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11230 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11232 * Makefile (tests): Add tst-cond7.
11233 * tst-cond7.c: New file.
11235 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11236 (condvar_cleanup): Get condvar address from the right place.
11238 * atomic.h: Correct definitions of atomic_full_barrier,
11239 atomic_read_barrier, atomic_write_barrier.
11241 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11243 * old_pthread_cond_signal.c: Likewise.
11244 * old_pthread_cond_timedwait.c: Likewise.
11245 * old_pthread_cond_wait.c: Likewise.
11247 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11249 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11251 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11253 * pthreadP.h (pthread_cond_2_0_t): New type.
11254 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11255 Use new type for the 2.0 condvar function prototypes.
11256 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11257 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11259 * old_pthread_cond_destroy.c: Likewise.
11260 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11261 * old_pthread_cond_signal.c: Likewise.
11262 * old_pthread_cond_timedwait.c: Likewise.
11263 * old_pthread_cond_wait.c: Likewise.
11265 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11266 (__pthread_cond_wait): Don't save cancellation mode and seq value
11269 * herrno.c (__h_errno_location): Don't define as weak.
11271 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11273 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11274 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11275 and pthread_cond_wait.
11276 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11278 (__pthread_cond_broadcast_2_0): ... this.
11279 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11281 (__pthread_cond_destroy_2_0): ... this.
11282 * old_pthread_cond_init.c (__old_pthread_cond_init):
11284 (__pthread_cond_init_2_0): ... this.
11285 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11287 (__pthread_cond_signal_2_0): ... this.
11288 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11290 (__pthread_cond_wait_2_0): ... this.
11291 * pthread_cond_destroy.c: Include shlib-compat.h.
11292 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11293 * pthread_cond_init.c: Include shlib-compat.h.
11294 (pthread_cond_init): Change strong_alias into versioned_symbol.
11295 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11296 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11298 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11299 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11300 __pthread_cond_wait_2_0): New prototypes.
11301 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11302 __old_pthread_cond_init, __old_pthread_cond_signal,
11303 __old_pthread_cond_wait): Removed.
11304 * init.c: Include shlib-compat.h.
11305 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11306 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11307 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11308 ptr___pthread_cond_*_2_0 fields.
11309 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11310 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11312 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11313 LIBC_SIGACTION was not yet defined.
11314 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11315 [!defined LIBC_SIGACTION] (__sigaction): New function and
11317 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11318 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11320 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11322 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11324 2003-01-02 Ulrich Drepper <drepper@redhat.com>
11326 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11327 New, larger type definition.
11328 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11330 * Versions [libpthread]: Add definitions for new pthread_cond_*
11331 interfaces for version GLIBC_2.3.2.
11332 * pthread_cond_init.c: Update initialization for new type definition.
11333 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11334 pthread_cond_timedwait, pthread_cond_signal, and
11335 pthread_cond_broadcast. Add old_pthread_cond_init,
11336 old_pthread_cond_destroy, old_pthread_cond_wait,
11337 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11338 old_pthread_cond_broadcast.
11339 * old_pthread_cond_broadcast.c: New file.
11340 * old_pthread_cond_destroy.c: New file.
11341 * old_pthread_cond_init.c: New file.
11342 * old_pthread_cond_signal.c: New file.
11343 * old_pthread_cond_timedwait.c: New file.
11344 * old_pthread_cond_wait.c: New file.
11345 * pthreadP.h: Add prototypes for the compatibility interfaces.
11347 * pthread_cond_destroy.c: Don't include <errno.h>.
11349 2003-01-01 Ulrich Drepper <drepper@redhat.com>
11351 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11352 unnecessary zero offset when addressing MUTEX.
11354 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11356 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11358 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11359 for __register_atfork.
11361 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11363 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11364 instead of ASSEMBLER test macro.
11366 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11367 __libc_current_sigrtmax): Add libc_hidden_def.
11369 * sysdeps/pthread/list.h: Remove assert.h include.
11371 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11373 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11374 __pthread_initialize_minimal_internal not
11375 __pthread_initialize_minimal.
11377 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11379 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11380 __pthread_initialize_minimal as hidden.
11382 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11385 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11387 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11388 $(common-objpfx)format.lds, include that into the output script.
11390 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11392 2002-12-28 Andreas Jaeger <aj@suse.de>
11394 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11395 nsec resolution changes.
11396 (xstat64_conv): Likewise.
11397 (xstat32_conv): Likewise.
11398 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11399 struct kernel_stat.
11400 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11401 structs stat and stat64.
11402 * time/time.h (__timespec_defined): Define for __USE_MISC.
11403 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11405 2002-12-30 Jakub Jelinek <jakub@redhat.com>
11407 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11409 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11410 (pthread_exit): Use strong_alias to avoid warnings.
11411 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11412 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11413 ptr___pthread_attr_init_2_*.
11414 * init.c (pthread_functions): Adjust.
11416 2002-12-29 Ulrich Drepper <drepper@redhat.com>
11418 * forward.c: Make all functions available by default again. It
11419 caused too much trouble.
11421 * pt-siglongjmp.c: Removed.
11423 2002-12-28 Jakub Jelinek <jakub@redhat.com>
11425 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11426 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11427 * sysdeps/i386/Makefile: New file.
11428 * sysdeps/i386/tcb-offsets.sym: New file.
11429 * sysdeps/pthread/tcb-offsets.h: New file.
11430 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11431 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11433 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11434 __register_atfork...
11435 (GLIBC_2.3.2): ...here.
11437 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11439 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11440 pthread_attr_setstackaddr with __attribute_deprecated__.
11442 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11444 * pt-system.c (system): Remove cancellation handling.
11445 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11446 cancellation routines.
11448 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11450 * descr.h: Include <dl-sysdep.h>.
11451 (struct pthread): Move header.data.list to the back of the struct.
11452 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11453 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11454 (SYSINFO_OFFSEET): Likewise.
11456 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11458 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11460 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11461 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11462 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11463 (USE_DL_SYSINFO): Undef.
11465 2002-12-22 Jakub Jelinek <jakub@redhat.com>
11467 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11468 $(common-objpfx)libc.so.
11469 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11470 it is bigger than pipe buffer size even on arches with bigger
11472 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11474 2002-12-25 Ulrich Drepper <drepper@redhat.com>
11476 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11477 correct errno access for case that USE___THREAD is not defined.
11479 2002-12-24 Ulrich Drepper <drepper@redhat.com>
11481 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11482 Patch by Marijn Ros <marijn@mad.scientist.com>.
11484 2002-12-22 Roland McGrath <roland@redhat.com>
11486 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11488 2002-12-20 Ulrich Drepper <drepper@redhat.com>
11490 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11492 2002-12-19 Ulrich Drepper <drepper@redhat.com>
11494 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11495 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11496 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11498 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11500 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11501 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11502 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11503 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11504 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11505 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11506 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11507 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11509 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11511 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11513 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11515 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11517 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11518 that sysinfo is properly initialized.
11519 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11520 to 1 only for ld.so.
11522 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11523 RTLD_CORRECT_DYNAMIC_WEAK.
11525 2002-12-19 Jakub Jelinek <jakub@redhat.com>
11527 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11528 Use return 0 as 6th argument to FORWARD4.
11529 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11531 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11533 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11534 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11535 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11536 (INIT_SYSINFO): New #define.
11537 (TLS_TP_INIT): Use INIT_SYSINFO.
11538 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11539 At test to make sure SYSINFO_OFFSET value is correct.
11540 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11542 2002-12-18 Jakub Jelinek <jakub@redhat.com>
11544 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11545 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11546 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11547 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11548 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11549 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11550 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11552 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11554 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11555 macro instead of using int $0x80 directly.
11557 * sysdeps/pthread/bits/stdio-lock.h: New file.
11558 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11559 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11560 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11561 * Makefile (routines): Add libc-lowlevelmutex.
11563 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11564 __i686.get_pc_thunk.dx.
11566 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11568 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11569 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11570 ($(objpfx)tst-cancel-wrappers.out): New rule.
11571 * tst-cancel-wrappers.sh: New test.
11572 * tst-locale1.c: Include signal.h.
11573 (uselocale): Test static linking of __libc_current_sigrt*.
11575 2002-12-17 Ulrich Drepper <drepper@redhat.com>
11577 * Makefile (tests): Add tst-cancel6.
11578 * tst-cancel6.c: New file
11580 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11582 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11583 Define meaningfully for assembler as well.
11584 * pthreadP.h (struct pthread_functions): Remove
11585 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11586 and ptr_pthread_attr_init_2_1 fields.
11587 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11588 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11589 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11590 (FORWARD3): Define using FORWARD4.
11591 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11593 * pt-system.c: Remove duplicate stdlib.h include.
11595 2002-12-16 Ulrich Drepper <drepper@redhat.com>
11597 * sem_init.c: Define sem_init@GLIBC_2.0.
11598 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11599 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11601 * flockfile.c: Moved to...
11602 * sysdeps/pthread/flockfile.c: ...here. New file.
11603 * funlockfile.c: Moved to...
11604 * sysdeps/pthread/funlockfile.c: ...here. New file.
11605 * ftrylockfile.c: Moved to...
11606 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11608 2002-12-16 Jakub Jelinek <jakub@redhat.com>
11610 * libc-cancellation.c: Guard both function with
11611 #if !defined NOT_IN_libc.
11612 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11613 automatically provided pthread wrappers.
11614 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11615 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11617 * pt-open.c: Removed.
11618 * pt-fcntl.c: Removed.
11619 * pt-fsync.c: Removed.
11620 * pt-lseek.c: Removed.
11621 * pt-msgrcv.c: Removed.
11622 * pt-msgsnd.c: Removed.
11623 * pt-msync.c: Removed.
11624 * pt-nanosleep.c: Removed.
11625 * pt-open64.c: Removed.
11626 * pt-pause.c: Removed.
11627 * pt-pread.c: Removed.
11628 * pt-pread64.c: Removed.
11629 * pt-pwrite.c: Removed.
11630 * pt-pwrite64.c: Removed.
11631 * pt-read.c: Removed.
11632 * pt-recv.c: Removed.
11633 * pt-recvfrom.c: Removed.
11634 * pt-recvmsg.c: Removed.
11635 * pt-send.c: Removed.
11636 * pt-sendto.c: Removed.
11637 * pt-sigtimedwait.c: Removed.
11638 * pt-sigwait.c: Removed.
11639 * pt-wait.c: Removed.
11640 * pt-waitpid.c: Removed.
11641 * pt-write.c: Removed.
11642 * pt-accept.c: Removed.
11643 * pt-close.c: Removed.
11644 * pt-connect.c: Removed.
11645 * pt-lseek64.c: Removed.
11646 * pt-sendmsg.c: Removed.
11647 * pt-tcdrain.c: Removed.
11649 2002-12-15 Ulrich Drepper <drepper@redhat.com>
11651 * init.c (__pthread_initialize_minimal_internal): Renamed from
11652 __pthread_initialize_minimal. Make old name an alias. This
11653 converts a normal relocation into a relative relocation.
11655 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11657 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11658 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11659 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11660 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11661 pt-sigwaitinfo, pt-waitid, and pt-writev.
11662 * pt-creat.c: Removed.
11663 * pt-poll.c: Removed.
11664 * pt-pselect.c: Removed.
11665 * pt-readv.c: Removed.
11666 * pt-select.c: Removed.
11667 * pt-sigpause.c: Removed.
11668 * pt-sigsuspend.c: Removed.
11669 * pt-sigwaitinfo.c: Removed.
11670 * pt-waitid.c: Removed.
11671 * pt-writev.c: Removed.
11673 * init.c (pthread_functions): New variable.
11674 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11675 (or NULL) to __libc_pthread_init.
11676 * forward.c: Rewrite to use __libc:pthread_functions array to get
11677 function addresses.
11678 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11680 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11681 Take new parameter. Copy content of variable pointed to by it
11682 to __libc_pthread_init.
11684 * pthreadP.h (struct pthread_functions): New type.
11685 (__libc_pthread_init): Declare.
11687 * pthread_attr_destroy.c: Add namespace protected alias.
11688 * pthread_attr_getdetachstate.c: Likewise.
11689 * pthread_attr_getinheritsched.c: Likewise.
11690 * pthread_attr_getschedparam.c: Likewise.
11691 * pthread_attr_getschedpolicy.c: Likewise.
11692 * pthread_attr_getscope.c: Likewise.
11693 * pthread_attr_setdetachstate.c: Likewise.
11694 * pthread_attr_setinheritsched.c: Likewise.
11695 * pthread_attr_setschedparam.c: Likewise.
11696 * pthread_attr_setschedpolicy.c: Likewise.
11697 * pthread_attr_setscope.c: Likewise.
11698 * pthread_cond_broadcast.c: Likewise.
11699 * pthread_cond_destroy.c: Likewise.
11700 * pthread_cond_init.c: Likewise.
11701 * pthread_cond_signal.c: Likewise.
11702 * pthread_cond_wait.c: Likewise.
11703 * pthread_condattr_destroy.c: Likewise.
11704 * pthread_condattr_init.c: Likewise.
11705 * pthread_equal.c: Likewise.
11706 * pthread_exit.c: Likewise.
11707 * pthread_getschedparam.c: Likewise.
11708 * pthread_self.c: Likewise.
11709 * pthread_setcancelstate.c: Likewise.
11710 * pthread_setschedparam.c: Likewise.
11711 * pthread_mutex_destroy.c: Likewise.
11712 * pthread_mutex_init.c: Likewise.
11713 * pthreadP.h: Add prototypes for the aliases.
11715 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11716 multiple_threads member in correct TCB to 1.
11718 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11719 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11720 member of thread decriptor, otherwise return unconditionally 1.
11722 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11724 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11725 regular Linux version. Remove file.
11726 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11727 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11728 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11729 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11730 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11731 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11732 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11733 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11734 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11735 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
11736 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
11737 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
11738 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
11739 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
11740 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
11741 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
11742 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
11743 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
11744 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
11745 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
11746 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
11747 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
11748 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
11749 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
11750 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
11751 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
11752 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
11753 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
11754 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
11755 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
11757 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11759 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11760 * sysdeps/unix/sysv/linux/open.c: Removed.
11761 * sysdeps/unix/sysv/linux/fsync.c: Removed.
11762 * sysdeps/unix/sysv/linux/lseek.c: Removed.
11763 * sysdeps/unix/sysv/linux/msync.c: Removed.
11764 * sysdeps/unix/sysv/linux/read.c: Removed.
11765 * sysdeps/unix/sysv/linux/close.c: Removed.
11766 * sysdeps/unix/sysv/linux/creat.c: Removed.
11767 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11768 * sysdeps/unix/sysv/linux/pause.c: Removed.
11769 * sysdeps/unix/sysv/linux/select.c: Removed.
11770 * sysdeps/unix/sysv/linux/write.c: Removed.
11772 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11774 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11775 element in TCB to see whether locking is needed.
11777 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11778 MULTIPLE_THREADS_OFFSET value is correct.
11780 * sysdeps/unix/sysv/linux/close.c: New file.
11781 * sysdeps/unix/sysv/linux/connect.S: New file.
11782 * sysdeps/unix/sysv/linux/creat.c: New file.
11783 * sysdeps/unix/sysv/linux/fsync.c: New file.
11784 * sysdeps/unix/sysv/linux/llseek.c: New file.
11785 * sysdeps/unix/sysv/linux/lseek.c: New file.
11786 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11787 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11788 * sysdeps/unix/sysv/linux/msync.c: New file.
11789 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11790 * sysdeps/unix/sysv/linux/open.c: New file.
11791 * sysdeps/unix/sysv/linux/open64.c: New file.
11792 * sysdeps/unix/sysv/linux/pause.c: New file.
11793 * sysdeps/unix/sysv/linux/poll.c: New file.
11794 * sysdeps/unix/sysv/linux/pread.c: New file.
11795 * sysdeps/unix/sysv/linux/pread64.c: New file.
11796 * sysdeps/unix/sysv/linux/pselect.c: New file.
11797 * sysdeps/unix/sysv/linux/pwrite.c: New file.
11798 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11799 * sysdeps/unix/sysv/linux/readv.c: New file.
11800 * sysdeps/unix/sysv/linux/recv.S: New file.
11801 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11802 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11803 * sysdeps/unix/sysv/linux/select.c: New file.
11804 * sysdeps/unix/sysv/linux/send.S: New file.
11805 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11806 * sysdeps/unix/sysv/linux/sendto.S: New file.
11807 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11808 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11809 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11810 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11811 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11812 * sysdeps/unix/sysv/linux/system.c: New file.
11813 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11814 * sysdeps/unix/sysv/linux/wait.c: New file.
11815 * sysdeps/unix/sysv/linux/waitid.c: New file.
11816 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11817 * sysdeps/unix/sysv/linux/writev.c: New file.
11818 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11820 * pt-readv.c: Fix comment.
11822 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11824 * tst-cleanup1.c: Include stdlib.h.
11826 * tst-cancel5.c: New test.
11827 * Makefile (tests): Add tst-cancel5.
11828 (tst-cancel5): Link against libc.so libpthread.so in that order.
11830 2002-12-13 Ulrich Drepper <drepper@redhat.com>
11832 * forward.c (test_loaded): Prevent recursive calls.
11834 * Makefile (routines): Add libc-cancellation.
11835 * libc-cancellation.c: New file.
11836 * descr.h (struct pthread): Add multiple_threads field.
11837 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11838 new thread descriptor to 1.
11839 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11840 Initialize multiple_thread field after successful thread creation.
11841 * cancellation.c (__do_cancel): Move to pthreadP.h.
11842 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11843 (__pthread_disable_asynccancel): Add internal_function attribute.
11844 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11845 * pthread_setcancelstate.c: Likewise.
11846 * pthread_setcanceltype.c: Likewise.
11847 * pthread_exit.c: Likewise.
11848 * pthreadP.h (CANCELLATION_P): Likewise.
11849 (__do_cancel): Define as static inline.
11850 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11851 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11853 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11854 fields. Define MULTIPLE_THREADS_OFFSET.
11855 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11857 * sysdeps/unix/sysv/linux/accept.S: New file.
11858 * sysdeps/unix/sysv/linux/read.c: New file.
11859 * sysdeps/unix/sysv/linux/write.c: New file.
11860 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11861 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11862 initialization of __libc_locking_needed.
11863 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11864 __libc_locking_needed, use multiple_threads field in TCB.
11865 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11867 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11869 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11871 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11873 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11874 access to __libc_locking_needed for PIC.
11876 2002-12-12 Jakub Jelinek <jakub@redhat.com>
11878 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11879 declare for libc.so.
11880 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11882 (__libc_lock_lock): Put into statement expression.
11883 (__libc_lock_unlock): Remove trailing semicolon.
11884 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11886 2002-12-12 Roland McGrath <roland@redhat.com>
11888 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11889 "m" constraint to refer to __libc_locking_needed. Declare it here.
11891 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11893 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11894 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11895 Initialize __libc_locking_needed.
11896 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11897 instead of __register_pthread_fork_handler.
11898 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11899 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11900 fork-gen with libc_pthread_init.
11901 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11902 of __register_pthread_fork_handler.
11903 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11904 of __register_pthread_fork_handler.
11905 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11906 __libc_locking_needed to determine whether lock prefix can be avoided.
11907 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11909 2002-12-11 Ulrich Drepper <drepper@redhat.com>
11911 * Makefile (tests): Add tst-cleanup1.
11912 * tst-cleanup1.c: New file.
11913 * cancellation.c (__cleanup_thread): Removed.
11914 (__do_cancel): Remove call to __cleanup_thread.
11915 * pthreadP.h: Remove __cleanup_thread prorotype.
11917 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11918 Remember function and argument even if cancellation handler
11919 function is not available.
11920 (__libc_cleanup_region_end): Execute registered function directly if
11921 pthread functions are not available.
11922 (__libc_cleanup_end): Likewise.
11924 * init.c (__pthread_initialize_minimal): Fix initialization in
11925 static lib by preventing gcc from being too clever.
11927 2002-12-10 Ulrich Drepper <drepper@redhat.com>
11929 * init.c (__pthread_initialize_minimal): Remove unneccesary
11932 * Makefile (tests): We can run tst-locale2 now.
11934 2002-12-09 Ulrich Drepper <drepper@redhat.com>
11936 * Versions: Remove duplicated sigwait entry.
11938 2002-12-08 Ulrich Drepper <drepper@redhat.com>
11940 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11943 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11945 * pthreadP.h: Declare __pthread_enable_asynccancel and
11946 __pthread_disable_asynccancel.
11947 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11948 (CANCEL_RESET): Use __pthread_disable_asynccancel.
11949 * cancellation.c (__pthread_enable_asynccancel): New function.
11950 (__pthread_disable_asynccancel): New function.
11951 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11952 * pt-close.c: Likewise.
11953 * pt-connect.c: Likewise.
11954 * pt-creat.c: Likewise.
11955 * pt-fcntl.c: Likewise.
11956 * pt-fsync.c: Likewise.
11957 * pt-lseek.c: Likewise.
11958 * pt-lseek64.c: Likewise.
11959 * pt-msgrcv.c: Likewise.
11960 * pt-msgsnd.c: Likewise.
11961 * pt-msync.c: Likewise.
11962 * pt-nanosleep.c: Likewise.
11963 * pt-open.c: Likewise.
11964 * pt-open64.c: Likewise.
11965 * pt-pause.c: Likewise.
11966 * pt-poll.c: Likewise.
11967 * pt-pread.c: Likewise.
11968 * pt-pread64.c: Likewise.
11969 * pt-pselect.c: Likewise.
11970 * pt-pwrite.c: Likewise.
11971 * pt-pwrite64.c: Likewise.
11972 * pt-read.c: Likewise.
11973 * pt-readv.c: Likewise.
11974 * pt-recv.c: Likewise.
11975 * pt-recvfrom.c: Likewise.
11976 * pt-recvmsg.c: Likewise.
11977 * pt-select.c: Likewise.
11978 * pt-send.c: Likewise.
11979 * pt-sendmsg.c: Likewise.
11980 * pt-sendto.c: Likewise.
11981 * pt-sigpause.c: Likewise.
11982 * pt-sigsuspend.c: Likewise.
11983 * pt-sigtimedwait.c: Likewise.
11984 * pt-sigwait.c: Likewise.
11985 * pt-sigwaitinfo.c: Likewise.
11986 * pt-system.c: Likewise.
11987 * pt-tcdrain.c: Likewise.
11988 * pt-wait.c: Likewise.
11989 * pt-waitid.c: Likewise.
11990 * pt-waitpid.c: Likewise.
11991 * pt-write.c: Likewise.
11992 * pt-writev.c: Likewise.
11993 * pthread_join.c: Likewise.
11994 * pthread_timedjoin.c: Likewise.
11996 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11997 (__xpg_sigpause): New function.
11998 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12000 2002-12-07 Ulrich Drepper <drepper@redhat.com>
12002 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12004 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12005 _GI_pthread_cleanup_pop to pthreadP.h.
12007 * ftrylockfile.c: Use _IO_lock_trylock instead of
12008 pthread_mutex_trylock.
12010 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12011 (CANCEL_RESET): Likewise.
12012 (__pthread_setcanceltype_): Declare.
12013 (__pthread_mutex_lock_internal): Declare.
12014 (__pthread_mutex_unlock_internal): Declare.
12015 (__pthread_once_internal): Declare.
12016 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12017 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12019 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12020 and pthread_mutex_unlock.
12021 * pthread_cond_wait.c: Likewise.
12022 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12023 * pthread_mutex_unlock.c: Likewise.
12025 * pthread_setcanceltype.c: Add additional alias
12026 __pthread_setcanceltype.
12028 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12029 * sem_open.c (sem_open): Likewise.
12030 Use __libc_open, __libc_write, and __libc_close instead of
12031 open, write, and close respectively.
12033 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12034 Rewrite as statement expression since it must return a value.
12036 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12037 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12040 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12041 alias __pthread_once_internal.
12043 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12045 2002-12-06 Ulrich Drepper <drepper@redhat.com>
12047 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12048 * tst-stdio1.c: New file.
12049 * tst-stdio2.c: New file.
12051 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12053 * Makefile (tests): Comment out tst-locale2 for now.
12054 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12056 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12058 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12059 Use _IO_lock_init instead of explicit assignment.
12061 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12062 Define __libc_lock_* and __libc_lock_recursive macros with
12063 lowlevellock macros, not pthread mutexes.
12065 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
12066 of pthread_mutex_lock.
12067 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
12068 instead of pthread_mutex_unlock.
12070 2002-12-06 Roland McGrath <roland@redhat.com>
12072 * allocatestack.c (__stack_user): Use uninitialized defn.
12073 * init.c (__pthread_initialize_minimal): Initialize it here.
12075 2002-12-05 Roland McGrath <roland@redhat.com>
12077 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12079 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12081 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12082 missing & here too.
12084 2002-12-05 Ulrich Drepper <drepper@redhat.com>
12086 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12088 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12089 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12090 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12091 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12092 for __libc_lock_* macros.
12093 * Makefile (routines): Add libc-lowlevellock.
12095 2002-10-09 Roland McGrath <roland@redhat.com>
12097 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12098 Under [__PIC__], call the function via the pointer fetched for
12099 comparison rather than a call by name that uses the PLT.
12100 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12101 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12102 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12103 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12104 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12106 2002-12-04 Roland McGrath <roland@redhat.com>
12108 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12110 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12111 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12113 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12115 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12117 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12118 a completely opaque, non-integer type.
12119 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12121 2002-12-05 Jakub Jelinek <jakub@redhat.com>
12123 * sysdeps/i386/tls.h: Include stdlib.h.
12124 * sysdeps/x86_64/tls.h: Likewise.
12126 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12128 * Makefile (tests): Add tst-locale2.
12129 (tests-static): Likewise.
12130 * tst-locale2.c: New file.
12132 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12133 volatile and add memory clobbers to lock operations.
12135 2002-12-03 Ulrich Drepper <drepper@redhat.com>
12137 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12138 * sysdeps/i386/i486/bits/atomic.h: New file.
12139 * sysdeps/i386/i586/bits/atomic.h: New file.
12140 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12141 include i486 version.
12142 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12143 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12144 Patch by Marijn Ros <marijn@mad.scientist.com>.
12146 * allocatestack.c (get_cached_stack): Don't crash if we first
12147 found a stack with a larger size then needed.
12148 Reported by Hui Huang <hui.huang@sun.com>.
12150 * Makefile (tests): Add tst-sysconf.
12151 * tst-sysconf.c: New file.
12153 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12154 PTHREAD_THREADS_MAX.
12156 2002-12-02 Roland McGrath <roland@redhat.com>
12158 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12159 Declare using hidden_proto instead of attribute_hidden, so there are
12160 non-.hidden static symbols for gdb to find.
12161 (__pthread_keys): Likewise.
12162 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12163 * allocatestack.c (__stack_user): Likewise.
12164 * pthread_create.c (__pthread_keys): Likewise.
12165 (__nptl_threads_events, __nptl_last_event): Make these static instead
12167 * pthread_key_create.c (__pthread_pthread_keys_max,
12168 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12170 2002-12-02 Ulrich Drepper <drepper@redhat.com>
12172 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12174 * tst-locale1.c: New file.
12176 * pthread_cond_timedwait.c: Include <stdlib.h>.
12178 * Makefile (tests): Add tst-fork2 and tst-fork3.
12179 * tst-fork2.c: New file.
12180 * tst-fork3.c: New file.
12182 2002-11-28 Ulrich Drepper <drepper@redhat.com>
12184 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12186 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12187 require it to 200112L.
12189 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12190 instruction only if HAVE_CMOV is defined.
12191 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12193 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12195 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12197 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12199 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12201 2002-11-27 Ulrich Drepper <drepper@redhat.com>
12203 * sysdeps/x86_64/bits/atomic.h: New file.
12205 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12208 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12209 possible since gettid cannot fail.
12211 * sysdeps/x86_64/pthreaddef.h: New file.
12213 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12215 * sysdeps/x86_64/pthread_spin_init.c: New file.
12216 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12217 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12218 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12220 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12221 Add missing lock prefix. Minute optimization.
12223 * tst-spin2.c (main): Also check successful trylock call.
12225 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12226 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12228 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12229 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12231 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12232 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12233 value in case of an error. Add support for INTERNAL_SYSCALL.
12235 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12236 value in case of an error.
12238 * sysdeps/x86_64/tls.h: New file.
12240 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12242 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12243 takes the array member name and the index as parameters.
12244 (THREAD_SETMEM_NC): Likewise.
12245 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12246 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12249 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12250 to decide which code to use.
12251 (THREAD_SETMEM_NC): Likewise.
12253 * allocatestack.c (queue_stack): Don't remove stack from list here.
12254 Do it in the caller. Correct condition to prematurely terminate
12255 loop to free stacks.
12256 (__deallocate_stack): Remove stack from list here.
12258 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12260 * Makefile (tests): Add tst-stack1.
12261 * tst-stack1.c: New file.
12263 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12266 * pthread_attr_getstack.c: Return bottom of the thread area.
12268 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12270 * Makefile (libpthread-routines): Add pt-allocrtsig and
12271 pthread_kill_other_threads.
12272 * pt-allocrtsig.c: New file.
12273 * pthread_kill_other_threads.c: New file.
12274 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12275 all three functions.
12276 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12278 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12279 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12280 and __libc_allocate_rtsig_private.
12281 * Versions (libpthread): Export pthread_kill_other_threads_np,
12282 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12284 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12286 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12287 the end of the stack. Adjust computations.
12288 When mprotect call fails dequeue stack and free it.
12289 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12291 * pthread_getattr_np.c: Likewise.
12293 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12296 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12298 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12299 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12301 2002-11-22 Ulrich Drepper <drepper@redhat.com>
12303 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12304 * pthread_setspecific.c: Likewise.
12306 2002-11-21 Ulrich Drepper <drepper@redhat.com>
12308 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12309 definitions. Get them from the official place.
12310 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12312 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12313 Use new CLONE_ flags in clone() calls.
12315 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12316 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12318 * Versions: Add pthread_* functions for libc.
12319 * forward.c: New file.
12321 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12323 * herrno.c: New file.
12326 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12327 sem_trywait, and sem_timedwait. Add herrno and res.
12328 * sem_init.c: Don't initialize lock and waiters members.
12329 * sem_open.c: Likewise.
12330 * sem_post.c: Removed.
12331 * sem_wait.c: Removed.
12332 * sem_trywait.c: Removed.
12333 * sem_timedwait.c: Removed.
12334 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12335 Includes full implementations of sem_post, sem_wait, sem_trywait,
12337 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12338 for new implementation.
12339 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12340 and waiters fields.
12342 * tst-sem3.c: Improve error message.
12343 * tst-signal3.c: Likewise.
12345 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12346 to tell the kernel about the termination futex and to initialize tid
12347 member. Don't initialize main_thread.
12348 * descr.h (struct pthread): Remove main_thread member.
12349 * cancelllation.c (__do_cancel): Remove code handling main thread.
12350 The main thread is not special anymore.
12352 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12353 size of the stacks to stack_cache_actsize.
12355 * pt-readv.c: Add missing "defined".
12356 * pt-sigwait.c: Likewise.
12357 * pt-writev.c: Likewise.
12359 2002-11-09 Ulrich Drepper <drepper@redhat.com>
12361 * Versions: Export __connect from libpthread.
12362 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12364 * Makefile (libpthread-routines): Add pt-raise.
12365 * sysdeps/unix/sysv/linux/raise.c: New file.
12366 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12367 * sysdeps/generic/pt-raise.c: New file.
12369 * pthread_cond_init.c: Initialize all data elements of the condvar
12370 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12372 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12373 * pthread_create.c: Likewise.
12375 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12376 * tst-key1.c: New file.
12377 * tst-key2.c: New file.
12378 * tst-key3.c: New file.
12380 * Versions: Export pthread_detach for version GLIBC_2.0.
12381 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12383 2002-11-08 Ulrich Drepper <drepper@redhat.com>
12385 * pthread_key_create.c: Terminate search after an unused key was found.
12386 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12388 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12389 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12391 2002-10-10 Ulrich Drepper <drepper@redhat.com>
12393 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12394 dynamic lookup for errno in PIC.
12396 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12397 release the stack lock as soon as possible.
12398 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12399 the static TLS block.
12400 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12402 * cancellation.c: Renamed from cancelation.c.
12403 * Makefile: Adjust accordingly.
12404 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12405 * cleanup_defer.c: Use CANCELLATION_P.
12406 * pthread_testcancel.c: Likewise.
12407 * descr.h: Fix spelling in comments.
12408 * init.c: Likewise.
12409 * pthread_getattr_np.c: Likewise.
12410 * pthread_getschedparam.c: Likewise.
12411 * pthread_setschedparam.c: Likewise.
12412 * Versions: Likewise.
12414 * pt-pselect.c: New file.
12415 * Makefile (libpthread-routines): Add pt-pselect.
12416 * Versions: Add pselect.
12418 * tst-cancel4.c: New file.
12419 * Makefile (tests): Add tst-cancel4.
12421 2002-10-09 Ulrich Drepper <drepper@redhat.com>
12423 * pthread_mutex_lock.c: Always record lock ownership.
12424 * pthread_mutex_timedlock.c: Likewise.
12425 * pthread_mutex_trylock.c: Likewise.
12427 * pt-readv.c: New file.
12428 * pt-writev.c: New file.
12429 * pt-creat.c: New file.
12430 * pt-msgrcv.c: New file.
12431 * pt-msgsnd.c: New file.
12432 * pt-poll.c: New file.
12433 * pt-select.c: New file.
12434 * pt-sigpause.c: New file.
12435 * pt-sigsuspend.c: New file.
12436 * pt-sigwait.c: New file.
12437 * pt-sigwaitinfo.c: New file.
12438 * pt-waitid.c: New file.
12439 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12440 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12441 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12442 * Versions: Add all the new functions.
12444 * tst-exit1.c: New file.
12445 * Makefile (tests): Add tst-exit1.
12447 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12449 2002-10-08 Ulrich Drepper <drepper@redhat.com>
12451 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12453 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12454 call. pthread_join is an official cancellation point.
12455 * pthread_timedjoin.c: Likewise.
12457 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12458 and the condvar's mutex are retrieved.
12459 * pthread_cond_timedwait.c: Likewise.
12460 Reported by dice@saros.East.Sun.COM.
12462 2002-10-07 Ulrich Drepper <drepper@redhat.com>
12464 * pthreadP.h: Cut out all type definitions and move them...
12465 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12466 * pthreadP.h: Include <internaltypes.h>.
12468 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12469 performance tweaks.
12471 * sem_trywait.c: Shuffle #includes around to get right order.
12472 * sem_timedwait.c: Likewise.
12473 * sem_post.c: Likewise.
12474 * sem_wait.c: Likewise.
12476 * nptl 0.3 released.
12478 * Makefile (tests): Add tst-signal3.
12479 * tst-signal3.c: New file.
12481 2002-10-05 Ulrich Drepper <drepper@redhat.com>
12483 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12484 the asms modify the sem object.
12485 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12487 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12488 the actual members.
12489 * pthreadP.h (struct sem): New type. Actual semaphore type.
12490 * semaphoreP.h: Include pthreadP.h.
12491 * sem_getvalue.c: Adjust to sem_t change.
12492 * sem_init.c: Likewise.
12493 * sem_open.c: Likewise.
12494 * sem_post.c: Likewise.
12495 * sem_timedwait.c: Likewise.
12496 * sem_trywait.c: Likewise.
12497 * sem_wait.c: Likewise.
12499 2002-10-04 Ulrich Drepper <drepper@redhat.com>
12501 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12502 * tst-basic2.c: New file.
12503 * tst-exec1.c: New file.
12504 * tst-exec2.c: New file.
12505 * tst-exec3.c: New file.
12507 * tst-fork1.c: Remove extra */.
12509 * nptl 0.2 released. The API for IA-32 is complete.