1 2012-10-24 Roland McGrath <roland@hack.frob.com>
3 * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
4 ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
5 ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
6 ($(objpfx)tst-rwlock14): Likewise.
8 2012-10-24 Joseph Myers <joseph@codesourcery.com>
10 * Makefile (tests): Remove tst-oddstacklimit.
11 (test-srcs): New variable.
12 (tst-oddstacklimit-ENV): Remove.
13 [$(run-built-tests) = yes] (tests): Depend on
14 $(objpfx)tst-oddstacklimit.out.
15 [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
17 * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
18 setrlimit before executing tst-basic1 test passed to --command.
20 2012-10-23 Joseph Myers <joseph@codesourcery.com>
22 * Makefile [$(cross-compiling) = no]: Change condition to
23 [$(run-built-tests) = yes].
25 2012-10-23 Jim Blandy <jimb@codesourcery.com>
26 Joseph Myers <joseph@codesourcery.com>
28 * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
29 (tst-exec4-ARGS): Likewise.
30 (tst-stackguard1-ARGS): Likewise.
32 2012-10-21 Jim Blandy <jimb@codesourcery.com>
33 Joseph Myers <joseph@codesourcery.com>
35 * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
36 tst-cancel-wrappers.sh.
37 * tst-cancel-wrappers.sh: Use nm program given as first argument,
40 2012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
42 * tst-cond25.c (do_test_wait): Don't check for return value from
45 2012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
48 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
49 (__condvar_tw_cleanup): Adjust the mutex data structure if it
50 was locked by FUTEX_WAIT_REQUEUE_PI.
51 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
52 (__condvar_w_cleanup): Likewise.
53 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
54 (__condvar_cleanup2): Likewise.
55 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
56 (__condvar_cleanup1): Likewise.
58 2012-10-10 Carlos O'Donell <carlos@systemhalted.org>
60 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
61 defined __EXCEPTIONS) && defined __USE_GNU]
62 (pthread_cleanup_push_defer_np): Fix formatting.
64 2012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
67 * Makefile (tests): New test case tst-cond25.
68 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
69 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
70 (__condvar_tw_cleanup): Lock mutex only if we don't already
72 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
73 (__condvar_w_cleanup): Likewise.
74 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
75 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
76 (__condvar_cleanup2): Lock mutex only if we don't already
78 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
79 (__condvar_cleanup1): Likewise.
80 * tst-cond25.c: New test case.
82 2012-10-09 Roland McGrath <roland@hack.frob.com>
84 * sysdeps/pthread/configure: Regenerated.
85 * sysdeps/x86_64/configure: Regenerated.
87 2012-10-05 David S. Miller <davem@davemloft.net>
90 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
91 (DB_THREAD_SELF): Use constants for the register offsets. Correct
92 the case of a 64-bit debugger with a 32-bit inferior.
94 2012-10-05 H.J. Lu <hongjiu.lu@intel.com>
97 * Makefile (tests-static): Add tst-cancel24-static,
98 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
99 tst-sem11-static and tst-sem12-static.
101 (LDLIBS-tst-cancel24-static): New macro.
102 * tst-cancel24-static.cc: New file.
103 * tst-cond8-static.c: Likewise.
104 * tst-mutex8-static.c: Likewise.
105 * tst-mutexpi8-static.c: Likewise.
106 * tst-sem11-static.c: Likewise.
107 * tst-sem12-static.c: Likewise.
109 2012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
112 * Makefile (tests): New test case tst-cond24.
113 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
114 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
115 (__pthread_cond_timedwait): Unlock mutex before going back to
117 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
118 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
119 return from futex_wait.
120 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
121 (__pthread_cond_timedwait): Unlock mutex before going back to
122 wait in PI case. Set requeue_pi flag only if wait returned 0.
123 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
124 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
125 return from futex_wait.
126 * tst-cond24.c: New test case.
128 2012-10-04 Roland McGrath <roland@hack.frob.com>
130 * pthread_create.c (start_thread): Use __madvise, not madvise.
132 2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
134 * sysdeps/i386/tls.h: Update copyright years.
136 2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
138 * pthread_create.c (start_thread): Fix clone flag name in
139 comment to CLONE_CHILD_CLEARTID.
140 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
141 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
142 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
143 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
144 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
145 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
147 2012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
150 * Makefile (tests): Add tst-cond-except.
151 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
152 (__pthread_cond_timedwait): Mark instructions where %ebx is
153 incremented in PI case.
154 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
155 for the marked PI case instructions.
156 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
157 (__pthread_cond_wait): Mark instructions where %ebx is
158 incremented in PI case.
159 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
160 for the marked PI case instructions.
161 * tst-cond-except.c: New test case.
163 2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
165 * tst-tls6.sh: Add "set -e".
166 * Makefile: Do not specify -e option when running testsuite
169 * tst-tls6.sh: Add copyright header.
171 2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
173 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
174 to uint64_t for 64-bit store.
175 (THREAD_SETMEM_NC): Likewise.
177 2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
179 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
181 (THREAD_SETMEM_NC): Likewise.
183 2012-09-14 Jeff Law <law@redhat.com>
186 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
188 2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
191 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
194 2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
196 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
197 (LDLIBS-tst-cancel24): This.
199 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
202 * Makefile (tests-static): Add tst-cancel21-static.
204 * tst-cancel21-static.c: New file.
206 2012-09-01 Joseph Myers <joseph@codesourcery.com>
208 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
209 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
210 [__NR_clock_getres]: Make code unconditional.
211 (pthread_getcpuclockid): Remove code left unreachable by removal
214 2012-08-31 Joseph Myers <joseph@codesourcery.com>
217 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
218 atomic_compare_and_exchange_bool_rel.
219 * tst-sem14.c: New file.
220 * Makefile (tests): Add tst-sem14.
222 2012-08-15 Roland McGrath <roland@hack.frob.com>
224 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
226 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
227 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
229 2012-08-16 Joseph Myers <joseph@codesourcery.com>
231 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
232 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
233 * pthread_condattr_setclock.c (pthread_condattr_setclock)
234 [!__ASSUME_POSIX_TIMERS]: Likewise.
235 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
236 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
237 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
238 [!__ASSUME_POSIX_TIMERS]: Likewise.
239 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
240 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
241 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
243 [!__NR-timer_create]: Remove conditional code.
244 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
245 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
247 [!__NR_timer_delete]: Remove conditional code.
248 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
249 * sysdeps/unix/sysv/linux/timer_getoverr.c
250 [__NR_timer_getoverrun]: Make code unconditional.
251 [!__NR_timer_getoverrun]: Remove conditional code.
252 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
253 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
254 Make code unconditional.
255 [!__NR_timer_gettime]: Remove conditional code.
256 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
257 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
258 Make code unconditional.
259 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
260 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
261 Make code unconditional.
262 [!__NR_timer_settime]: Remove conditional code.
263 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
264 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
265 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
268 2012-08-15 Tom de Vries <vries@codesourcery.com>
269 Maxim Kuvyrkov <maxim@codesourcery.com>
271 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
272 (__libc_lock_trylock): Allow pre-existing definitions.
274 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
276 * pthread_spin_lock.c: New file.
277 * pthread_spin_trylock.c: New file.
279 2012-08-08 Joseph Myers <joseph@codesourcery.com>
281 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
283 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
284 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
286 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
287 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
288 Make code unconditional.
289 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
290 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
291 __NR_tgkill]: Make code unconditional.
292 (raise) [__ASSUME_TGKILL]: Likewise.
293 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
294 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
295 [__ASSUME_TGKILL]: Make code unconditional.
296 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
297 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
298 __NR_tgkill]: Make code unconditional.
299 (raise) [__ASSUME_TGKILL]: Likewise.
300 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
302 2012-08-07 Joseph Myers <joseph@codesourcery.com>
304 * sysdeps/pthread/createthread.c (create_thread)
305 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
307 2012-08-03 Joseph Myers <joseph@codesourcery.com>
309 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
311 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
313 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
315 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
316 (pagesize): New static variable.
317 (allocate_and_test): Return MEM. Rename parameter to TARGET.
318 (check_stack_top): New local variables MEM and PAGEMASK. Cap
319 stack size to MAX_STACK_SIZE. Call allocate_and_test for
320 halfway up the stack top page. Verify that the top page was
322 (do_test): Get pagesize using sysconf.
324 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
326 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
328 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
329 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
332 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
334 * tst-pthread-getattr.c: Revert last change.
336 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
338 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
341 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
343 (check_stack_top): Read valued written into STACKADDR in
344 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
346 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
348 * nptl-init.c (sighandler_setxid): Fix the comment that
351 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
353 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
354 (__lll_robust_timedlock_wait): Simplify CFI directives.
356 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
359 * Makefile (tests): Add test case.
360 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
361 the __libc_stack_end page from stacksize. Truncate stacksize to
362 make it page aligned when it is computed from RLIMIT_STACK.
363 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
366 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
369 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
372 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
373 Jakub Jelinek <jakub@redhat.com>
376 * sysdeps/pthread/pthread.h
377 [!(defined __GNUC__ && defined __EXCEPTIONS)]
378 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
379 __libc_unlikely instead of __builtin_expect.
381 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
384 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
385 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
386 * sysdeps/unix/sysv/linux/i386/Implies: New file.
387 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
388 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
390 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
391 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
393 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
395 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
398 * nptl-init.c (pthread_functions): Remove use of INTUSE and
400 (__pthread_initialize_minimal_internal): Likewise.
401 * sem_open.c: Likewise.
402 * sem_unlink.c: Likewise.
403 * pthreadP.h: Replace _internal aliases by hidden_proto
405 * pthread_getspecific.c: Replace _internal alias by hidden_def.
406 * pthread_key_create.c: Likewise.
407 * pthread_mutex_destroy.c: Likewise.
408 * pthread_mutex_init.c: Likewise.
409 * pthread_mutex_lock.c: Likewise.
410 * pthread_mutex_unlock.c: Likewise.
411 * pthread_once.c: Likewise.
412 * pthread_rwlock_rdlock.c: Likewise.
413 * pthread_rwlock_unlock.c: Likewise.
414 * pthread_rwlock_wrlock.c: Likewise.
415 * pthread_setspecific.c: Likewise.
416 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
418 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
420 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
422 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
423 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
424 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
425 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
426 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
427 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
428 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
429 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
430 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
431 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
433 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
435 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
438 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
440 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
441 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
443 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
444 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
446 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
447 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
448 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
449 (pthread_barrier_wait): Likewise.
450 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
451 (__pthread_cond_broadcast): Likewise.
452 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
453 (__pthread_cond_signal): Likewise.
454 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
455 (__pthread_cond_timedwait): Likewise.
456 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
458 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
459 (__pthread_rwlock_rdlock): Likewise.
460 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
461 (pthread_rwlock_timedrdlock): Likewise.
462 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
463 (pthread_rwlock_timedwrlock): Likewise.
464 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
465 (__pthread_rwlock_unlock): Likewise.
466 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
467 (__pthread_rwlock_wrlock): Likewise.
468 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
469 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
470 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
472 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
474 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
477 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
478 __libc_stack_end rounded to the end of containing page as the
481 2012-05-25 Rayson Ho <rho@redhat.com>
483 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
485 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
486 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
487 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
488 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
489 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
490 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
491 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
492 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
494 2012-05-25 Rayson Ho <rho@redhat.com>
495 Roland McGrath <roland@hack.frob.com>
497 * DESIGN-systemtap-probes.txt: New file.
498 * pthread_cond_broadcast.c: SystemTap probes.
499 * pthread_cond_init.c: Likewise.
500 * pthread_cond_signal.c: Likewise.
501 * pthread_cond_wait.c: Likewise.
502 * pthread_cond_destroy.c: Likewise.
503 * pthread_create.c: Likewise.
504 * pthread_join.c: Likewise.
505 * pthread_mutex_destroy.c: Likewise.
506 * pthread_mutex_init.c: Likewise.
507 * pthread_mutex_lock.c: Likewise.
508 * pthread_mutex_timedlock.c: Likewise.
509 * pthread_mutex_unlock.c: Likewise.
510 * pthread_rwlock_destroy.c: Likewise.
511 * pthread_rwlock_rdlock.c: Likewise.
512 * pthread_rwlock_unlock.c: Likewise.
513 * pthread_rwlock_wrlock.c: Likewise.
514 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
515 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
516 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
517 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
518 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
519 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
520 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
521 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
523 2012-05-24 Roland McGrath <roland@hack.frob.com>
525 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
527 2012-05-17 Andreas Jaeger <aj@suse.de>
529 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
530 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
531 only for older kernels.
533 2012-05-15 Joseph Myers <joseph@codesourcery.com>
535 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
538 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
540 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
541 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
542 (lll_robust_lock): Likewise.
543 (lll_cond_lock): Likewise.
544 (lll_robust_cond_lock): Likewise.
545 (lll_timedlock): Likewise.
546 (lll_robust_timedlock): Likewise.
547 (lll_unlock): Likewise.
548 (lll_robust_unlock): Likewise.
550 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
552 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
553 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
555 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
557 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
559 (__gcc_personality_v0): Replace 8-byte data alignment with
560 LP_SIZE alignment and .quad with ASM_ADDR.
562 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
564 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
566 (__gcc_personality_v0): Replace 8-byte data alignment with
567 LP_SIZE alignment and .quad with ASM_ADDR.
569 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
571 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
572 NWAITERS, which is unsigned long int.
574 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
576 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
577 (__gcc_personality_v0): Replace 8-byte data alignment with
578 LP_SIZE alignment and .quad with ASM_ADDR.
580 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
582 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
583 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
584 __vdso_clock_gettime pointer into RAX_LP.
585 (__gcc_personality_v0): Replace 8-byte data alignment with
586 LP_SIZE alignment and .quad with ASM_ADDR.
588 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
590 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
591 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
592 __vdso_clock_gettime pointer into RAX_LP.
593 (__gcc_personality_v0): Replace 8-byte data alignment with
594 LP_SIZE alignment and .quad with ASM_ADDR.
596 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
598 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
599 LP_OP(cmp) and R8_LP on dep_mutex pointer.
601 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
603 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
604 to update pointer in memory. Load pointer into RDI_LP.
606 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
608 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
609 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
611 (LLL_STUB_UNWIND_INFO_END): Likewise.
612 (lll_timedlock): Load timeout pointer into RDX_LP.
613 (lll_robust_timedlock): Likewise.
615 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
616 Jakub Jelinek <jakub@redhat.com>
619 * Makefile (tests): Add test cases.
620 * descr.h (struct pthread): Add a comment describing multiple_threads.
621 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
623 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
624 before setting cancelstate of the thread.
625 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
626 (__libc_multiple_threads): Add explanatory comment.
627 * tst-cancel-self-cancelstate.c: New test case.
628 * tst-cancel-self-canceltype.c: Likewise.
629 * tst-cancel-self-cleanup.c: Supporting file for test cases.
630 * tst-cancel-self-testcancel.c: New test case.
631 * tst-cancel-self.c: Likewise.
632 * vars.c: Expand comment to include single-process case.
634 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
636 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
637 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
640 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
642 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
644 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
645 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
647 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
649 * shlib-versions: Move x86_64-.*-linux.* entry to ...
650 * sysdeps/x86_64/64/shlib-versions: Here. New file.
651 * sysdeps/x86_64/x32/shlib-versions: New file.
653 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
655 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
656 __SIZEOF_PTHREAD_XXX_T.
657 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
658 (pthread_mutex_t): Likewise.
659 (pthread_rwlock_t): Likewise.
660 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
663 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
665 * sysdeps/x86_64/x32/tls.h: New file.
667 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
669 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
671 (THREAD_SETMEM_NC): Likewise.
673 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
675 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
678 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
680 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
681 (__cleanup_fct_attribute): Check __x86_64__ instead of
684 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
686 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
687 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
688 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
689 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
690 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
692 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
694 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
695 instead of __WORDSIZE.
697 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
700 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
702 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
704 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
705 (__pthread_cond_timedwait): Use CFI directives.
706 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
707 (__pthread_cond_wait): Likewise.
708 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
709 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
711 2012-05-03 David S. Miller <davem@davemloft.net>
713 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
714 always have to return 0, especially for the pthread_spin_init
716 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
718 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
719 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
721 2012-05-02 David S. Miller <davem@davemloft.net>
723 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
724 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
725 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
726 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
727 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
728 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
729 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
730 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
731 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
732 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
733 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
734 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
735 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
736 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
737 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
738 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
739 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
740 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
742 2012-05-02 Allan McRae <allan@archlinux.org>
744 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
745 (LDFLAGS-tst-cancel24): Likewise.
747 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
749 * sysdeps/i386/pthread_spin_lock.S: New.
750 * sysdeps/i386/pthread_spin_lock.c: Delete.
751 * sysdeps/x86_64/pthread_spin_lock.S: New.
752 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
754 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
756 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
757 run when cross-compiling.
759 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
761 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
762 instead of libgcc_s.h.
764 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
766 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
768 2012-03-27 David S. Miller <davem@davemloft.net>
770 * tst-cond16.c (do_test): Use a thread stack size which is either
771 PTHREAD_STACK_MIN or the page size, whichever is larger.
772 * tst-cond18.c (do_test): Likewise.
774 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
776 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
777 register char * __asm__("rsp") to get stack frame.
779 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
781 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
784 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
786 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
789 2012-03-16 David S. Miller <davem@davemloft.net>
792 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
794 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
797 2012-03-15 David S. Miller <davem@davemloft.net>
800 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
802 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
805 * pt-crti.S: Replace FSF snail mail address with URL.
807 2012-03-09 Joseph Myers <joseph@codesourcery.com>
809 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
810 Do not define before including <time.h>.
812 2012-03-08 David S. Miller <davem@davemloft.net>
814 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
816 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
818 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
819 Check for timestamp before the Epoch.
821 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
824 * tst-sem13.c (do_test): Add another test case.
825 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
826 Fix updating nwaiters.
828 2012-03-07 Joseph Myers <joseph@codesourcery.com>
831 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
832 link test to a compile test.
833 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
835 * sysdeps/pthread/configure: Regenerated.
837 2012-03-07 Ulrich Drepper <drepper@gmail.com>
839 * Makefile (distribute): Remove variable.
841 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
843 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
844 superfluous assignment.
845 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
847 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
848 (sem_timedwait): Likewise.
850 2012-03-06 Ulrich Drepper <drepper@gmail.com>
852 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
853 installed headers to...
854 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
856 2012-03-06 David S. Miller <davem@davemloft.net>
858 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
859 atomic_increment and remove unused local variable.
860 (__old_sem_post): Likewise.
862 2012-02-27 David S. Miller <davem@davemloft.net>
864 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
865 non-existing __pthread_attr.
866 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
867 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
868 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
869 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
870 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
872 2012-02-26 Ulrich Drepper <drepper@gmail.com>
874 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
876 * sysdeps/pthread/pthread.h: Define __need_timespec before including
878 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
880 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
881 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
882 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
883 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
884 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
886 2012-02-21 Joseph Myers <joseph@codesourcery.com>
889 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
891 [crti.S not in sysdirs] (omit-deps): Do not append.
892 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
893 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
894 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
895 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
896 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
897 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
898 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
899 [crti.S in sysdirs] (extra-objs): Append unconditionally.
900 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
902 * sysdeps/pthread/pt-initfini.c: Remove file.
904 2012-02-16 Richard Henderson <rth@twiddle.net>
906 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
907 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
909 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
911 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
913 2012-02-16 David S. Miller <davem@davemloft.net>
915 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
917 2012-02-15 Marek Polacek <polacek@redhat.com>
919 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
921 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
923 Replace FSF snail mail address with URLs, as per GNU coding standards.
925 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
927 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
929 2012-02-08 Joseph Myers <joseph@codesourcery.com>
931 Support crti.S and crtn.S provided directly by architectures.
932 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
933 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
934 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
935 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
936 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
937 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
938 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
939 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
940 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
941 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
942 * pt-crti.S: New file.
943 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
945 2012-02-03 Joseph Myers <joseph@codesourcery.com>
947 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
948 macros for PIC register setup.
949 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
950 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
951 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
952 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
953 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
955 2012-01-11 Marek Polacek <polacek@redhat.com>
957 * forward.c (FORWARD_NORETURN): Define macro.
958 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
959 (__pthread_exit): Likewise.
961 2012-01-10 Ulrich Drepper <drepper@gmail.com>
963 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
965 * pthreadP.h: Add noreturn to __pthread_exit.
966 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
968 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
970 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
971 Call pthread_attr_setstacksize() with result of
972 __pthread_get_minstack() to account for application TLS usage.
974 2012-01-08 Marek Polacek <polacek@redhat.com>
976 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
978 2012-01-07 Ulrich Drepper <drepper@gmail.com>
981 * pthreadP.h: Use const instead of __const.
982 * semaphore.h: Likewise.
983 * sysdeps/pthread/bits/libc-lock.h: Likewise.
984 * sysdeps/pthread/bits/sigthread.h: Likewise.
985 * sysdeps/pthread/pthread.h: Likewise.
987 * Makefile: Remove elf=yes test, only ELF is supported.
989 * shlib-versions: Remove entries for ports architectures.
991 In case anyone cares, the IA-64 architecture could move to ports.
992 * sysdeps/ia64/*: Removed.
993 * sysdeps/unix/sysv/linux/ia64/*: Removed.
995 2011-12-22 Ulrich Drepper <drepper@gmail.com>
997 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
998 __pthread_get_minstack.
999 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1002 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1003 through __pthread_get_minstack.
1004 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1005 directly from _rtld_global_ro.
1006 (__pthread_get_minstack): New function.
1007 * pthreadP.h: Declare __pthread_get_minstack.
1008 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1010 2011-12-21 Ulrich Drepper <drepper@gmail.com>
1013 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1014 Correct reading name from file.
1016 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
1018 * allocatestack.c (allocate_stack): Return errno on failure.
1020 2011-12-14 Jeff Law <law@redhat.com>
1023 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1025 2011-11-28 Andreas Schwab <schwab@redhat.com>
1027 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1028 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1029 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1031 2011-11-15 Ulrich Drepper <drepper@gmail.com>
1033 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1036 2011-10-29 Ulrich Drepper <drepper@gmail.com>
1039 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1040 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1041 path for kernels with FUTEX_CLOCK_REALTIME.
1042 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1044 2011-10-27 Andreas Schwab <schwab@redhat.com>
1047 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1048 for memory synchronization functions.
1049 * semaphore.h: Likewise.
1051 2011-10-24 Ulrich Drepper <drepper@gmail.com>
1053 * tst-cancel7.c: Avoid warning.
1054 * tst-mutex6.c: Likewise.
1055 * tst-mutex9.c: Likewise.
1056 * tst-mutexpi6.c: Likewise.
1058 2011-10-23 Ulrich Drepper <drepper@gmail.com>
1060 * sysdeps/i386/tls.h: Remove #include <list.h>.
1062 2011-10-15 Ulrich Drepper <drepper@gmail.com>
1064 * pthread_create.c (start_thread): Call __ctype_init.
1066 2011-09-15 Andreas Schwab <schwab@redhat.com>
1068 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1070 (list_add): Add atomic_write_barrier.
1071 * descr.h: Define __need_list_t before including <list.h>.
1072 * nptl-init.c: Include <list.h>
1073 * allocatestack.c: Likewise.
1075 2011-09-11 Ulrich Drepper <drepper@gmail.com>
1077 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1078 * sysdeps/ia64/tls.h: Likewise.
1079 * sysdeps/powerpc/tls.h: Likewise.
1080 * sysdeps/s390/tls.h: Likewise.
1081 * sysdeps/sh/tls.h: Likewise.
1082 * sysdeps/sparc/tls.h: Likewise.
1083 * sysdeps/x86_64/tls.h: Likewise.
1085 2011-09-10 Ulrich Drepper <drepper@gmail.com>
1087 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1089 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1091 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1092 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1093 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1094 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1095 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1096 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1097 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1098 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1099 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1100 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1101 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1102 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1104 * tst-tls1.c: Support for __thread is now mandatory.
1105 * tst-tls2.c: Likewise.
1106 * tst-tls3.c: Likewise.
1107 * tst-tls3mod.c: Likewise.
1108 * tst-tls4.c: Likewise.
1109 * tst-tls4moda.c: Likewise.
1110 * tst-tls4modb.c: Likewise.
1111 * tst-tls5.h: Likewise.
1113 2011-09-08 Ulrich Drepper <drepper@gmail.com>
1116 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1117 (pthread_rwlock_timedwrlock): Use correct macro in test.
1118 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1120 2011-09-06 Ulrich Drepper <drepper@gmail.com>
1122 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1123 use gettimeofday vsyscall, just call gettimeofday.
1124 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1125 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1126 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1128 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1130 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1131 Simplify __vdso_clock_gettime use.
1133 2011-09-05 David S. Miller <davem@davemloft.net>
1135 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1137 (sem_timedwait): Call it to force an exception region around
1138 the async cancel enable and the futex operation.
1139 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1140 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1141 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1142 (__new_sem_wait): Call it to force an exception region around
1143 the async cancel enable and the futex operation.
1144 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1145 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1147 2011-08-31 Andreas Schwab <schwab@redhat.com>
1149 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1152 2011-08-20 David S. Miller <davem@davemloft.net>
1154 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1156 2011-08-14 Roland McGrath <roland@hack.frob.com>
1158 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1159 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1161 2011-08-08 Andreas Schwab <schwab@redhat.com>
1163 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1165 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1166 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1168 2011-07-22 Ulrich Drepper <drepper@gmail.com>
1170 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1172 (__gcc_personality_v0): Likewise.
1173 (_Unwind_ForcedUnwind): Likewise.
1174 (_Unwind_GetCFA): Likewise.
1176 2011-07-14 Roland McGrath <roland@hack.frob.com>
1178 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1181 2011-06-30 Ulrich Drepper <drepper@gmail.com>
1183 * nptl-init.c (__nptl_set_robust): New function.
1184 (pthread_functions): Add reference.
1185 * npthreadP.h: Declare __nptl_set_robust.
1186 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1187 ptr_set_robust member.
1188 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1189 child if threads are used.
1191 2011-06-14 Andreas Jaeger <aj@suse.de>
1193 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1195 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1198 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1200 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1203 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1205 Patch partly by Robert Rex <robert.rex@exasol.com>.
1207 2011-01-19 Roland McGrath <roland@redhat.com>
1209 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1210 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1211 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1212 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1213 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1214 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1216 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1218 * Makefile (test-extras): Add tst-cleanup4aux.
1220 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1223 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1224 (__SETXID_2): Likewise.
1225 (__SETXID_3): Likewise.
1227 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1230 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1231 * alloca_cutoff.c: Add libc_hidden_def.
1233 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1236 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1237 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1238 of "struct pthread".
1240 2010-09-21 Andreas Schwab <schwab@redhat.com>
1242 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1243 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1244 (pthread_cleanup_push_defer_np): Likewise.
1246 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1248 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1251 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1252 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1254 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1255 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1257 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1259 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1261 2010-05-01 Alan Modra <amodra@gmail.com>
1263 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1264 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1265 to save temps. Correct cfi for possible later frame manipulation.
1266 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1267 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1268 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1269 (DOCARGS_6, UNDOCARGS_6): Likewise.
1270 (CENABLE, CDISABLE): Add nops for non-shared calls.
1272 2010-07-06 Andreas Schwab <schwab@redhat.com>
1274 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1277 2010-07-03 Ulrich Drepper <drepper@redhat.com>
1279 * tst-abstime.c (do_test): Some more cleanups
1281 2010-07-02 Ulrich Drepper <drepper@redhat.com>
1283 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1285 2010-07-01 Andreas Schwab <schwab@redhat.com>
1286 Ulrich Drepper <drepper@redhat.com>
1288 * Makefile (tests): Add tst-abstime.
1289 * tst-abstime.c: New file.
1290 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1291 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1292 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1293 (__lll_timedlock_wait): Likewise.
1294 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1295 (__lll_robust_timedlock_wait): Likewise.
1296 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1297 (__pthread_cond_timedwait): Likewise.
1298 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1299 (pthread_rwlock_timedrdlock): Likewise.
1300 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1301 (pthread_rwlock_timedwrlock): Likewise.
1302 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1305 2010-07-01 Ulrich Drepper <drepper@redhat.com>
1307 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1309 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1311 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1312 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1314 2010-04-09 Ulrich Drepper <drepper@redhat.com>
1317 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1318 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1319 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1321 * Makefile (libpthread-routines): Add pthread_getname and
1323 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1325 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1327 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1328 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1329 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1330 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1332 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1334 * pthread_cond_timedwait.c: Add check for
1335 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1336 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1339 2010-03-09 Ulrich Drepper <drepper@redhat.com>
1341 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1342 and the call fails wake eventually waiting setxid threads. Don't free
1343 stack here if we try starting a thread.
1344 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1345 if the clone call failed.
1347 2010-03-08 Andreas Schwab <schwab@redhat.com>
1349 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1350 * allocatestack.c (get_cached_stack): Set setxid_futex.
1351 (allocate_stack): Likewise.
1353 2010-03-05 Andreas Schwab <schwab@redhat.com>
1354 Ulrich Drepper <drepper@redhat.com>
1356 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1357 it is creating a thread or it is just being created.
1358 * pthread_create.c (start_thread): Wake setxid thread if it is
1360 (__pthread_create_2_1): Initialize setxid_futex.
1361 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1364 2010-01-15 Ulrich Drepper <drepper@redhat.com>
1366 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1368 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1370 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
1372 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1373 Fix pthread_cond_timedwait with requeue-PI.
1374 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1375 Fix pthread_cond_wait with requeue-PI.
1377 2010-01-14 Ulrich Drepper <drepper@redhat.com>
1379 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1380 and pthread_mutexattr_setrobust for GLIBC_2.12.
1381 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1382 * pthread_mutexattr_getrobust.c: Define alias
1383 pthread_mutexattr_getrobust.
1384 * pthread_mutexattr_setrobust.c: Define alias
1385 pthread_mutexattr_setrobust.
1387 2010-01-12 Ulrich Drepper <drepper@redhat.com>
1389 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1391 2010-01-08 Ulrich Drepper <drepper@redhat.com>
1393 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1395 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1397 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1398 call __gmon_start__.
1399 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1401 2009-12-17 Ulrich Drepper <drepper@redhat.com>
1403 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1406 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1408 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1409 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1410 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1411 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1412 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1413 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1414 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1415 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1417 2009-12-12 Ulrich Drepper <drepper@redhat.com>
1419 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1420 Don't update nwaiters after invalid timeout is recognized.
1422 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1424 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1427 2009-11-27 Andreas Schwab <schwab@redhat.com>
1429 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1430 THREAD_SELF->cancelhandling after returning from futex call.
1432 2009-11-24 Ulrich Drepper <drepper@redhat.com>
1434 * tst-sem13.c: New file.
1435 * Makefile (tests): Add tst-sem13.
1437 2009-11-22 Roland McGrath <roland@redhat.com>
1439 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1440 instead of recapitulating its contents.
1442 2009-11-18 Ulrich Drepper <drepper@redhat.com>
1444 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1445 optimizations and cleanups.
1447 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1449 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1450 Remove redundant code. Fix cfi offsets.
1451 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1454 2009-11-17 Ulrich Drepper <drepper@redhat.com>
1456 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1457 reduce size of unwind info.
1459 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1461 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1462 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1464 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1467 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1469 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1471 2009-10-30 Ulrich Drepper <drepper@redhat.com>
1473 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1476 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1477 steps to avoid races with creation and terminations.
1478 * nptl-init.c (sighandler_setxid): Adjust.
1479 Patch by Daniel Jacobowitz.
1481 2009-09-07 Andreas Schwab <schwab@redhat.com>
1483 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1485 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
1486 Joseph Myers <joseph@codesourcery.com>
1489 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1490 Initialize the sigev_notify field for newly created timer to make sure
1491 the timer gets deleted from the active timer's list upon timer_delete.
1493 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
1495 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1496 Correct a logic error.
1498 2009-08-25 Ulrich Drepper <drepper@redhat.com>
1500 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1501 of the field in local variables.
1502 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1503 variable and don't unconditionally clear it.
1505 2009-08-24 Ulrich Drepper <drepper@redhat.com>
1507 * pthread_create.c (start_thread): Hint to the kernel that memory for
1508 the stack can be reused. We do not mark all the memory. The part
1509 still in use and some reserve are kept.
1511 2009-08-23 Ulrich Drepper <drepper@redhat.com>
1513 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1515 2009-08-11 Ulrich Drepper <drepper@redhat.com>
1517 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1520 2009-08-10 Ulrich Drepper <drepper@redhat.com>
1522 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1524 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1526 2009-08-10 Andreas Schwab <schwab@redhat.com>
1528 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1529 (__pthread_cond_signal): Don't clobber register used for syscall
1532 2009-08-08 Ulrich Drepper <drepper@redhat.com>
1534 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1535 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1537 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1538 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1541 2009-08-07 Ulrich Drepper <drepper@redhat.com>
1543 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1544 enabled by the special *_asynccancel functions.
1545 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1546 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1548 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1550 2009-08-04 Ulrich Drepper <drepper@redhat.com>
1552 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1553 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1554 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1555 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1556 since we can assume the special __*_{en,dis}able_asynccancel
1558 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1559 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1560 and PTHREAD_CANCELED.
1562 2009-07-31 Ulrich Drepper <drepper@redhat.com>
1564 * descr.h: Better definition of *_BITMASK macros for cancellation.
1566 2009-07-29 Ulrich Drepper <drepper@redhat.com>
1568 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1570 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1571 dynamic linker might have to save.
1572 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1573 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1576 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1578 2009-07-28 Ulrich Drepper <drepper@redhat.com>
1580 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1582 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1583 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1584 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1585 requeue_pi for robust mutexes.
1586 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1587 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1588 Don't only skip __pthread_mutex_cond_lock. Call instead
1589 __pthread_mutex_cond_lock_adjust.
1590 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1592 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1593 optimization of PI mutex handling.
1595 2009-07-27 Ulrich Drepper <drepper@redhat.com>
1598 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1599 instead of of _acq variants of cmpxchg.
1601 2009-07-23 Ulrich Drepper <drepper@redhat.com>
1603 * sysdeps/x86_64/configure.in: New file.
1605 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1606 path when not using absolute timeout futex.
1608 2009-07-20 Ulrich Drepper <drepper@redhat.com>
1610 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1611 optimizations of last changes.
1612 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1614 2009-07-19 Ulrich Drepper <drepper@redhat.com>
1616 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1617 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1618 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1619 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1620 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1621 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1622 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1623 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1625 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1626 (__pthread_cond_timedwait): Make more robust.
1628 2009-07-18 Ulrich Drepper <drepper@redhat.com>
1630 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1631 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1632 directly use absolute timeout.
1634 * tst-sem5.c (do_test): Add test for premature timeout.
1635 * Makefile: Linu tst-sem5 with librt.
1637 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1638 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1639 directly use absolute timeout.
1640 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1641 (pthread_rwlock_timedrdlock): Likewise.
1643 * tst-cond11.c (run_test): Add test to check that the timeout is
1646 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1647 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1648 directly use absolute timeout.
1650 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1651 (__pthread_cond_wait): Convert to using exception handler instead of
1652 registered unwind buffer.
1653 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1654 (__pthread_cond_timedwait): Likewise.
1656 2009-07-17 Ulrich Drepper <drepper@redhat.com>
1658 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1659 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1660 use absolute timeout.
1662 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1663 handling of uncontested semaphore.
1665 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1666 (__condvar_cleanup): Rewrite to use cfi directives instead of
1667 hand-coded unwind tables.
1668 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1670 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1671 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1674 2009-06-12 Ulrich Drepper <drepper@redhat.com>
1676 * Makefile (libpthread-routines): Add pthread_sigqueue.
1677 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1678 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1679 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1681 2009-06-11 Ulrich Drepper <drepper@redhat.com>
1684 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1685 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1687 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1689 2009-05-16 Ulrich Drepper <drepper@redhat.com>
1691 * libc-cancellation.c: Move __libc_cleanup_routine to...
1692 * libc-cleanup.c: ...here. New file.
1693 * Makefile (routines): Add libc-cleanup.
1695 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1697 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1698 * sysdeps/pthread/librt-cancellation.c: Likewise.
1701 * nptl-init.c: Renamed from init.c.
1702 * Makefile: Change all occurences of init.c to nptl-init.c.
1704 2009-05-15 Ulrich Drepper <drepper@redhat.com>
1706 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1707 to test when deciding on the delay.
1708 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1709 * pthread_cancel.c: Close race between deciding on sending a signal
1710 and setting the CANCELING_BIT bit.
1712 * cancellation.c (__pthread_disable_asynccancel): Don't return if
1714 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1716 2009-04-27 Ulrich Drepper <drepper@redhat.com>
1718 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1720 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1721 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1722 * sysdeps/i386/tls.h: Likewise.
1723 (tcbhead_t): Add __private_tm member.
1725 2009-04-26 Ulrich Drepper <drepper@redhat.com>
1727 * sem_open.c (sem_open): Rewrite initialization of initsem to
1730 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1731 Avoid warning by using may_alias attribute on ptrhack.
1733 2009-04-22 Ulrich Drepper <drepper@redhat.com>
1736 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1737 Check policy and priority for validity.
1738 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1740 2009-03-15 Ulrich Drepper <drepper@redhat.com>
1742 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1743 (__pthread_cond_timedwait): Change to use cfi directives instead of
1744 hand-coded unwind sections.
1746 2009-03-10 Ulrich Drepper <drepper@redhat.com>
1748 * init.c (nptl_freeres): Compile only for SHARED.
1750 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1752 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1753 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1754 FUTEX_BITSET_MATCH_ANY.
1756 2009-02-27 Roland McGrath <roland@redhat.com>
1758 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1759 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1761 2009-02-26 Ulrich Drepper <drepper@redhat.com>
1763 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1764 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1765 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1768 2009-02-25 Ulrich Drepper <drepper@redhat.com>
1770 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1773 2009-02-24 Ulrich Drepper <drepper@redhat.com>
1775 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1776 Unify name of include protector macro.
1778 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1780 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1781 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1783 2009-01-29 Ulrich Drepper <drepper@redhat.com>
1785 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1788 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1789 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1790 * init.c (nptl_freeres): New function.
1791 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1792 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1793 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1795 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1796 load DSO. Assign last.
1797 (__unwind_freeres): New function.
1799 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1800 for better debugging. No need to use stack_list_add here.
1802 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1804 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1805 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1806 instead of computing relative timeout.
1807 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1808 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1810 2009-01-25 Ulrich Drepper <drepper@redhat.com>
1812 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1814 2009-01-08 Ulrich Drepper <drepper@redhat.com>
1816 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1817 (list_add_tail): Removed.
1819 2009-01-07 Ulrich Drepper <drepper@redhat.com>
1821 * (in_flight_stack): New variable.
1822 (stack_list_del): New function. Use instead of list_del.
1823 (stack_list_add): New function. Use instead of list_add when adding to
1824 stack_cache and stack_used lists.
1825 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1826 when the fork call interrupted another thread.
1828 2009-01-04 Ulrich Drepper <drepper@redhat.com>
1830 * init.c (__pthread_initialize_minimal_internal): Optimize test
1831 FUTEX_CLOCK_REALTIME a bit.
1833 2009-01-03 Ulrich Drepper <drepper@redhat.com>
1835 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1836 only passing five parameters to FUTEX_WAIT_BITSET call.
1838 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1839 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1840 instead of computing relative timeout.
1842 2009-01-02 Ulrich Drepper <drepper@redhat.com>
1844 * init.c (__pthread_initialize_minimal_internal): Check for
1845 FUTEX_CLOCK_REALTIME flag.
1846 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1847 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1850 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1851 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1852 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1853 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1854 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1855 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1857 2008-12-09 Ulrich Drepper <drepper@redhat.com>
1859 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1860 loop body instead of ; to avoid gcc warnings.
1861 (pthread_cleanup_pop_restore_np): Likewise.
1862 Patch by Caolán McNamara <caolanm@redhat.com>.
1864 2008-12-09 Jakub Jelinek <jakub@redhat.com>
1866 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1867 fast path here, for robust/PI/PP mutexes call
1868 __pthread_mutex_lock_full. Don't use switch, instead use a series
1869 of ifs according to their probability.
1870 (__pthread_mutex_lock_full): New function.
1871 * pthread_mutex_unlock.c: Include assert.h.
1872 (__pthread_mutex_unlock_usercnt): Handle only the
1873 fast path here, for robust/PI/PP mutexes call
1874 __pthread_mutex_unlock_full. Don't use switch, instead use a series
1875 of ifs according to their probability.
1876 (__pthread_mutex_unlock_full): New function.
1877 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1878 (__pthread_mutex_lock_full): Define.
1880 2008-12-08 Ulrich Drepper <drepper@redhat.com>
1882 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1883 implementation. Add necessary padding and.
1884 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1887 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1889 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1890 and FUTEX_WAKE_BITSET.
1892 2008-12-02 Ulrich Drepper <drepper@redhat.com>
1894 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1895 and FUTEX_WAKE_BITSET.
1896 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1897 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1898 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1899 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1901 2008-11-25 Roland McGrath <roland@redhat.com>
1903 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1904 Subdirectories moved to ports repository as
1905 sysdeps/.../nptl subdirectories.
1907 2008-11-12 Jakub Jelinek <jakub@redhat.com>
1910 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1912 * pthread_cond_init.c (__pthread_cond_init): Fix
1913 cond->__data.__nwaiters initialization.
1914 * Makefile (tests): Add tst-cond23.
1915 * tst-cond23.c: New test.
1917 2008-11-07 Jakub Jelinek <jakub@redhat.com>
1919 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1921 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1924 2008-11-01 Ulrich Drepper <drepper@redhat.com>
1927 * pthread_mutex_lock.c: Add support for private PI mutexes.
1928 * pthread_mutex_timedlock.c: Likewise.
1929 * pthread_mutex_trylock.c: Likewise.
1930 * pthread_mutex_unlock.c: Likewise.
1931 Patch mostly by Ben Jackson <ben@ben.com>.
1933 2008-10-31 Ulrich Drepper <drepper@redhat.com>
1936 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1937 Increase stack size for helper thread.
1939 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1941 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1942 assembly with a clobber list for access registers a0 and a1.
1944 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1946 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1947 to force runp->refcntr to be read from memory.
1949 2008-09-08 Richard Guenther <rguenther@suse.de>
1951 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1952 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1953 lll_timedlock, lll_robust_timedlock, lll_unlock,
1954 lll_robust_unlock): Promote private to int.
1956 2008-08-15 Ulrich Drepper <drepper@redhat.com>
1958 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1959 ARCH_RETRY_MMAP definitions.
1960 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1961 Define MAP_STACK when not defined.
1962 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
1963 handling of ARCH_RETRY_MMAP.
1965 2008-07-30 Ulrich Drepper <drepper@redhat.com>
1967 * tst-align2.c (f): Print message that f is reached.
1969 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
1972 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1973 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1975 2008-07-25 Ulrich Drepper <drepper@redhat.com>
1977 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1978 SOCK_CLOEXEC if possible.
1980 2008-05-29 Ulrich Drepper <drepper@redhat.com>
1982 * Makefile (tests): Add tst-rwlock2a.
1983 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1984 * tst-rwlock2a.c: New file.
1986 2008-06-12 Ulrich Drepper <drepper@redhat.com>
1988 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1990 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
1992 * sysdeps/pthread/pthread.h: Fix typo in comment.
1994 2008-05-28 Ulrich Drepper <drepper@redhat.com>
1996 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1997 of CPU set to the kernel.
1999 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2001 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2003 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2004 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2005 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2006 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2007 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2008 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2010 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
2012 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2014 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2016 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2018 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2021 2008-05-26 Ulrich Drepper <drepper@redhat.com>
2023 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2025 2008-05-20 Jakub Jelinek <jakub@redhat.com>
2027 David S. Miller <davem@davemloft.net>
2029 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2031 2008-05-10 Ulrich Drepper <drepper@redhat.com>
2033 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2034 __pshared correctly.
2035 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2037 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2039 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2041 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2043 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2045 2008-04-14 David S. Miller <davem@davemloft.net>
2047 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2048 (__old_sem_wait): Fix argument to lll_futex_wait().
2050 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2052 * pthread_create.c: Require pthread_mutex_trylock and
2053 pthread_key_delete for libgcc.
2055 2008-04-08 Jakub Jelinek <jakub@redhat.com>
2058 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2059 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2060 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2062 2008-03-27 Ulrich Drepper <drepper@redhat.com>
2064 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2065 <linux/limits.h> has defined it.
2066 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2067 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2068 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2069 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2071 2008-03-18 Jakub Jelinek <jakub@redhat.com>
2073 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2075 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2076 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2078 2008-03-14 Ulrich Drepper <drepper@redhat.com>
2080 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2081 HAVE_DL_DISCOVER_OSVERSION.
2082 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2083 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2085 2008-03-07 Ulrich Drepper <drepper@redhat.com>
2088 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2089 _POSIX_CHOWN_RESTRICTED value to zero.
2091 2008-01-31 Roland McGrath <roland@redhat.com>
2093 * Makefile (omit-deps): Variable removed.
2095 2008-01-30 Ulrich Drepper <drepper@redhat.com>
2097 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2098 unnecessary addr32 prefix.
2100 2008-01-29 Roland McGrath <roland@redhat.com>
2102 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2104 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2106 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2108 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2110 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2112 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2113 (__lll_lock_wait_private): Fix typo.
2114 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2115 (pthread_barrier_wait): Likewise. Adjust XADD use.
2116 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2118 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2119 (pthread_rwlock_timedrdlock): Return correct return value.
2120 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2121 (pthread_rwlock_timedwrlock): Likewise.
2123 2008-01-15 Ulrich Drepper <drepper@redhat.com>
2125 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2126 thread returns the program exits with an error code.
2128 2008-01-10 Ulrich Drepper <drepper@redhat.com>
2130 * pthread-errnos.sym: Add EOVERFLOW.
2131 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2132 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2133 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2134 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2136 2007-12-14 Ulrich Drepper <drepper@redhat.com>
2138 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2139 parameter. Passed it as permission to mmap.
2140 * allocatestack.c (allocate_stack): Pass prot as second parameter
2143 2007-12-12 Ulrich Drepper <drepper@redhat.com>
2145 * tst-basic7.c: Allocate memory for the stack.
2148 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2149 (__pthread_cond_timedwait): Don't use VDSO.
2150 Patch by Michal Januszewski.
2152 2007-12-07 Ulrich Drepper <drepper@redhat.com>
2155 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2156 Allow label before pthread_cleanup_pop.
2157 (pthread_cleanup_pop_restore_np): Likewise.
2159 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2161 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2162 Store 2 before returning ETIMEDOUT.
2164 2007-11-23 Ulrich Drepper <drepper@redhat.com>
2166 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2167 Store 2 before returning ETIMEDOUT.
2168 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2169 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2170 (__lll_lock_wait_private): Optimize.
2171 (__lll_lock_wait): Likewise.
2173 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2175 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2176 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2177 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2179 2007-11-08 Ulrich Drepper <drepper@redhat.com>
2182 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2183 If we time out, try one last time to lock the futex to avoid
2184 losing a wakeup signal.
2185 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2186 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2189 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2192 2007-11-07 Ulrich Drepper <drepper@redhat.com>
2195 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2196 mmap failed to EAGAIN.
2197 * Makefile (tests): Add tst-basic7.
2198 * tst-basic7.c: New file.
2200 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2202 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2203 Use __linkin_atfork.
2205 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2207 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2208 missing line continuations.
2209 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2210 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2212 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2215 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2216 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2217 (struct timer): Add next element.
2218 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2219 enqueue timer structure into __active_timer_sigev_thread list.
2220 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2221 remove timer struct from __active_timer_sigev_thread.
2222 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2223 Before using timer structure make sure it is still on the
2224 __active_timer_sigev_thread list. Keep lock until done.
2225 Define __active_timer_sigev_thread and
2226 __active_timer_sigev_thread_lock.
2228 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2230 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2231 Redefine thread_atfork for use of ATFORK_MEM.
2232 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2233 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2235 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2236 Use atomic operation when removing first element of list.
2238 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2240 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2241 routine instead of an alias to __new_sem_post.
2243 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2245 * init.c (__pthread_initialize_minimal): Initialize word to appease
2248 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2250 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2251 libc.so just clear NAME.
2252 (__libc_rwlock_fini): Nop inside of libc.so.
2253 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2256 2007-09-02 Ulrich Drepper <drepper@redhat.com>
2258 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2259 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2261 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2263 2007-08-21 Ulrich Drepper <drepper@redhat.com>
2266 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2267 reclaimed stack if necessary.
2268 * Makefile (tests): Add tst-tsd6.
2269 * tst-tsd6.c: New file.
2271 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2273 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2274 Add private argument.
2276 2007-08-20 Ulrich Drepper <drepper@redhat.com>
2278 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2279 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2281 2007-08-16 Jakub Jelinek <jakub@redhat.com>
2283 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2284 (__lll_robust_timedlock): Pass private as last argument to
2285 __lll_robust_timedlock_wait.
2286 (__lll_unlock): Fix a pasto.
2288 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2290 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2291 sparc_old_sem): New structs.
2292 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2293 (__sem_wait_cleanup): New function.
2294 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2295 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2296 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2298 (__old_sem_wait): New function.
2299 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2300 nptl/sysdeps/unix/sysv/linux/sparc version.
2301 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2303 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2304 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2305 (__new_sem_trywait): Use sparc_old_sem structure.
2306 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2307 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2308 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2309 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2310 lll_futex_timed_wait.
2311 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2312 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2313 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2315 (__old_sem_post): New function.
2316 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2317 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2318 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2319 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2320 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2321 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2323 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2325 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2326 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2327 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2328 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2329 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2330 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2331 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2333 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2334 kernel-features.h and tcb-offsets.h.
2335 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2336 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2338 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2340 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2341 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2343 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2344 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2345 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2346 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2347 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2348 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2349 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2351 2007-08-14 Jakub Jelinek <jakub@redhat.com>
2353 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2354 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2355 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2356 lll_futex_timed_wait.
2358 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2359 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2360 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2361 __lll_robust_unlock, __lll_wait_tid): Likewise.
2363 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2365 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2367 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2368 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2369 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2370 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2371 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2372 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2373 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2374 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2376 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2377 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2378 process private. Switch DW_CFA_advance_loc1 and some
2379 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2380 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2381 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2382 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2383 process private. Switch DW_CFA_advance_loc{1,2} and some
2384 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2385 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2386 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2387 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2389 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2390 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2391 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2393 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2394 (__pthread_cond_broadcast): Compare %r8 instead of
2395 dep_mutex-cond_*(%rdi) with $-1.
2396 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2397 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2400 2007-08-13 Ulrich Drepper <drepper@redhat.com>
2402 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2404 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2406 * allocatestack.c: Include kernel-features.h.
2407 * pthread_create.c: Likewise.
2408 * pthread_mutex_init.c: Likewise.
2410 * pthread_cond_timedwait.c: Likewise.
2411 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2412 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2413 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2414 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2415 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2416 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2417 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2419 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2421 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2422 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2423 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2424 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2426 2007-08-12 Jakub Jelinek <jakub@redhat.com>
2428 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2429 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2430 byte elements. One of them is the new __shared element.
2431 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2432 adjust names of other padding elements.
2433 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2434 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2435 byte elements. One of them is the new __shared element.
2436 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2437 adjust names of other padding elements.
2438 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2439 Renamed __pad1 element to __shared, adjust names of other padding
2441 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2442 (pthread_rwlock_t): Likewise.
2443 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2446 2007-08-09 Anton Blanchard <anton@samba.org>
2448 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2450 2007-08-12 Ulrich Drepper <drepper@redhat.com>
2452 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2453 <kernel-features.h>.
2454 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2456 2007-08-11 Ulrich Drepper <drepper@redhat.com>
2458 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2459 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2460 dealing with robust mutexes.
2461 * pthread_mutex_timedlock.c: Likewise.
2462 * pthread_mutex_trylock.c: Likewise.
2463 * pthread_mutex_unlock.c: Likewise.
2464 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2466 2007-08-06 Jakub Jelinek <jakub@redhat.com>
2468 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2469 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2470 (PTHREAD_MUTEX_PSHARED): Define.
2471 * pthread_mutex_init.c (__pthread_mutex_init): Set
2472 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2474 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2475 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2476 as second argument to lll_lock.
2477 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2478 instead of its __data.__lock field.
2479 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2480 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2482 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2483 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2484 instead of mutex->__data.__kind directly, pass
2485 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2486 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2487 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2488 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2489 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2490 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2491 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2492 of mutex->__data.__kind directly.
2493 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2494 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2495 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2496 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2497 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2498 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2500 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2501 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2502 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2504 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2505 Take mutex as argument instead of its __data.__lock field, pass
2506 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2507 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2508 __data.__lock field.
2509 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2510 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2511 to lll_robust_cond_lock.
2512 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2513 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2514 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2515 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2516 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2517 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2519 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2520 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2522 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2523 pshared variable, pass it to lll_lock, lll_unlock,
2524 lll_futex_timedwait and lll_futex_wake.
2525 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2526 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2528 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2529 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2531 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2532 lll_futex_wake_unlock): Likewise.
2533 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2535 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2536 lll_futex_wake_unlock): Likewise.
2537 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2539 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2540 lll_futex_wake_unlock): Likewise.
2541 (lll_futex_wake): Fix a typo.
2542 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2543 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2544 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2545 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2546 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2547 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2548 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2549 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2550 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2551 (__pthread_cond_timedwait): Likewise.
2552 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2553 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2555 2007-08-05 Jakub Jelinek <jakub@redhat.com>
2557 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2558 Don't use CGOTSETUP and CGOTRESTORE macros.
2559 (CGOTSETUP, CGOTRESTORE): Remove.
2560 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2563 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2565 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2566 definitions for private futexes.
2567 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2568 kernel-features.h and lowlevellock.h. Use private futexes if
2570 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2571 (__lll_mutex_lock_wait): Rename to
2572 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2573 (__lll_mutex_timedlock_wait): Rename to ...
2574 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2575 Don't compile in for libc.so.
2576 (__lll_mutex_unlock_wake): Rename to ...
2577 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2578 (__lll_timedwait_tid): Use __NR_gettimeofday.
2579 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2580 the header from assembler. Renamed all lll_mutex_* resp.
2581 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2582 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2583 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2585 (__lll_lock_wait_private): Add prototype.
2586 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2587 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2588 __lll_unlock_wake): Likewise.
2589 (lll_lock): Add private argument. Call __lll_lock_wait_private
2590 if private is constant LLL_PRIVATE.
2591 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2592 lll_timedlock, lll_robust_timedlock): Add private argument.
2593 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2594 if private is constant LLL_PRIVATE.
2595 (lll_robust_unlock, lll_robust_dead): Add private argument.
2596 (lll_lock_t): Remove.
2597 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2598 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2599 lll_cond_wake, lll_cond_broadcast): Remove.
2600 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2601 kernel-features.h and lowlevellock.h.
2602 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2603 (LOAD_FUTEX_WAIT): Define.
2604 (__lll_robust_mutex_lock_wait): Rename to ...
2605 (__lll_robust_lock_wait): ... this. Add private argument.
2606 Use LOAD_FUTEX_WAIT macro.
2607 (__lll_robust_mutex_timedlock_wait): Rename to ...
2608 (__lll_robust_timedlock_wait): ... this. Add private argument.
2609 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2610 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2612 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2613 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2614 __lll_mutex_{lock,unlock}_*.
2615 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2616 lowlevellock.h and pthread-errnos.h.
2617 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2618 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2619 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2620 __lll_mutex_{lock,unlock}_*.
2621 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2622 lowlevellock.h and pthread-errnos.h.
2623 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2624 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2625 __lll_mutex_{lock,unlock}_*.
2626 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2628 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2629 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2630 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2631 (__condvar_tw_cleanup): Likewise.
2632 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2634 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2635 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2636 __lll_mutex_{lock,unlock}_*.
2637 ( __condvar_w_cleanup): Likewise.
2638 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2639 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2640 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2642 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2643 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2644 __lll_mutex_{lock,unlock}_*.
2645 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2647 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2648 FUTEX_PRIVATE_FLAG): Remove.
2649 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2650 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2651 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2653 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2654 FUTEX_PRIVATE_FLAG): Remove.
2655 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2656 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2657 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2659 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2660 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2661 __lll_mutex_{lock,unlock}_*.
2662 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2664 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2665 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2666 __lll_mutex_{lock,unlock}_*.
2667 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2668 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2669 (__new_sem_post): Use standard initial exec code sequences.
2670 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2672 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2673 FUTEX_PRIVATE_FLAG): Remove.
2674 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2675 exec code sequences.
2676 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2677 (__new_sem_trywait): Use standard initial exec code sequences.
2678 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2679 (__new_sem_wait): Use standard initial exec code sequences.
2681 2007-07-31 Anton Blanchard <anton@samba.org>
2683 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2684 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2685 atomic_full_barrier.
2687 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2689 * allocatestack.c (stack_cache_lock): Change type to int.
2690 (get_cached_stack, allocate_stack, __deallocate_stack,
2691 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2692 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2693 as second argument to lll_lock and lll_unlock macros on
2695 * pthread_create.c (__find_in_stack_list): Likewise.
2696 (start_thread): Similarly with pd->lock. Use lll_robust_dead
2697 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2699 * descr.h (struct pthread): Change lock and setxid_futex field
2701 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2702 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2703 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2704 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2706 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2707 * pthread_cond_init.c (__pthread_cond_init): Likewise.
2708 * pthreadP.h (__attr_list_lock): Change type to int.
2709 * pthread_attr_init.c (__attr_list_lock): Likewise.
2710 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2711 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2713 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2714 also for lll_futex_{wake,wait}.
2715 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2717 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2718 LLL_SHARED as second argument to lll_{,un}lock.
2719 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2720 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2721 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2722 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2724 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2725 as second argument to lll_{,un}lock macros on pd->lock.
2726 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2727 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2728 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2729 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2731 * sysdeps/pthread/createthread.c (do_clone, create_thread):
2733 * pthread_once.c (once_lock): Change type to int.
2734 (__pthread_once): Pass LLL_PRIVATE as second argument to
2735 lll_{,un}lock macros on once_lock.
2736 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2737 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2738 rwlock->__data.__shared as second argument to them and similarly
2740 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2742 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2744 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2745 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2746 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2747 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2748 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2749 to lll_{,un}lock macros on __sem_mappings_lock.
2750 * sem_open.c (check_add_mapping): Likewise.
2751 (__sem_mappings_lock): Change type to int.
2752 * semaphoreP.h (__sem_mappings_lock): Likewise.
2753 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2754 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2755 instead of lll_*mutex_*, pass LLL_SHARED as last
2757 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2758 pass LLL_SHARED as last argument.
2759 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2760 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2761 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2762 pass LLL_SHARED as last argument.
2763 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2764 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2765 LLL_SHARED as last argument.
2766 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2767 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2769 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2770 __libc_lock_lock_recursive, __libc_lock_unlock,
2771 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2772 argument to lll_{,un}lock.
2773 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2774 _IO_lock_unlock): Likewise.
2775 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2777 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2778 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2780 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2781 free_mem): Likewise.
2782 (__fork_lock): Change type to int.
2783 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2784 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2785 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2787 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2788 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2789 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2791 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2792 pass it through to lll_futex_*wait, only compile in when
2794 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2795 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2796 argument and pass it through to lll_futex_*wait.
2797 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2798 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2799 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2800 inline functions to __lll_* resp. __lll_robust_*.
2801 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2802 (lll_mutex_dead): Add private argument.
2803 (__lll_lock_wait_private): New prototype.
2804 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2805 __lll_robust_lock_timedwait): Add private argument to prototypes.
2806 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2807 call __lll_lock_wait_private, otherwise pass private to
2809 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2810 __lll_robust_timedlock): Add private argument, pass it to
2811 __lll_*wait functions.
2812 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2813 call __lll_unlock_wake_private, otherwise pass private to
2815 (__lll_robust_unlock): Add private argument, pass it to
2816 __lll_robust_unlock_wake.
2817 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2818 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2819 argument, pass it through to __lll_* inline function.
2820 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2821 (lll_lock_t): Remove.
2822 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2823 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2824 lll_cond_wake, lll_cond_broadcast): Remove.
2825 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2826 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2827 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2828 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2829 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2830 the header from assembler. Renamed all lll_mutex_* resp.
2831 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2832 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2833 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2834 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2835 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2836 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2837 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2839 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2840 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2841 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2842 (lll_trylock): Likewise, use __lll_trylock_asm, pass
2843 MULTIPLE_THREADS_OFFSET as another asm operand.
2844 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2845 MULTIPLE_THREADS_OFFSET as last asm operand, call
2846 __lll_lock_wait_private if private is constant LLL_PRIVATE,
2847 otherwise pass private as another argument to __lll_lock_wait.
2848 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2849 lll_timedlock, lll_robust_timedlock): Add private argument, pass
2850 private as another argument to __lll_*lock_wait call.
2851 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2852 MULTIPLE_THREADS_OFFSET as another asm operand, call
2853 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2854 otherwise pass private as another argument to __lll_unlock_wake.
2855 (lll_robust_unlock): Add private argument, pass private as another
2856 argument to __lll_unlock_wake.
2857 (lll_robust_dead): Add private argument, use __lll_private_flag
2859 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2860 LLL_MUTEX_LOCK_INITIALIZER.
2861 (lll_lock_t): Remove.
2862 (LLL_LOCK_INITIALIZER_WAITERS): Define.
2863 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2864 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2865 lll_cond_wake, lll_cond_broadcast): Remove.
2866 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2867 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2868 2007-05-2{3,9} changes.
2869 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2870 kernel-features.h and lowlevellock.h.
2871 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2872 (LOAD_FUTEX_WAIT): Rewritten.
2873 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2875 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2876 (__lll_mutex_lock_wait): Rename to ...
2877 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
2878 %ecx, %ecx is now private argument. Don't compile in for libc.so.
2879 (__lll_mutex_timedlock_wait): Rename to ...
2880 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
2881 contains private argument. Don't compile in for libc.so.
2882 (__lll_mutex_unlock_wake): Rename to ...
2883 (__lll_unlock_wake): ... this. %ecx contains private argument.
2884 Don't compile in for libc.so.
2885 (__lll_timedwait_tid): Use __NR_gettimeofday.
2886 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2887 kernel-features.h and lowlevellock.h.
2888 (LOAD_FUTEX_WAIT): Define.
2889 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2891 (__lll_robust_mutex_lock_wait): Rename to ...
2892 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
2893 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
2895 (__lll_robust_mutex_timedlock_wait): Rename to ...
2896 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
2897 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2898 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2900 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2901 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2902 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2903 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2904 to __lll_lock_wait in %edx.
2905 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2906 Include lowlevellock.h and pthread-errnos.h.
2907 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2908 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2909 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2910 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2911 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2913 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2914 Include lowlevellock.h and pthread-errnos.h.
2915 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2916 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2917 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2918 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2919 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2921 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2922 Include lowlevellock.h.
2923 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2925 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2926 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2927 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2928 __lll_unlock_wake. Use __NR_gettimeofday.
2929 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2930 Include lowlevellock.h.
2931 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2932 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2933 to __lll_*, pass cond_lock address in %edx rather than %ecx to
2934 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2935 and __lll_unlock_wake.
2936 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2937 Include lowlevellock.h.
2938 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2939 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2940 MUTEX(%ebx) address in %edx rather than %ecx to
2941 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2942 and __lll_unlock_wake. Move return value from %ecx to %edx
2944 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2945 Include lowlevellock.h.
2946 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2948 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2949 MUTEX(%ebp) address in %edx rather than %ecx to
2950 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2951 and __lll_unlock_wake. Move return value from %ecx to %edx
2952 register. Use __NR_gettimeofday.
2953 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2954 Include lowlevellock.h.
2955 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2957 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2958 MUTEX(%ebp) address in %edx rather than %ecx to
2959 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2960 and __lll_unlock_wake. Move return value from %ecx to %edx
2961 register. Use __NR_gettimeofday.
2962 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2963 Include lowlevellock.h.
2964 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2965 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2966 MUTEX(%edi) address in %edx rather than %ecx to
2967 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2968 and __lll_unlock_wake.
2969 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2970 Include lowlevellock.h.
2971 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2972 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2973 MUTEX(%ebx) address in %edx rather than %ecx to
2974 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2975 and __lll_unlock_wake. Move return value from %ecx to %edx
2977 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2979 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2981 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2982 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2983 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2985 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2986 (sem_timedwait): Use __NR_gettimeofday.
2987 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2989 (LOCK): Don't define.
2990 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2992 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2993 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2995 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2996 2007-05-2{3,9} changes.
2997 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2998 kernel-features.h and lowlevellock.h.
2999 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3000 (LOAD_FUTEX_WAIT): Rewritten.
3001 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3002 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3003 (__lll_mutex_lock_wait): Rename to ...
3004 (__lll_lock_wait): ... this. %esi is now private argument.
3005 Don't compile in for libc.so.
3006 (__lll_mutex_timedlock_wait): Rename to ...
3007 (__lll_timedlock_wait): ... this. %esi contains private argument.
3008 Don't compile in for libc.so.
3009 (__lll_mutex_unlock_wake): Rename to ...
3010 (__lll_unlock_wake): ... this. %esi contains private argument.
3011 Don't compile in for libc.so.
3012 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3013 kernel-features.h and lowlevellock.h.
3014 (LOAD_FUTEX_WAIT): Define.
3015 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3016 (__lll_robust_mutex_lock_wait): Rename to ...
3017 (__lll_robust_lock_wait): ... this. %esi argument contains private.
3018 Use LOAD_FUTEX_WAIT macro.
3019 (__lll_robust_mutex_timedlock_wait): Rename to ...
3020 (__lll_robust_timedlock_wait): ... this. %esi argument contains
3021 private, use LOAD_FUTEX_WAIT macro.
3022 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3024 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3025 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3026 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3027 __lll_lock_wait and __lll_unlock_wake.
3028 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3029 Include lowlevellock.h and pthread-errnos.h.
3030 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3031 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3032 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3033 pass LLL_SHARED in %esi to both __lll_lock_wait and
3035 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3036 Include lowlevellock.h and pthread-errnos.h.
3037 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3038 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3039 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3040 pass LLL_SHARED in %esi to both __lll_lock_wait and
3042 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3043 Include lowlevellock.h.
3044 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3045 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3046 pass LLL_SHARED in %esi to both __lll_lock_wait and
3048 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3049 Include lowlevellock.h.
3050 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3051 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3052 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3053 and __lll_unlock_wake.
3054 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3055 Include lowlevellock.h.
3056 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3058 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3059 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3060 and __lll_unlock_wake.
3061 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3062 Include lowlevellock.h.
3063 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3065 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3066 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3067 and __lll_unlock_wake.
3068 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3069 Include lowlevellock.h.
3070 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3072 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3073 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3074 and __lll_unlock_wake.
3075 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3076 Include lowlevellock.h.
3077 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3079 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3080 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3081 and __lll_unlock_wake.
3082 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3083 Include lowlevellock.h.
3084 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3086 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3087 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3088 and __lll_unlock_wake.
3089 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3091 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3093 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3094 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3095 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3097 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3098 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3100 (LOCK): Don't define.
3101 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3103 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3104 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3105 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3106 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3107 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3108 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3109 (__lll_lock_wait_private): New function.
3110 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3111 it to lll_futex_*wait. Don't compile in for libc.so.
3112 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3114 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3115 (struct sparc_pthread_barrier): Remove.
3116 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3117 struct sparc_pthread_barrier. Pass
3118 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3119 and lll_futex_wait macros.
3120 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3122 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3123 Include sparc pthread_barrier_wait.c instead of generic one.
3125 2007-07-30 Jakub Jelinek <jakub@redhat.com>
3127 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3129 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3130 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3132 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3133 (pthread_rwlock_timedwrlock): Likewise.
3134 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3135 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3137 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3139 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3141 2007-07-26 Jakub Jelinek <jakub@redhat.com>
3143 * tst-locale2.c (useless): Add return statement.
3145 2007-07-24 Jakub Jelinek <jakub@redhat.com>
3147 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3148 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3149 * pthread_create.c (start_thread): Likewise.
3150 * init.c (sighandler_setxid): Likewise.
3151 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3152 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3153 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3154 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3155 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3156 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3157 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3158 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3159 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3161 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3163 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3165 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3166 __rtld_notify): Likewise.
3167 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3168 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3169 __pthread_once): Likewise.
3170 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3171 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3172 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3173 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3174 (lll_futex_wait): Add private argument, define as wrapper around
3175 lll_futex_timed_wait.
3176 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3177 use __lll_private_flag macro.
3178 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3179 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3180 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3181 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3182 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3183 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3184 (lll_futex_wait): Add private argument, define as wrapper around
3185 lll_futex_timed_wait.
3186 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3187 use __lll_private_flag macro.
3188 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3189 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3190 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3192 (lll_futex_timed_wait, lll_futex_wake): Use it.
3193 (lll_private_futex_wait, lll_private_futex_timed_wait,
3194 lll_private_futex_wake): Removed.
3195 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3196 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3197 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3198 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3199 (lll_futex_wait): Add private argument, define as wrapper around
3200 lll_futex_timed_wait.
3201 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3202 use __lll_private_flag macro.
3203 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3204 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3206 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3207 (lll_private_futex_wait, lll_private_futex_timed_wait,
3208 lll_private_futex_wake): Removed.
3209 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3210 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3211 (lll_private_futex_wait, lll_private_futex_timed_wait,
3212 lll_private_futex_wake): Removed.
3213 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3214 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3215 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3216 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3217 (lll_futex_wait): Add private argument, define as wrapper around
3218 lll_futex_timed_wait.
3219 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3220 use __lll_private_flag macro.
3221 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3222 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3224 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3226 (lll_futex_timed_wait, lll_futex_wake): Use it.
3227 (lll_private_futex_wait, lll_private_futex_timed_wait,
3228 lll_private_futex_wake): Removed.
3230 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3232 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3233 of the structure for sparc32.
3235 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3237 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3239 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3241 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3242 code used when private futexes are assumed.
3243 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3246 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3248 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3249 (__lll_private_flag): Define.
3250 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3251 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3253 (lll_private_futex_wait, lll_private_futex_timedwait,
3254 lll_private_futex_wake): Define as wrapper around non-_private
3256 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3257 (__lll_private_flag): Define.
3258 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3259 (lll_private_futex_wait, lll_private_futex_timedwait,
3260 lll_private_futex_wake): Define as wrapper around non-_private
3263 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3265 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3266 parameter to lll_futex_wait call.
3267 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3269 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3270 Replace lll_futex_wait with lll_private_futex_wait.
3271 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3272 Add LLL_SHARED parameter to lll_futex_wake().
3274 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3275 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3276 lll_private_futex_wake.
3277 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3278 bit from private parm before syscall.
3279 (lll_futex_timed_wait): Likewise.
3280 (lll_futex_wake): Likewise.
3281 (lll_futex_wake_unlock): Likewise.
3282 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3283 (lll_robust_mutex_unlock): Likewise.
3284 (lll_mutex_unlock_force): Likewise.
3285 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3287 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3289 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3290 compilation when unconditionally using private futexes.
3291 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3292 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3294 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3295 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3297 2007-07-17 Jakub Jelinek <jakub@redhat.com>
3299 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3302 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3304 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3307 2007-05-16 Roland McGrath <roland@redhat.com>
3309 * init.c (__nptl_initial_report_events): New variable.
3310 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3313 2007-06-22 Jakub Jelinek <jakub@redhat.com>
3315 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3316 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3318 2007-06-19 Ulrich Drepper <drepper@redhat.com>
3320 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3323 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3325 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3326 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3327 * pthread_mutex_timedlock.c: Likewise.
3328 * pthread_mutex_trylock.c: Likewise.
3329 * pthread_mutex_unlock.c: Likewise.
3331 2007-06-17 Andreas Schwab <schwab@suse.de>
3333 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3336 2007-06-17 Ulrich Drepper <drepper@redhat.com>
3338 * allocatestack.c (allocate_stack): Make code compile if
3339 __ASSUME_PRIVATE_FUTEX is set.
3341 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3343 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3344 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3345 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3346 (__pthread_rwlock_wrlock): Likewise.
3347 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3348 (pthread_rwlock_timedrdlock): Likewise.
3349 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3350 (pthread_rwlock_timedwrlock): Likewise.
3351 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3352 (__pthread_rwlock_unlock): Likewise.
3354 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3356 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3357 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3358 Split __flags into __flags, __shared, __pad1 and __pad2.
3359 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3360 futexes if they are available.
3361 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3362 in libc-lowlevellock.S allow using private futexes.
3363 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3364 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3365 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3366 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3367 lll_private_futex_timed_wait and lll_private_futex_wake.
3368 (lll_robust_mutex_unlock): Fix typo.
3369 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3370 field in futex command setup.
3371 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3372 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3373 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3374 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3375 if they are available. Remove clear_once_control.
3376 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3377 futexes if they are available.
3378 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3379 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3380 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3381 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3382 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3383 Wake only when there are waiters.
3384 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3385 support. Indicate that there are waiters. Remove unnecessary
3386 extra cancellation test.
3387 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3388 left-over duplication of __sem_wait_cleanup.
3390 2007-06-07 Ulrich Drepper <drepper@redhat.com>
3392 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3393 parameter to lll_futex_wait, lll_futex_timed_wait, and
3394 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3395 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3396 lll_private_futex_wake.
3397 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3398 * allocatestack.c: Adjust use of lll_futex_* macros.
3400 * lowlevellock.h: Likewise.
3401 * pthread_barrier_wait.c: Likewise.
3402 * pthread_cond_broadcast.c: Likewise.
3403 * pthread_cond_destroy.c: Likewise.
3404 * pthread_cond_signal.c: Likewise.
3405 * pthread_cond_timedwait.c: Likewise.
3406 * pthread_cond_wait.c: Likewise.
3407 * pthread_create.c: Likewise.
3408 * pthread_mutex_lock.c: Likewise.
3409 * pthread_mutex_setprioceiling.c: Likewise.
3410 * pthread_mutex_timedlock.c: Likewise.
3411 * pthread_mutex_unlock.c: Likewise.
3412 * pthread_rwlock_timedrdlock.c: Likewise.
3413 * pthread_rwlock_timedwrlock.c: Likewise.
3414 * pthread_rwlock_unlock.c: Likewise.
3415 * sysdeps/alpha/tls.h: Likewise.
3416 * sysdeps/i386/tls.h: Likewise.
3417 * sysdeps/ia64/tls.h: Likewise.
3418 * sysdeps/powerpc/tls.h: Likewise.
3419 * sysdeps/pthread/aio_misc.h: Likewise.
3420 * sysdeps/pthread/gai_misc.h: Likewise.
3421 * sysdeps/s390/tls.h: Likewise.
3422 * sysdeps/sh/tls.h: Likewise.
3423 * sysdeps/sparc/tls.h: Likewise.
3424 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3425 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3426 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3427 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3428 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3429 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3430 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3431 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3432 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3433 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3435 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3436 * sysdeps/x86_64/tls.h: Likewise.
3438 2007-05-29 Ulrich Drepper <drepper@redhat.com>
3440 * pthread_getattr_np.c: No need to install a cancellation handler,
3441 this is no cancellation point.
3442 * pthread_getschedparam.c: Likewise.
3443 * pthread_setschedparam.c: Likewise.
3444 * pthread_setschedprio.c: Likewise.
3445 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3447 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3448 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3449 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3450 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3451 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3452 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3453 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3454 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3455 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3456 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3457 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3458 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3460 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3461 whether there are more than one thread makes no sense here since
3462 we only call the slow path if the locks are taken.
3463 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3465 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3466 COND_NWAITERS_SHIFT.
3467 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3469 * pthread_cond_init.c: Likewise.
3470 * pthread_cond_timedwait.c: Likewise.
3471 * pthread_cond_wait.c: Likewise.
3472 * pthread_condattr_getclock.c: Likewise.
3473 * pthread_condattr_setclock.c: Likewise.
3474 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3475 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3476 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3477 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3478 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3480 2007-05-28 Jakub Jelinek <jakub@redhat.com>
3482 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3485 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3487 (THREAD_GSCOPE_GET_FLAG): Remove.
3488 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3489 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3491 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3492 (THREAD_GSCOPE_GET_FLAG): Remove.
3493 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3494 instead of THREAD_GSCOPE_GET_FLAG.
3495 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3497 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3498 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3499 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3500 THREAD_GSCOPE_WAIT): Define.
3501 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3502 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3503 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3504 THREAD_GSCOPE_WAIT): Define.
3505 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3506 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3507 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3508 THREAD_GSCOPE_WAIT): Define.
3509 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3510 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3511 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3512 THREAD_GSCOPE_WAIT): Define.
3514 2007-05-24 Richard Henderson <rth@redhat.com>
3516 * descr.h (struct pthread): Add header.gscope_flag.
3517 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3518 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3519 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3520 THREAD_GSCOPE_WAIT): Define.
3522 2007-05-27 Ulrich Drepper <drepper@redhat.com>
3524 * init.c: Make it compile with older kernel headers.
3526 * tst-initializers1.c: Show through exit code which test failed.
3528 * pthread_rwlock_init.c: Also initialize __shared field.
3529 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3530 element in rwlock structure into four byte elements. One of them is
3531 the new __shared element.
3532 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3534 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3535 __shared, adjust names of other padding elements.
3536 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3537 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3538 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3539 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3541 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3542 futex to use private operations if possible.
3543 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3545 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3547 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3548 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3549 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3550 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3552 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3554 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3555 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3557 2007-05-26 Ulrich Drepper <drepper@redhat.com>
3559 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3560 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3561 * pthread_rwlock_timedrdlock.c: Likewise.
3562 * pthread_rwlock_tryrdlock.c: Likewise.
3564 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3567 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3568 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3569 duplication of __sem_wait_cleanup.
3571 * allocatestack.c: Revert last change.
3573 * sysdeps/i386/tls.h: Likewise.
3574 * sysdeps/x86_64/tls.h: Likewise.
3575 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3577 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3579 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3581 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3582 * pthread_barrier_init.c: Set private flag if pshared and private
3583 futexes are supported.
3584 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3585 private field in futex command setup.
3586 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3588 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3590 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3592 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3593 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3594 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3595 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3596 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3598 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3599 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3600 fields in the structure.
3601 (__old_sem_init): New function.
3602 * sem_open.c: Initialize all fields of the structure.
3603 * sem_getvalue.c: Adjust for renamed element.
3604 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3605 (gen-as-const-headers): Add structsem.sym.
3606 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3607 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3608 struct new_sem. Add struct old_sem.
3609 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3610 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3611 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3612 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3613 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3614 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3615 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3616 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3617 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3618 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3619 * tst-sem10.c: New file.
3620 * tst-sem11.c: New file.
3621 * tst-sem12.c: New file.
3622 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3625 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3626 Jakub Jelinek <jakub@redhat.com>
3628 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3629 Move __pthread_enable_asynccancel right before futex syscall.
3630 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3633 2007-05-24 Jakub Jelinek <jakub@redhat.com>
3635 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3636 THREAD_COPY_PRIVATE_FUTEX): Define.
3637 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3638 THREAD_COPY_PRIVATE_FUTEX): Define.
3639 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3640 * init.c (__pthread_initialize_minimal_internal): Use
3641 THREAD_SET_PRIVATE_FUTEX.
3643 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3644 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3645 THREAD_GSCOPE_FLAG_WAIT): Define.
3646 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3647 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3648 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3650 (THREAD_GSCOPE_GET_FLAG): Define.
3651 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3652 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3653 instead of ->header.gscope_flag directly.
3655 2007-05-23 Ulrich Drepper <drepper@redhat.com>
3657 * init.c (__pthread_initialize_minimal_internal): Check whether
3658 private futexes are available.
3659 * allocatestack.c (allocate_stack): Copy private_futex field from
3660 current thread into the new stack.
3661 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3662 futexes if they are available.
3663 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3664 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3665 in libc-lowlevellock.S allow using private futexes.
3666 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3667 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3669 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3670 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3671 if they are available.
3672 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3673 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3674 * sysdeps/i386/tcb-offsets.sym: Likewise.
3675 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3676 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3678 2007-05-21 Ulrich Drepper <drepper@redhat.com>
3680 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3681 Remove ptr_wait_lookup_done again.
3682 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3683 (__pthread_initialize_minimal_internal): Initialize
3684 _dl_wait_lookup_done pointer in _rtld_global directly.
3685 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3686 Remove code to code _dl_wait_lookup_done.
3687 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3690 2007-05-21 Jakub Jelinek <jakub@redhat.com>
3692 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3693 pthread_mutex_init failed with ENOTSUP.
3695 2007-05-19 Ulrich Drepper <drepper@redhat.com>
3697 * allocatestack.c (__wait_lookup_done): New function.
3698 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3699 Add ptr_wait_lookup_done.
3700 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3701 * pthreadP.h: Declare __wait_lookup_done.
3702 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3703 Define macros to implement reference handling of global scope.
3704 * sysdeps/x86_64/tls.h: Likewise.
3705 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3706 Initialize GL(dl_wait_lookup_done).
3708 2007-05-17 Ulrich Drepper <drepper@redhat.com>
3711 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3713 * pthread_mutex_timedlock.c: Likewise.
3714 * pthread_mutex_trylock.c: Likewise.
3715 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3717 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3718 * tst-robust9.c: New file.
3719 * tst-robustpi9.c: New file.
3721 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3722 unnecessary extra cancellation test.
3724 2007-05-14 Ulrich Drepper <drepper@redhat.com>
3726 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3727 extra cancellation test.
3728 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3730 2007-05-10 Ulrich Drepper <drepper@redhat.com>
3732 * descr.h (struct pthread): Rearrange members to fill hole in
3735 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3736 (__pthread_setaffinity_new): If syscall was successful and
3737 RESET_VGETCPU_CACHE is defined, use it before returning.
3738 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3740 2007-05-10 Jakub Jelinek <jakub@redhat.com>
3743 * tst-align2.c: Include stackinfo.h.
3744 * tst-getpid1.c: Likewise.
3746 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
3749 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3750 * tst-getpid1.c (do_test): Likewise.
3753 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3754 (allocate_stack): Likewise.
3756 2007-05-07 Ulrich Drepper <drepper@redhat.com>
3758 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3759 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3760 (__lll_robust_timedlock_wait): Likewise.
3761 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3763 2007-05-06 Mike Frysinger <vapier@gentoo.org>
3766 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3767 * tst-cancel4.c (tf_fdatasync): New test.
3769 2007-04-27 Ulrich Drepper <drepper@redhat.com>
3772 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3773 check mutexes like normal mutexes.
3776 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3777 Initialize the whole sigevent structure to appease valgrind.
3779 2007-04-25 Ulrich Drepper <drepper@redhat.com>
3781 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3782 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3784 2007-04-06 Ulrich Drepper <drepper@redhat.com>
3786 * tst-locale1.c: Avoid warnings.
3787 * tst-locale2.c: Likewise.
3789 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3791 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3792 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3794 2007-03-16 Jakub Jelinek <jakub@redhat.com>
3796 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3797 __extern_always_inline where appropriate.
3798 * sysdeps/pthread/pthread.h: Likewise.
3800 2007-03-13 Richard Henderson <rth@redhat.com>
3802 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3803 separate cfi regions for the two subsections.
3805 2007-02-25 Ulrich Drepper <drepper@redhat.com>
3807 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3808 new thread, don't just decrement it.
3809 Patch by Suzuki K P <suzuki@in.ibm.com>.
3811 2007-02-21 Ulrich Drepper <drepper@redhat.com>
3813 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3814 PTHFCT_CALL definition.
3816 2007-02-18 Ulrich Drepper <drepper@redhat.com>
3818 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3819 available, don't use it.
3821 2007-02-09 Jakub Jelinek <jakub@redhat.com>
3823 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3824 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3825 call into the kernel to delay.
3827 2007-01-18 Ulrich Drepper <drepper@redhat.com>
3829 * tst-initializers1.c: We want to test the initializers as seen
3830 outside of libc, so undefined _LIBC.
3832 * pthread_join.c (cleanup): Avoid warning.
3834 2007-01-17 Ulrich Drepper <drepper@redhat.com>
3836 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3837 (__lll_timedwait_tid): Add unwind info.
3839 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3840 function table, mangle the pointers.
3841 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3842 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3843 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3844 demangle pointers before use.
3845 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3847 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3848 * sysdeps/pthread/setxid.h: Likewise.
3850 2007-01-12 Ulrich Drepper <drepper@redhat.com>
3852 * tst-rwlock7.c: Show some more information in case of correct
3855 2007-01-11 Ulrich Drepper <drepper@redhat.com>
3857 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3858 (lll_futex_timed_wait): Undo part of last change, don't negate
3861 2007-01-10 Ulrich Drepper <drepper@redhat.com>
3863 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
3864 FUTEX_CMP_REQUEUE and lll_futex_requeue.
3866 2006-12-28 David S. Miller <davem@davemloft.net>
3868 * shlib-versions: Fix sparc64 linux target specification.
3870 2007-01-10 Jakub Jelinek <jakub@redhat.com>
3872 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3873 Adjust include path for pthread_barrier_wait.c move.
3875 2006-12-21 Jakub Jelinek <jakub@redhat.com>
3877 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3878 tid isn't reread from pd->tid in between ESRCH test and the syscall.
3880 2006-12-06 Jakub Jelinek <jakub@redhat.com>
3882 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3883 6 argument cancellable syscalls.
3884 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3885 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3886 6 argument cancellable syscalls.
3887 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3889 2006-12-09 Ulrich Drepper <drepper@redhat.com>
3891 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3892 (__rtld_mrlock_initialize): Add missing closing parenthesis.
3894 2006-10-30 Jakub Jelinek <jakub@redhat.com>
3896 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3897 __sync_lock_release instead of __sync_lock_release_si.
3899 2006-10-29 Jakub Jelinek <jakub@redhat.com>
3901 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3903 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3904 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3905 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3906 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3907 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3908 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3909 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3910 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3911 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3912 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3913 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3915 2006-10-27 Ulrich Drepper <drepper@redhat.com>
3917 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3918 * pthread_barrier_wait.c: ...here.
3919 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3920 * pthread_cond_broadcast.c: ...here.
3921 * sysdeps/pthread/pthread_cond_signal.c: Move to...
3922 * pthread_cond_signal.c: ...here.
3923 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3924 * pthread_cond_timedwait.c: ...here.
3925 * sysdeps/pthread/pthread_cond_wait.c: Move to...
3926 * pthread_cond_wait.c: ...here.
3927 * sysdeps/pthread/pthread_once.c: Move to...
3928 * pthread_once.c: ...here.
3929 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3930 * pthread_rwlock_rdlock.c: ...here.
3931 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3932 * pthread_rwlock_timedrdlock.c: ...here.
3933 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3934 * pthread_rwlock_timedwrlock.c: ...here.
3935 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3936 * pthread_rwlock_unlock.c: ...here.
3937 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3938 * pthread_rwlock_wrlock.c: ...here.
3939 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3940 * pthread_spin_destroy.c: ...here.
3941 * sysdeps/pthread/pthread_spin_init.c: Move to...
3942 * pthread_spin_init.c: ...here.
3943 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3944 * pthread_spin_unlock.c: ...here.
3945 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3946 * pthread_getcpuclockid.c: ...here.
3948 * init.c: USE_TLS support is now always enabled.
3949 * tst-tls5.h: Likewise.
3950 * sysdeps/alpha/tls.h: Likewise.
3951 * sysdeps/i386/tls.h: Likewise.
3952 * sysdeps/ia64/tls.h: Likewise.
3953 * sysdeps/powerpc/tls.h: Likewise.
3954 * sysdeps/s390/tls.h: Likewise.
3955 * sysdeps/sh/tls.h: Likewise.
3956 * sysdeps/sparc/tls.h: Likewise.
3957 * sysdeps/x86_64/tls.h: Likewise.
3959 2006-10-27 Jakub Jelinek <jakub@redhat.com>
3961 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3962 __rtld_mrlock_change): Update oldval if atomic compare and exchange
3965 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3966 Define to THREAD_SELF->header.multiple_threads.
3967 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3969 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3971 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3972 (SINGLE_THREAD_P): Likewise.
3973 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3974 (SINGLE_THREAD_P): Likewise.
3975 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3976 (SINGLE_THREAD_P): Likewise.
3977 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3978 (SINGLE_THREAD_P): Likewise.
3979 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3981 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3982 (SINGLE_THREAD_P): Likewise.
3983 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3984 (SINGLE_THREAD_P): Likewise.
3985 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3988 2006-10-26 Jakub Jelinek <jakub@redhat.com>
3990 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3991 by default rather than 2_3_3.
3993 2006-10-17 Jakub Jelinek <jakub@redhat.com>
3995 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3996 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3997 atomic_* instead of catomic_* macros.
3999 2006-10-12 Ulrich Drepper <drepper@redhat.com>
4002 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4003 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4004 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4005 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4006 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4007 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4008 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4009 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4010 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4011 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4012 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4013 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4014 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4016 2006-10-11 Ulrich Drepper <drepper@redhat.com>
4018 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4019 cancelable syscalls with six parameters.
4021 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4022 operations instead of atomic_*.
4024 2006-10-09 Ulrich Drepper <drepper@redhat.com>
4026 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4028 2006-10-07 Ulrich Drepper <drepper@redhat.com>
4030 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4031 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4032 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4034 * pthread_attr_setstack.c: Allow overwriting the version number of the
4036 * pthread_attr_setstacksize.c: Likewise.
4037 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4039 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4040 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4042 2006-09-24 Ulrich Drepper <drepper@redhat.com>
4045 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4046 Patch by Petr Baudis.
4048 2006-09-18 Jakub Jelinek <jakub@redhat.com>
4050 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4052 * tst-cancel2.c (tf): Loop as long as something was written.
4054 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4056 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4057 mutexes wake all mutexes.
4058 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4059 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4060 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4062 2006-09-12 Ulrich Drepper <drepper@redhat.com>
4064 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4065 to guarantee the thread is always canceled.
4067 2006-09-08 Jakub Jelinek <jakub@redhat.com>
4069 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4071 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4072 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4073 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4074 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4075 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4077 2006-09-08 Ulrich Drepper <drepper@redhat.com>
4080 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4081 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4082 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4083 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4084 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4085 * Makefile (tests): Add tst-cond22.
4086 * tst-cond22.c: New file.
4088 2006-09-05 Ulrich Drepper <drepper@redhat.com>
4091 * descr.h (struct pthread): Add parent_cancelhandling.
4092 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4093 cancelhandling value to child.
4094 * pthread_create.c (start_thread): If parent thread was canceled
4095 reset the SIGCANCEL mask.
4096 * Makefile (tests): Add tst-cancel25.
4097 * tst-cancel25.c: New file.
4099 2006-09-05 Jakub Jelinek <jakub@redhat.com>
4100 Ulrich Drepper <drepper@redhat.com>
4102 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4103 counterp if it is already zero.
4104 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4106 2006-03-04 Jakub Jelinek <jakub@redhat.com>
4107 Roland McGrath <roland@redhat.com>
4109 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4110 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4111 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4112 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4113 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4114 lll_robust_mutex_timedlock, lll_mutex_unlock,
4115 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4116 Add _L_*_ symbols around the subsection.
4117 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4118 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4120 2006-03-03 Jakub Jelinek <jakub@redhat.com>
4121 Roland McGrath <roland@redhat.com>
4123 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4124 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4125 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4126 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4127 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4128 lll_robust_mutex_timedlock, lll_mutex_unlock,
4129 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4130 Add _L_*_ symbols around the subsection.
4131 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4132 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4134 2006-08-31 Ulrich Drepper <drepper@redhat.com>
4136 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4137 change because it can disturb too much existing code. If real hard
4138 reader preference is needed we'll introduce another type.
4139 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4140 (pthread_rwlock_timedwrlock): Likewise.
4141 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4144 2006-08-30 Ulrich Drepper <drepper@redhat.com>
4146 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4148 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4149 (pthread_rwlock_timedwrlock): Likewise.
4150 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4153 2006-08-25 Jakub Jelinek <jakub@redhat.com>
4155 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4156 Only define ifdef SHARED.
4158 2006-08-23 Ulrich Drepper <drepper@redhat.com>
4160 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4161 (free_stacks): ...here.
4162 (__free_stack_cache): New function.
4163 * pthreadP.h: Declare __free_stack_cache.
4164 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4166 * init.c (pthread_functions): Initialize ptr_freeres.
4167 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4168 New freeres function.
4170 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4173 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4175 2006-08-20 Ulrich Drepper <drepper@redhat.com>
4177 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4178 _XOPEN_REALTIME_THREADS.
4180 2006-08-15 Jakub Jelinek <jakub@redhat.com>
4182 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4183 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4184 HAVE_CLOCK_GETTIME_VSYSCALL.
4185 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4187 2006-08-14 Jakub Jelinek <jakub@redhat.com>
4189 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4190 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4191 * descr.h (struct priority_protection_data): New type.
4192 (struct pthread): Add tpp field.
4193 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4194 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4195 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4196 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4198 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4199 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4200 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4201 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4203 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4205 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4206 * pthread_mutexattr_getprioceiling.c
4207 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4208 in the SCHED_FIFO priority range.
4209 * pthread_mutexattr_setprioceiling.c
4210 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4211 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4212 if mutex is not TPP. Ceiling is now in __data.__lock.
4213 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4214 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4215 is now in __data.__lock. Add locking.
4216 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4217 * Makefile (libpthread-routines): Add tpp.
4218 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4219 * tst-tpp.h: New file.
4220 * tst-mutexpp1.c: New file.
4221 * tst-mutexpp6.c: New file.
4222 * tst-mutexpp10.c: New file.
4223 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4224 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4226 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4229 * pthread_join.c (pthread_join): Account for self being canceled
4230 when checking for deadlocks.
4231 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4232 (tf1): Don't print anything after pthread_join returns, this would be
4233 another cancellation point.
4235 * tst-join6.c: New file.
4236 * Makefile (tests): Add tst-join6.
4238 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4241 * pthread_setspecific.c (__pthread_setspecific): Check
4242 out-of-range index before checking for unused key.
4244 * sysdeps/pthread/gai_misc.h: New file.
4246 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4248 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4249 file. Don't use sysctl.
4250 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4251 overwrite the file if this is likely not true.
4253 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4255 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4256 * Makefile (tests): Add tst-getpid3.
4257 * tst-getpid3.c: New file.
4259 2006-07-30 Roland McGrath <roland@redhat.com>
4261 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4263 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4264 (pause_not_cancel): New macro.
4265 (nanosleep_not_cancel): New macro.
4266 (sigsuspend_not_cancel): New macro.
4267 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4268 nanosleep_not_cancel macro from <not-cancel.h>.
4269 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4270 macro from <not-cancel.h>.
4272 2006-07-28 Ulrich Drepper <drepper@redhat.com>
4273 Jakub Jelinek <jakub@redhat.com>
4275 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4276 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4277 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4278 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4279 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4280 * pthread_mutex_lock.c: Likewise.
4281 * pthread_mutex_timedlock.c: Likewise.
4282 * pthread_mutex_trylock.c: Likewise.
4283 * pthread_mutex_unlock.c: Likewise.
4284 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4286 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4287 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4288 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4289 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4290 pthread-pi-defines.sym.
4291 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4292 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4293 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4294 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4295 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4296 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4297 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4298 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4299 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4300 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4301 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4302 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4303 * tst-mutex2.c: Likewise.
4304 * tst-mutex3.c: Likewise.
4305 * tst-mutex4.c: Likewise.
4306 * tst-mutex5.c: Likewise.
4307 * tst-mutex6.c: Likewise.
4308 * tst-mutex7.c: Likewise.
4309 * tst-mutex7a.c: Likewise.
4310 * tst-mutex8.c: Likewise.
4311 * tst-mutex9.c: Likewise.
4312 * tst-robust1.c: Likewise.
4313 * tst-robust7.c: Likewise.
4314 * tst-robust8.c: Likewise.
4315 * tst-mutexpi1.c: New file.
4316 * tst-mutexpi2.c: New file.
4317 * tst-mutexpi3.c: New file.
4318 * tst-mutexpi4.c: New file.
4319 * tst-mutexpi5.c: New file.
4320 * tst-mutexpi6.c: New file.
4321 * tst-mutexpi7.c: New file.
4322 * tst-mutexpi7a.c: New file.
4323 * tst-mutexpi8.c: New file.
4324 * tst-mutexpi9.c: New file.
4325 * tst-robust1.c: New file.
4326 * tst-robust2.c: New file.
4327 * tst-robust3.c: New file.
4328 * tst-robust4.c: New file.
4329 * tst-robust5.c: New file.
4330 * tst-robust6.c: New file.
4331 * tst-robust7.c: New file.
4332 * tst-robust8.c: New file.
4333 * Makefile (tests): Add the new tests.
4335 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4336 * pthread_mutex_destroy.c: Remove unneeded label.
4338 2006-07-01 Ulrich Drepper <drepper@redhat.com>
4340 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4341 computations to compile time.
4343 2006-06-04 Ulrich Drepper <drepper@redhat.com>
4345 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4347 2006-05-15 Ulrich Drepper <drepper@redhat.com>
4349 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4351 2006-05-11 Ulrich Drepper <drepper@redhat.com>
4353 * pthread_key_create.c (__pthread_key_create): Do away with
4354 __pthread_keys_lock.
4356 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4357 (__kernel_cpumask_size): Mark as hidden.
4358 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4360 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4361 * semaphoreP.h (__sem_mappings_lock): Likewise.
4363 2006-05-10 Ulrich Drepper <drepper@redhat.com>
4365 * pthread_atfork.c: Mark __dso_handle as hidden.
4367 2006-05-09 Ulrich Drepper <drepper@redhat.com>
4370 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4371 the reload problem. Change the one path in pthread_cancel_init
4372 which causes the problem. Force gcc to reload. Simplify callers.
4373 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4374 (_Unwind_GetBSP): Undo last patch.
4376 2006-05-07 Ulrich Drepper <drepper@redhat.com>
4378 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4379 function pointer is reloaded after pthread_cancel_init calls.
4382 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4383 pointers are reloaded after pthread_cancel_init calls.
4385 2006-05-01 Ulrich Drepper <drepper@redhat.com>
4387 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4390 2006-04-27 Ulrich Drepper <drepper@redhat.com>
4392 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4393 Allocate new object which is passed to timer_sigev_thread so that
4394 the timer can be deleted before the new thread is scheduled.
4396 2006-04-26 Roland McGrath <roland@redhat.com>
4398 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4400 2006-04-08 Ulrich Drepper <drepper@redhat.com>
4402 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4403 suffix for conditional jumps.
4404 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4405 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4406 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4407 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4408 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4409 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4411 * init.c (sigcancel_handler): Compare with correct PID even if the
4412 thread is in the middle of a fork call.
4413 (sighandler_setxid): Likewise.
4414 Reported by Suzuki K P <suzuki@in.ibm.com> .
4416 2006-04-07 Jakub Jelinek <jakub@redhat.com>
4418 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4420 2006-04-06 Ulrich Drepper <drepper@redhat.com>
4422 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4423 fails [Coverity CID 105].
4425 2006-04-05 Ulrich Drepper <drepper@redhat.com>
4427 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4429 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4432 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4433 Define __lll_rel_instr using lwsync.
4435 2006-03-27 Ulrich Drepper <drepper@redhat.com>
4437 * allocatestack.c (allocate_stack): Always initialize robust_head.
4438 * descr.h: Define struct robust_list_head.
4439 (struct pthread): Use robust_list_head in robust mutex list definition.
4440 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4441 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4442 (__pthread_initialize_minimal_internal): Register robust_list with
4444 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4445 Declare __set_robust_list_avail.
4446 * pthread_create.c (start_thread): Register robust_list of new thread.
4447 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4449 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4450 number of users, it's unreliable.
4451 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4452 set_robust_list syscall is available.
4453 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4454 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4455 Set robust_head.list_op_pending before trying to lock a robust mutex.
4456 * pthread_mutex_timedlock.c: Likewise.
4457 * pthread_mutex_trylock.c: Likewise.
4458 * pthread_mutex_unlock.c: Likewise for unlocking.
4459 * Makefile (tests): Add tst-robust8.
4460 * tst-robust8.c: New file.
4462 2006-03-08 Andreas Schwab <schwab@suse.de>
4464 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4465 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4467 2006-03-05 Roland McGrath <roland@redhat.com>
4469 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4470 and $config_os doesn't match *linux*.
4472 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
4474 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4475 Use __syscall_error.
4476 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4477 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4478 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4479 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4480 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4481 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4483 2006-03-02 Ulrich Drepper <drepper@redhat.com>
4485 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4487 2006-03-01 Ulrich Drepper <drepper@redhat.com>
4489 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4490 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4492 (__lll_robust_timedlock_wait): Likewise.
4493 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4494 (__lll_robust_lock_wait): Likewise.
4495 (__lll_robust_timedlock_wait): Likewise.
4496 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4497 (__lll_robust_lock_wait): Likewise.
4498 (__lll_robust_timedlock_wait): Likewise.
4500 2006-03-01 Jakub Jelinek <jakub@redhat.com>
4502 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4503 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4504 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4505 lll_robust_mutex_unlock): Define.
4506 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4508 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4510 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4511 instead of <clone.S>.
4513 2006-02-27 Jakub Jelinek <jakub@redhat.com>
4515 * Makefile (libpthread-routines): Add
4516 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4517 and pthread_mutex_[sg]etprioceiling.
4518 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4519 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4520 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4521 pthread_mutex_setprioceiling.
4522 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4523 PTHREAD_PRIO_PROTECT): New enum values.
4524 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4525 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4526 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4528 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4529 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4530 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4532 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4533 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4534 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4535 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4536 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4537 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4538 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4540 * pthread_mutex_getprioceiling.c: New file.
4541 * pthread_mutex_setprioceiling.c: New file.
4542 * pthread_mutexattr_getprioceiling.c: New file.
4543 * pthread_mutexattr_setprioceiling.c: New file.
4544 * pthread_mutexattr_getprotocol.c: New file.
4545 * pthread_mutexattr_setprotocol.c: New file.
4547 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4549 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4551 2006-02-27 Roland McGrath <roland@redhat.com>
4553 * sysdeps/pthread/Subdirs: List nptl here too.
4554 * configure (libc_add_on_canonical): New variable.
4556 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4558 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4559 self to get main source tree's file.
4560 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4561 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4562 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4563 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4564 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4565 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4566 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4567 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4568 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4569 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4570 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4571 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4572 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4574 * Makefile: Use $(sysdirs) in vpath directive.
4576 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4577 (CPPFLAGS-timer_routines.c): Likewise.
4579 * Makeconfig (includes): Variable removed.
4581 2006-02-26 Roland McGrath <roland@redhat.com>
4583 * sysdeps/generic/pt-raise.c: Moved to ...
4584 * pt-raise.c: ... here.
4585 * sysdeps/generic/lowlevellock.h: Moved to ...
4586 * lowlevellock.h: ... here.
4588 2006-02-23 Roland McGrath <roland@redhat.com>
4590 * descr.h (struct pthread): Add final member `end_padding'.
4591 (PTHREAD_STRUCT_END_PADDING): Use it.
4593 2006-02-20 Roland McGrath <roland@redhat.com>
4595 * sysdeps/mips: Directory removed, saved in ports repository.
4596 * sysdeps/unix/sysv/linux/mips: Likewise.
4598 2006-02-18 Ulrich Drepper <drepper@redhat.com>
4600 * tst-robust1.c: Add second mutex to check that the mutex list is
4603 2006-02-17 Jakub Jelinek <jakub@redhat.com>
4605 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4606 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4607 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4608 lll_robust_mutex_unlock): New macros.
4609 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4610 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4611 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4612 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4613 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4615 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4617 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4619 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4621 2006-02-17 Ulrich Drepper <drepper@redhat.com>
4623 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4624 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4625 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4626 (lll_robust_mutex_unlock): Likewise.
4628 2006-02-13 Jakub Jelinek <jakub@redhat.com>
4630 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4631 Set robust_list.__next rather than robust_list.
4632 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4633 (__pthread_list_t): New typedef.
4634 (pthread_mutex_t): Replace __next and __prev fields with __list.
4635 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4636 (__pthread_list_t): New typedef.
4637 (pthread_mutex_t): Replace __next and __prev fields with __list.
4638 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4639 (__pthread_list_t, __pthread_slist_t): New typedefs.
4640 (pthread_mutex_t): Replace __next and __prev fields with __list.
4641 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4642 (__pthread_list_t, __pthread_slist_t): New typedefs.
4643 (pthread_mutex_t): Replace __next and __prev fields with __list.
4644 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4645 (__pthread_list_t, __pthread_slist_t): New typedefs.
4646 (pthread_mutex_t): Replace __next and __prev fields with __list.
4647 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4648 (__pthread_slist_t): New typedef.
4649 (pthread_mutex_t): Replace __next field with __list.
4651 2006-02-15 Ulrich Drepper <drepper@redhat.com>
4653 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4654 PTHREAD_MUTEX_OWNERDEAD.
4655 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4656 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4657 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4658 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4659 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4660 to PTHREAD_MUTEX_INCONSISTENT.
4661 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4662 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4663 * pthread_mutex_trylock.c: Likewise.
4664 * pthread_mutex_timedlock.c: Likewise.
4665 * pthread_mutex_unlock.c: Likewise.
4666 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4667 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4668 lowlevelrobustlock.sym.
4669 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4670 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4672 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4673 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4674 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4675 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4676 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4678 2006-02-12 Ulrich Drepper <drepper@redhat.com>
4680 * allocatestack.c (allocate_stack): Initialize robust_list.
4681 * init.c (__pthread_initialize_minimal_internal): Likewise.
4682 * descr.h (struct xid_command): Pretty printing.
4683 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4684 robust_list. Adjust macros.
4685 * pthread_create.c (start_thread): Adjust robust_list handling.
4686 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4687 but the owner for all robust mutex types.
4688 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4689 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
4690 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4691 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4693 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4694 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4696 2006-02-08 Jakub Jelinek <jakub@redhat.com>
4698 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4699 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4701 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4703 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4705 (lll_futex_timed_wait): Define.
4707 2006-01-19 Ulrich Drepper <drepper@redhat.com>
4709 * tst-cancel4.c: Test ppoll.
4711 2006-01-18 Andreas Jaeger <aj@suse.de>
4714 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4715 (pthread_mutex_t): Follow changes for other archs. Based on patch
4716 by Jim Gifford <patches@jg555.com>.
4718 2006-01-13 Richard Henderson <rth@redhat.com>
4720 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4722 2006-01-10 Roland McGrath <roland@redhat.com>
4724 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4725 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4726 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4727 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4728 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4729 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4730 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4731 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4732 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4733 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4735 2006-01-09 Roland McGrath <roland@redhat.com>
4737 * tst-initializers1-c89.c: New file.
4738 * tst-initializers1-c99.c: New file.
4739 * tst-initializers1-gnu89.c: New file.
4740 * tst-initializers1-gnu99.c: New file.
4741 * Makefile (tests): Add them.
4742 (CFLAGS-tst-initializers1-c89.c): New variable.
4743 (CFLAGS-tst-initializers1-c99.c): New variable.
4744 (CFLAGS-tst-initializers1-gnu89.c): New variable.
4745 (CFLAGS-tst-initializers1-gnu99.c): New variable.
4747 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4748 Use __extension__ on anonymous union definition.
4749 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4750 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4751 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4752 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4753 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4755 2006-01-08 Jakub Jelinek <jakub@redhat.com>
4757 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4758 Don't give the union a name because it changes the mangled name.
4759 Instead name the struct for __data.
4760 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4762 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4765 2006-01-09 Jakub Jelinek <jakub@redhat.com>
4767 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4768 stack bias to mc_ftp field.
4770 2006-01-07 Ulrich Drepper <drepper@redhat.com>
4772 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4773 being too clever and reloading the futex value where it shouldn't.
4775 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4777 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4780 2006-01-06 Jakub Jelinek <jakub@redhat.com>
4782 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4785 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4787 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4788 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4789 rename in tcbhead_t.
4791 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4792 Don't give the union a name because it changes the mangled name.
4793 Instead name the struct for __data.
4794 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4795 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4796 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4797 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4798 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4799 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4801 2006-01-05 Ulrich Drepper <drepper@redhat.com>
4803 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4805 (lll_futex_timed_wait): Define.
4806 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4807 * sysdeps/pthread/aio_misc.h: New file.
4809 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4811 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4813 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4815 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4816 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4817 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4819 2006-01-04 Ulrich Drepper <drepper@redhat.com>
4821 * tst-cancel24.cc: Use C headers instead of C++ headers.
4823 2006-01-03 Jakub Jelinek <jakub@redhat.com>
4825 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4826 sparc-linux configured glibc.
4827 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4828 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4829 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4830 atomic_compare_and_exchange_val_24_acq instead of
4831 atomic_compare_and_exchange_val_acq.
4832 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4833 instead of atomic_exchange_rel.
4834 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4835 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4837 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4839 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4840 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4841 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4842 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4843 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4844 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4846 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4848 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4849 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4850 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4852 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4854 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4856 2006-01-03 Ulrich Drepper <drepper@redhat.com>
4858 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4861 2006-01-02 Jakub Jelinek <jakub@redhat.com>
4863 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4864 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4865 THREAD_COPY_POINTER_GUARD): Define.
4866 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4867 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4869 2006-01-01 Ulrich Drepper <drepper@redhat.com>
4871 * version.c: Update copyright year.
4873 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4875 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4876 .eh_frame section, use cfi_* directives.
4877 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4879 2005-12-30 Ulrich Drepper <drepper@redhat.com>
4881 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4884 2005-12-29 Ulrich Drepper <drepper@redhat.com>
4886 * sysdeps/pthread/sigaction.c: Removed.
4887 * sigaction.c: New file.
4888 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4890 2005-12-28 Ulrich Drepper <drepper@redhat.com>
4892 * Makefile (tests): Add tst-signal7.
4893 * tst-signal7.c: New file.
4895 2005-12-27 Roland McGrath <roland@redhat.com>
4897 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4898 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4899 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4900 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4901 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4902 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4903 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4904 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4905 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4906 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4907 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4909 2005-12-27 Jakub Jelinek <jakub@redhat.com>
4911 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4912 and __prev field to pthread_mutex_t.
4913 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4914 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4915 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4916 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4917 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4920 2005-12-26 Ulrich Drepper <drepper@redhat.com>
4922 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4923 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4924 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4925 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4926 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4927 and PTHREAD_MUTEXATTR_FLAG_BITS.
4928 * descr.h (struct pthread): Add robust_list field and define
4929 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4930 * pthread_mutexattr_getrobust.c: New file.
4931 * pthread_mutexattr_setrobust.c: New file.
4932 * pthread_mutex_consistent.c: New file.
4933 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4934 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4935 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4936 Adjust pthread_mutex_t initializers.
4937 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4938 field to pthread_mutex_t.
4939 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4940 and __prev field to pthread_mutex_t.
4941 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4942 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4943 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4944 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4945 * pthread_mutexattr_gettype.c: Likewise.
4946 * pthread_mutexattr_setpshared.c: Likewise.
4947 * pthread_mutexattr_settype.c: Likewise.
4948 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4949 Initialize mutex kind according to robust flag.
4950 * pthread_mutex_lock.c: Implement local robust mutex.
4951 * pthread_mutex_timedlock.c: Likewise.
4952 * pthread_mutex_trylock.c: Likewise.
4953 * pthread_mutex_unlock.c: Likewise.
4954 * pthread_create.c (start_thread): Mark robust mutexes which remained
4956 * tst-robust1.c: New file.
4957 * tst-robust2.c: New file.
4958 * tst-robust3.c: New file.
4959 * tst-robust4.c: New file.
4960 * tst-robust5.c: New file.
4961 * tst-robust6.c: New file.
4962 * tst-robust7.c: New file.
4963 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4964 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4965 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4966 tst-robust5, tst-robust6, and tst-robust7.
4968 * tst-typesizes.c: New file.
4969 * Makefile (tests): Add tst-typesizes.
4971 * tst-once3.c: More debug output.
4973 2005-12-24 Ulrich Drepper <drepper@redhat.com>
4975 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4976 missing after last change.
4978 * version.c: Update copyright year.
4980 2005-12-23 Ulrich Drepper <drepper@redhat.com>
4982 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4983 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4984 * pthread_mutex_trylock.c: Likewise.
4985 * pthread_mutex_timedlock.c: Likewise.
4986 * pthread_mutex_unlock.c: Likewise.
4988 2005-12-22 Roland McGrath <roland@redhat.com>
4990 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4991 so that #include_next's search location is not reset to the -I..
4992 directory where <nptl/...> can be found.
4994 2005-12-22 Ulrich Drepper <drepper@redhat.com>
4997 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4998 Fix unwind info. Remove useless branch prediction prefix.
4999 * tst-cancel24.cc: New file.
5000 * Makefile: Add rules to build and run tst-cancel24.
5002 2005-12-21 Roland McGrath <roland@redhat.com>
5004 * libc-cancellation.c: Use <> rather than "" #includes.
5005 * pt-cleanup.c: Likewise.
5006 * pthread_create.c: Likewise.
5007 * pthread_join.c: Likewise.
5008 * pthread_timedjoin.c: Likewise.
5009 * pthread_tryjoin.c: Likewise.
5010 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5011 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5012 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5013 * unwind.c: Likewise.
5015 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5017 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5018 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5019 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5020 THREAD_COPY_POINTER_GUARD): Define.
5022 2005-12-19 Jakub Jelinek <jakub@redhat.com>
5024 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5026 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5027 THREAD_COPY_POINTER_GUARD): Define.
5028 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5029 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5030 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5031 THREAD_COPY_POINTER_GUARD): Define.
5032 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5033 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5034 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5035 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5036 Use PTR_DEMANGLE for B0 if defined.
5038 2005-12-17 Ulrich Drepper <drepper@redhat.com>
5040 * pthread_create.c (__pthread_create_2_1): Use
5041 THREAD_COPY_POINTER_GUARD if available.
5042 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5043 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5044 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5045 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5046 * sysdeps/x86_64/tls.h: Likewise.
5048 2005-12-15 Roland McGrath <roland@redhat.com>
5050 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5052 2005-12-13 Ulrich Drepper <drepper@redhat.com>
5054 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5056 * errno-loc.c: New file.
5058 2005-12-12 Roland McGrath <roland@redhat.com>
5060 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5061 adjustments before choosing stack size. Update minimum stack size
5062 calculation to match allocate_stack change.
5064 2005-12-12 Ulrich Drepper <drepper@redhat.com>
5066 * allocatestack.c (allocate_stack): Don't demand that there is an
5067 additional full page available on the stack beside guard, TLS, the
5070 2005-11-24 Ulrich Drepper <drepper@redhat.com>
5072 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5073 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5075 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5076 compiling 32-bit code we must define __cleanup_fct_attribute.
5078 005-11-24 Jakub Jelinek <jakub@redhat.com>
5081 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5082 __attribute__ instead of __attribute.
5083 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5084 (__cleanup_fct_attribute): Likewise.
5086 2005-11-17 Jakub Jelinek <jakub@redhat.com>
5088 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5089 a write barrier before writing libgcc_s_getcfa.
5091 2005-11-06 Ulrich Drepper <drepper@redhat.com>
5093 * sysdeps/unix/sysv/linux/configure: Removed.
5095 2005-11-05 Ulrich Drepper <drepper@redhat.com>
5097 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5098 optional init_array/fini_array support.
5100 2005-10-24 Roland McGrath <roland@redhat.com>
5102 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5103 versioned_symbol use.
5105 2005-10-16 Roland McGrath <roland@redhat.com>
5107 * init.c (__pthread_initialize_minimal_internal): Even when using a
5108 compile-time default stack size, apply the minimum that allocate_stack
5109 will require, and round up to page size.
5111 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5113 * Makefile ($(test-modules)): Remove static pattern rule.
5115 2005-10-14 Jakub Jelinek <jakub@redhat.com>
5116 Ulrich Drepper <drepper@redhat.com>
5118 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5119 alignment in callback function.
5120 * Makefile: Add rules to build and run tst-align3.
5121 * tst-align3.c: New file.
5123 2005-10-03 Jakub Jelinek <jakub@redhat.com>
5125 * allocatestack.c (setxid_signal_thread): Add
5126 INTERNAL_SYSCALL_DECL (err).
5128 2005-10-02 Jakub Jelinek <jakub@redhat.com>
5130 * allocatestack.c (setxid_signal_thread): Need to use
5131 atomic_compare_and_exchange_bool_acq.
5133 2005-10-01 Ulrich Drepper <drepper@redhat.com>
5134 Jakub Jelinek <jakub@redhat.com>
5136 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5138 (struct pthread): Move specific_used field to avoid padding.
5139 Add setxid_futex field.
5140 * init.c (sighandler_setxid): Reset setxid flag and release the
5142 * allocatestack.c (setxid_signal_thread): New function. Broken
5143 out of the bodies of the two loops in __nptl_setxid. For undetached
5144 threads check whether they are exiting and if yes, don't send a signal.
5145 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5146 * pthread_create.c (start_thread): For undetached threads, check
5147 whether setxid bit is set. If yes, wait until signal has been
5150 * allocatestack.c (STACK_VARIABLES): Initialize them.
5151 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5153 2004-09-02 Jakub Jelinek <jakub@redhat.com>
5155 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5156 waiters, awake all waiters on the associated mutex.
5158 2005-09-22 Roland McGrath <roland@redhat.com>
5160 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5161 ../sysdeps/x86_64/hp-timing.h).
5163 2005-08-29 Jakub Jelinek <jakub@redhat.com>
5165 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5166 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5167 (lll_futex_wake_unlock): Define.
5168 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5169 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5170 (lll_futex_wake_unlock): Define.
5171 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5172 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5173 (lll_futex_wake_unlock): Define.
5174 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5175 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5176 (lll_futex_wake_unlock): Define.
5177 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5178 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5179 (lll_futex_wake_unlock): Define.
5180 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5181 lll_futex_wake_unlock.
5182 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5183 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5184 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5185 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5186 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5187 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5189 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5191 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5192 Fix typo in register name.
5194 2005-08-23 Ulrich Drepper <drepper@redhat.com>
5196 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5197 Use __sigfillset. Document that sigfillset does the right thing wrt
5200 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5203 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5204 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5205 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5206 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5207 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5208 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5210 * Makefile (tests): Add tst-initializers1.
5211 (CFLAGS-tst-initializers1.c): Set.
5212 * tst-initializers1.c: New test.
5214 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5216 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5217 Make sure __flags are located at offset 48 from the start of the
5220 2005-07-02 Roland McGrath <roland@redhat.com>
5222 * Makeconfig: Comment fix.
5224 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5226 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5227 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5228 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5229 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5230 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5231 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5232 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5233 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5234 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5235 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5237 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5239 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5240 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5241 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5243 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5244 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5245 field. Put in sysinfo field unconditionally.
5246 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5247 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5248 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5249 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5251 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5252 * pthread_create.c (__pthread_create_2_1): Use
5253 THREAD_COPY_STACK_GUARD macro.
5254 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5256 * tst-stackguard1.c: New file.
5257 * tst-stackguard1-static.c: New file.
5259 2005-06-14 Alan Modra <amodra@bigpond.net.au>
5261 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5262 Invoke CGOTSETUP and CGOTRESTORE.
5263 (CGOTSETUP, CGOTRESTORE): Define.
5265 2005-05-29 Richard Henderson <rth@redhat.com>
5267 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5268 (tf_write, tf_writev): Use it.
5269 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5272 2005-05-23 Jakub Jelinek <jakub@redhat.com>
5274 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5275 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5276 __librt_*_asynccancel@local.
5278 2005-05-17 Alan Modra <amodra@bigpond.net.au>
5280 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5281 all occurrences of JUMPTARGET. Instead append @local to labels.
5283 2005-05-20 Jakub Jelinek <jakub@redhat.com>
5285 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5286 size/alignment of struct pthread rather than tcbhead_t.
5287 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5289 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5291 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5294 2005-05-19 Richard Henderson <rth@redhat.com>
5296 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5297 __sync_val_compare_and_swap, not explicit _si variant.
5298 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5300 2005-05-03 Ulrich Drepper <drepper@redhat.com>
5303 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5305 2005-05-03 Jakub Jelinek <jakub@redhat.com>
5307 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5308 .eh_frame section, use cfi_* directives.
5310 2005-04-27 Jakub Jelinek <jakub@redhat.com>
5312 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5315 2005-04-27 Ulrich Drepper <drepper@redhat.com>
5318 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5321 2005-04-27 Roland McGrath <roland@redhat.com>
5323 * Makefile (tests): Remove tst-clock2.
5325 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5326 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5327 translating to the kernel clockid_t for our own process/thread clock.
5329 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5331 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5333 * old_pthread_cond_init.c: Include <errno.h>.
5334 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5335 process shared or uses clock other than CLOCK_REALTIME.
5336 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5338 2005-04-13 David S. Miller <davem@davemloft.net>
5340 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5341 * sysdeps/sparc/sparc64/clone.S: New file.
5343 2005-04-05 Jakub Jelinek <jakub@redhat.com>
5346 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5347 __inline instead of inline.
5348 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5350 2005-03-31 Jakub Jelinek <jakub@redhat.com>
5352 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5353 functionally equivalent, but shorter instructions.
5354 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5355 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5356 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5358 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5359 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5360 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5361 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5362 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5363 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5364 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5366 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5367 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5368 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5369 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5370 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5372 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5374 * sysdeps/mips/Makefile: New file.
5375 * sysdeps/mips/nptl-sysdep.S: New file.
5376 * sysdeps/mips/tcb-offsets.sym: New file.
5377 * sysdeps/mips/pthread_spin_lock.S: New file.
5378 * sysdeps/mips/pthread_spin_trylock.S: New file.
5379 * sysdeps/mips/pthreaddef.h: New file.
5380 * sysdeps/mips/tls.h: New file.
5381 * sysdeps/mips/jmpbuf-unwind.h: New file.
5382 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5383 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5384 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5385 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5386 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5387 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5388 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5389 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5390 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5391 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5393 2005-03-23 Ulrich Drepper <drepper@redhat.com>
5396 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5399 2005-03-10 Jakub Jelinek <jakub@redhat.com>
5401 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5403 2005-02-25 Roland McGrath <roland@redhat.com>
5405 * alloca_cutoff.c: Correct license text.
5406 * tst-unload.c: Likewise.
5407 * sysdeps/pthread/allocalim.h: Likewise.
5408 * sysdeps/pthread/pt-initfini.c: Likewise.
5409 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5410 * sysdeps/pthread/bits/sigthread.h: Likewise.
5411 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5412 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5414 2005-02-16 Roland McGrath <roland@redhat.com>
5416 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5417 Use unsigned int * for ptr_nthreads.
5419 2005-02-14 Alan Modra <amodra@bigpond.net.au>
5422 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5425 2005-02-07 Richard Henderson <rth@redhat.com>
5428 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5431 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
5433 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5434 order of arguments in invocation of atomic_add_zero.
5436 2005-01-26 Jakub Jelinek <jakub@redhat.com>
5439 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5440 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5441 at least gotntpoff relocation and addition.
5442 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5444 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5446 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5449 2005-01-06 Ulrich Drepper <drepper@redhat.com>
5451 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5452 entry for static tls deallocation fix.
5453 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5454 also contains information whether the memory pointed to is static
5456 * sysdeps/i386/tls.h: Likewise.
5457 * sysdeps/ia64/tls.h: Likewise.
5458 * sysdeps/powerpc/tls.h: Likewise.
5459 * sysdeps/s390/tls.h: Likewise.
5460 * sysdeps/sh/tls.h: Likewise.
5461 * sysdeps/sparc/tls.h: Likewise.
5462 * sysdeps/x86_64/tls.h: Likewise.
5464 2004-12-27 Ulrich Drepper <drepper@redhat.com>
5466 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5468 2004-12-21 Jakub Jelinek <jakub@redhat.com>
5470 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5472 * Makefile (tests): Add tst-align2.
5473 * tst-align2.c: New test.
5474 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5475 -mpreferred-stack-boundary=4.
5477 2004-12-18 Roland McGrath <roland@redhat.com>
5479 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5480 New file removed withdrawn for the moment.
5482 2004-12-17 Richard Henderson <rth@redhat.com>
5484 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5485 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5487 2004-12-16 Ulrich Drepper <drepper@redhat.com>
5489 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5490 Increased PTHREAD_STACK_MIN.
5492 * tst-context1.c (stacks): Use bigger stack size.
5494 2004-12-16 Jakub Jelinek <jakub@redhat.com>
5496 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5497 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5499 2004-12-15 Jakub Jelinek <jakub@redhat.com>
5501 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5502 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5503 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5505 2004-12-15 Ulrich Drepper <drepper@redhat.com>
5507 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5509 2004-12-14 Ulrich Drepper <drepper@redhat.com>
5511 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5512 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5514 * tst-getpid1.c: If child crashes, report this first. Print which
5517 2004-12-09 Ulrich Drepper <drepper@redhat.com>
5519 * init.c (__pthread_initialize_minimal_internal): Also unblock
5522 2004-12-01 Jakub Jelinek <jakub@redhat.com>
5524 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5525 _POSIX_THREAD_CPUTIME): Define to 0.
5526 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5527 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5528 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5529 __timer_signal_thread_tclk): Remove.
5530 (init_module): Remove their initialization.
5531 (thread_cleanup): Remove their cleanup assertions.
5532 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5533 __timer_signal_thread_tclk): Remove.
5534 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5535 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5536 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5538 2004-12-07 Jakub Jelinek <jakub@redhat.com>
5540 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5541 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5543 * Makefile (tests): Add tst-getpid2.
5544 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5545 (do_test): Use it. Use __clone2 instead of clone on ia64.
5546 * tst-getpid2.c: New test.
5548 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5550 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5552 2004-12-04 Ulrich Drepper <drepper@redhat.com>
5554 * Makefile (tests): Add tst-getpid1.
5555 * tst-getpid1.c: New file.
5556 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5557 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5559 2004-12-02 Roland McGrath <roland@redhat.com>
5561 * Makefile (libpthread-nonshared): Variable removed.
5562 ($(objpfx)libpthread_nonshared.a): Target removed.
5563 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5564 These are now handled by generic magic from
5565 libpthread-static-only-routines being set.
5567 2004-11-27 Ulrich Drepper <drepper@redhat.com>
5569 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5570 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5571 _POSIX_THREAD_PRIO_PROTECT): Define.
5572 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5573 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5574 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5576 2004-11-26 Jakub Jelinek <jakub@redhat.com>
5578 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5579 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5580 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5581 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5582 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5583 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5584 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5586 2004-11-24 Ulrich Drepper <drepper@redhat.com>
5588 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5590 * Makefile (libpthread-routines): Add pthread_setschedprio.
5591 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5592 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5593 * pthread_setschedprio.c: New file.
5595 2004-11-20 Jakub Jelinek <jakub@redhat.com>
5597 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5598 * pthread_cancel.c (pthread_create): Likewise.
5600 * Makefile (libpthread-routines): Add vars.
5601 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5602 * init.c (__default_stacksize, __is_smp): Remove.
5604 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5605 and define a wrapper macro.
5606 (PTHREAD_STATIC_FN_REQUIRE): Define.
5607 * allocatestack.c (__find_thread_by_id): Undefine.
5608 * pthread_create (__pthread_keys): Remove.
5609 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5610 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5611 PTHREAD_STATIC_FN_REQUIRE.
5613 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5615 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5616 parameter to REGISTER macro.
5618 2004-11-17 Roland McGrath <roland@redhat.com>
5620 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5621 Make sure SIGCANCEL is blocked as well.
5623 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5625 * sysdeps/pthread/setxid.h: New file.
5626 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5627 (struct xid_command): Add forward decl.
5628 (struct pthread_functions): Change return type of __nptl_setxid hook
5630 * pthreadP.h (__nptl_setxid): Change return type to int.
5631 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5632 calling thread, return its return value and set errno on failure.
5633 * descr.h (struct xid_command): Change id type to long array.
5635 * Makefile: Add rules to build and test tst-setuid1 and
5637 * tst-setuid1.c: New test.
5638 * tst-setuid1-static.c: New test.
5640 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5642 * Makefile (tests): Add tst-exit3.
5643 * tst-exit3.c: New test.
5645 2004-11-09 Ulrich Drepper <drepper@redhat.com>
5647 * Makefile (tests): Add tst-exit2.
5648 * tst-exit2.c: New file.
5650 2004-11-09 Roland McGrath <roland@redhat.com>
5653 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5654 here, before calling clone.
5655 * pthread_create.c (start_thread): Don't do it here.
5657 2004-11-02 Jakub Jelinek <jakub@redhat.com>
5659 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5661 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5663 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5664 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5667 2004-10-28 Jakub Jelinek <jakub@redhat.com>
5669 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5670 if sched_priority is not between minprio and maxprio.
5672 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5674 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5675 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5677 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5678 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5680 2004-10-24 Ulrich Drepper <drepper@redhat.com>
5682 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5683 not-cancelable I/O functions.
5685 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5687 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5688 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5689 make sure 2 is stored in the futex and we looked at the old value.
5690 Fix a few other problems to return the correct value.
5692 2004-10-14 Richard Henderson <rth@redhat.com>
5694 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5697 2004-10-06 Jakub Jelinek <jakub@redhat.com>
5699 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5700 of pthread-functions.h and pthreaddef.h.
5701 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5703 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5704 Change __data.__nwaiters from int to unsigned int.
5706 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5707 sysconf (_SC_THREAD_CPUTIME) returns negative value.
5709 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5712 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5713 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5715 2004-10-06 Ulrich Drepper <drepper@redhat.com>
5717 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
5718 test fails, remove message queue.
5719 (tf_msgsnd): Likewise.
5721 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5723 * tst-clock1.c: Change #ifdef to #if defined.
5724 * tst-clock2.c: Likewise.
5725 * tst-cond11.c: Likewise.
5727 * sysdeps/pthread/timer_create.c (timer_create): Use
5728 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5729 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5732 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5734 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5735 _POSIX_THREAD_CPUTIME): Define to 0.
5737 2004-10-04 Ulrich Drepper <drepper@redhat.com>
5739 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5740 and _POSIX_THREAD_CPUTIME to zero.
5741 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5742 * tst-barrier2.c: Fix testing for POSIX feature.
5743 * tst-clock1.c: Likewise.
5744 * tst-clock2.c: Likewise.
5745 * tst-cond11.c: Likewise.
5746 * tst-cond4.c: Likewise.
5747 * tst-cond6.c: Likewise.
5748 * tst-flock2.c: Likewise.
5749 * tst-mutex4.c: Likewise.
5750 * tst-mutex9.c: Likewise.
5751 * tst-rwlock12.c: Likewise.
5752 * tst-rwlock4.c: Likewise.
5753 * tst-signal1.c: Likewise.
5754 * tst-spin2.c: Likewise.
5755 * sysdeps/pthread/posix-timer.h: Likewise.
5756 * sysdeps/pthread/timer_create.c: Likewise.
5757 * sysdeps/pthread/timer_routines.c: Likewise.
5759 2004-10-01 Ulrich Drepper <drepper@redhat.com>
5761 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5762 (__lll_mutex_timedlock_wait): Address futex correctly.
5764 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5765 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5766 make sure 2 is stored in the futex and we looked at the old value.
5767 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5768 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5769 which might very well made the code not working at all before.
5772 2004-09-28 Ulrich Drepper <drepper@redhat.com>
5774 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5775 allow SIGSETXID to be sent.
5776 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5777 for SIGSETXID to be defined.
5778 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5779 SIGSETXID cannot be blocked.
5781 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5782 Add __extension__ to long long types.
5783 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5784 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5785 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5786 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5787 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5788 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5789 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5791 2004-09-25 Ulrich Drepper <drepper@redhat.com>
5793 * descr.h (struct pthread): Add stopped_start field.
5794 * sysdeps/pthread/createthread.c (create_thread): Set
5795 start_stopped flag in descriptor for new thread appropriately.
5796 * pthread_create.c (start_thread): Only take lock to be stopped on
5797 startup if stopped_start flag says so.
5799 2004-09-24 Ulrich Drepper <drepper@redhat.com>
5801 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5802 is created detached and if yes, do not try to free the stack in case
5803 the thread creation failed.
5804 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5805 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5806 case there has been no error. [BZ #405]
5808 * pthread_create.c (start_thread): Don't wait for scheduler data
5809 etc to be set at the beginning of the function. The cancellation
5810 infrastructure must have been set up. And enable async
5811 cancellation before potentially going to sleep. [BZ #401]
5813 2004-09-20 Ulrich Drepper <drepper@redhat.com>
5815 * Versions: Remove exports for pthread_set*id_np functions.
5816 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5818 * Makefile: Don't build pthread_set*id code for now.
5820 2004-09-19 Ulrich Drepper <drepper@redhat.com>
5822 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5824 * allocatestack.c (__nptl_setxid): New function.
5825 * descr.h (struct xid_command): Define type.
5826 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5827 (sighandler_setxid): New function.
5828 (__pthread_initialize_minimal): Register sighandler_setxid for
5830 * pt-allocrtsig.c: Update comment.
5831 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
5832 Declare __nptl_setxid.
5833 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5834 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5835 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5836 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5837 and pthread_setresuid_np.
5838 * pthread_setgid_np.c: New file.
5839 * pthread_setuid_np.c: New file.
5840 * pthread_setegid_np.c: New file.
5841 * pthread_seteuid_np.c: New file.
5842 * pthread_setregid_np.c: New file.
5843 * pthread_setreuid_np.c: New file.
5844 * pthread_setresgid_np.c: New file.
5845 * pthread_setresuid_np.c: New file.
5846 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5847 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5848 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5849 and pthread_setresuid_np.
5850 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5851 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5852 pthread_setregid, and pthread_setresgid.
5854 2004-09-18 Ulrich Drepper <drepper@redhat.com>
5856 * allocatestack.c (allocate_stack): Return EAGAIN instead of
5857 ENOMEM when out of memory.
5859 2004-09-10 Roland McGrath <roland@redhat.com>
5862 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5863 code, since we don't try to use the broken CLONE_STOPPED any more.
5864 * pthread_create.c (start_thread): Likewise.
5866 2004-09-15 Richard Henderson <rth@redhat.com>
5868 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5870 2004-09-01 David Mosberger <davidm@hpl.hp.com>
5872 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5873 (__libc_unwind_longjmp): Delete macro and declare as function.
5874 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5875 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5877 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5878 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5879 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5881 2004-09-12 Ulrich Drepper <drepper@redhat.com>
5883 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5885 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5886 types also for __USE_XOPEN2K.
5887 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5888 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5889 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5890 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5891 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5892 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5893 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5896 2004-09-08 Ulrich Drepper <drepper@redhat.com>
5898 * sysdeps/pthread/pthread.h
5899 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5900 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5901 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5902 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5905 2004-09-07 Ulrich Drepper <drepper@redhat.com>
5907 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5908 PSEUDO to be used with . prefix.
5910 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5911 Use atomic_increment instead of atomic_exchange_and_add.
5912 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5914 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5916 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5919 * allocatestack.c (allocate_stack): Use atomic_increment_val
5920 instead of atomic_exchange_and_add.
5921 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5922 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5924 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5927 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5928 the initialization function might throw.
5930 2005-09-05 Richard Henderson <rth@redhat.com>
5932 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5933 Move definition inside libpthread, libc, librt check. Provide
5934 definition for rtld.
5936 2004-09-02 Ulrich Drepper <drepper@redhat.com>
5938 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5939 * sysdeps/i386/jmpbuf-unwind.h: Likewise
5940 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5941 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5942 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5943 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5944 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5945 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5948 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5949 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5950 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5952 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5953 Decrement __nwaiters. If pthread_cond_destroy has been called and
5954 this is the last waiter, signal pthread_cond_destroy caller and
5955 avoid using the pthread_cond_t structure after unlock.
5956 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5957 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5958 Read clock type from the least significant bits of __nwaiters instead
5960 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5961 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5963 2004-08-31 Jakub Jelinek <jakub@redhat.com>
5966 * Makefile (tests): Add tst-cond20 and tst-cond21.
5967 * tst-cond20.c: New test.
5968 * tst-cond21.c: New test.
5969 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5970 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5972 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5974 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5975 (pthread_cond_t): Likewise.
5976 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5978 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5980 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5982 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5983 (cond_nwaiters): New.
5985 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5986 if there are waiters not signalled yet.
5987 Wait until all already signalled waiters wake up.
5988 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5989 __nwaiters. If pthread_cond_destroy has been called and this is the
5990 last waiter, signal pthread_cond_destroy caller and avoid using
5991 the pthread_cond_t structure after unlock.
5992 (__pthread_cond_wait): Increment __nwaiters in the beginning,
5993 decrement it when leaving. If pthread_cond_destroy has been called
5994 and this is the last waiter, signal pthread_cond_destroy caller.
5995 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5996 Likewise. Read clock type from the least significant bits of
5997 __nwaiters instead of __clock.
5998 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5999 whether clock ID can be encoded in COND_CLOCK_BITS bits.
6000 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6001 clock type just from the last COND_CLOCK_BITS bits of value.
6002 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6003 instead of __clock, just from second bit of condattr's value.
6005 2004-08-30 Jakub Jelinek <jakub@redhat.com>
6007 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6008 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
6010 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6012 2004-08-15 Roland McGrath <roland@frob.com>
6014 * pthread_atfork.c: Update copyright terms including special exception
6015 for these trivial files, which are statically linked into executables
6016 that use dynamic linking for the significant library code.
6018 2004-08-09 Jakub Jelinek <jakub@redhat.com>
6020 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6021 pthread_rwlock_rdlock.
6022 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6023 Decrease __nr_readers_queued after reacquiring lock.
6024 * sysdeps/pthread/pthread_rwlock_timedrdlock
6025 (pthread_rwlock_timedrdlock): Likewise.
6026 Reported by Bob Cook <bobcook47@hotmail.com>.
6028 2004-08-11 Jakub Jelinek <jakub@redhat.com>
6030 * tst-rwlock14.c (tf): Read main thread handle from *ARG
6031 before pthread_barrier_wait.
6033 2004-08-07 Ulrich Drepper <drepper@redhat.com>
6035 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6036 Remove unnecessary exception handling data.
6038 2004-07-23 Jakub Jelinek <jakub@redhat.com>
6041 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6042 instead of clockid_t.
6044 2004-07-21 Roland McGrath <roland@redhat.com>
6046 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6048 2004-07-19 Roland McGrath <roland@redhat.com>
6050 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6052 2004-07-02 Roland McGrath <roland@redhat.com>
6054 * configure: Don't exit.
6056 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6058 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6059 (__pthread_cond_timedwait): Check for invalid nanosecond in
6062 2004-07-07 Ulrich Drepper <drepper@redhat.com>
6064 * Makefile: Add rules to build and run tst-fini1.
6065 * tst-fini1.c: New file.
6066 * tst-fini1mod.c: New file.
6068 2004-07-05 Ulrich Drepper <drepper@redhat.com>
6070 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6071 if no cancellation support is needed.
6072 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6073 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6074 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6075 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6076 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6077 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6078 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6079 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6080 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6082 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6083 only if not already defined.
6085 2004-07-05 Jakub Jelinek <jakub@redhat.com>
6087 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6088 constraint "m" instead of "0" for futex.
6090 * shlib-versions: Add powerpc64-.*-linux.*.
6092 2004-07-04 Jakub Jelinek <jakub@redhat.com>
6094 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6095 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6097 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6098 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6101 2004-06-29 Roland McGrath <roland@redhat.com>
6103 * Banner: NPTL no longer has its own version number.
6104 * Makefile (nptl-version): Variable removed.
6105 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6106 using $(version), the glibc version number.
6108 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6110 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6111 Fix branch offset for a PLT entry.
6112 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6114 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6116 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6118 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6121 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6123 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6126 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6128 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6129 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6131 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6132 (pthread_rwlock_timedrdlock): Likewise.
6134 2004-06-22 Jakub Jelinek <jakub@redhat.com>
6136 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6137 Set __r7 to val, not mutex.
6139 2004-06-27 Ulrich Drepper <drepper@redhat.com>
6141 * Makefile: Add rules to build tst-rwlock14.
6142 * tst-rwlock14.c: New file.
6144 2004-06-24 Boris Hu <boris.hu@intel.com>
6146 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6148 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6150 2004-06-19 Andreas Jaeger <aj@suse.de>
6152 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6153 assembler in last patch.
6155 2004-06-17 Ulrich Drepper <drepper@redhat.com>
6157 * sysdeps/pthread/pthread_cond_timedwait.c
6158 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6159 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6160 (__pthread_cond_timedwait): Check for invalid nanosecond in
6162 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6163 * tst-cond19.c: New file.
6164 * Makefile: Add rules to build and run tst-cond19.
6166 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6168 * tst-context1.c (GUARD_PATTERN): Defined.
6169 (tst_context_t): Define struct containing ucontext_t & guard words.
6170 (ctx): Declare as an array of tst_context_t.
6171 (fct): Verify uc_link & guard words are still valid.
6172 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6174 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6176 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6177 Add __data.__futex field, reshuffle __data.__clock.
6178 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6179 (__pthread_cond_signal): Increment __futex at the same time as
6180 __wakeup_seq or __total_seq. Pass address of __futex instead of
6181 address of low 32-bits of __wakeup_seq to futex syscall.
6182 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6183 (__pthread_cond_wait): Likewise. Pass __futex value from before
6184 releasing internal lock to FUTEX_WAIT.
6185 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6186 (__pthread_cond_timedwait): Likewise.
6187 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6188 (FUTEX_CMP_REQUEUE): Define.
6189 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6190 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6191 Pass __futex value from before the unlock and __futex address instead
6192 of address of low 32-bits of __wakeup_seq to futex syscall.
6193 Fallback to FUTEX_WAKE all on any errors.
6195 2004-06-08 Jakub Jelinek <jakub@redhat.com>
6197 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6199 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6200 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6201 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6202 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6203 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6205 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6207 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6208 Add memory clobber to inline assembly.
6209 (__lll_mutex_trylock): Likewise.
6210 (__lll_mutex_cond_trylock): Likewise.
6212 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6214 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6215 Pass val argument as 6th system call argument in %r7.
6217 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6219 * Makefile (tests): Add tst-cond16.
6220 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6221 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6222 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6223 Add __data.__futex field, reshuffle __data.__clock.
6224 * sysdeps/unix/sysv/linux/i386/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/i386/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/i386/pthread_cond_timedwait.S
6232 (__pthread_cond_timedwait): Likewise.
6233 * sysdeps/unix/sysv/linux/i386/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.
6240 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6242 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6243 internally. Return non-zero if error, zero if success.
6244 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6245 Add __data.__futex field, reshuffle __data.__clock.
6246 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6248 (lll_futex_requeue): Add val argument, return 1 unconditionally
6250 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6251 Add __data.__futex field, reshuffle __data.__clock.
6252 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6254 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6255 internally. Return non-zero if error, zero if success.
6256 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6257 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6258 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6260 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6261 internally. Return non-zero if error, zero if success.
6262 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6263 Add __data.__futex field, reshuffle __data.__clock.
6264 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6266 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6267 internally. Return non-zero if error, zero if success.
6268 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6269 Add __data.__futex field, reshuffle __data.__clock.
6270 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6271 Add __data.__futex field, reshuffle __data.__clock.
6272 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6273 Increment __futex at the same time as __wakeup_seq or __total_seq.
6274 Pass address of __futex instead of address of low 32-bits of
6275 __wakeup_seq to futex syscall.
6276 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6277 Pass __futex value from before releasing internal lock
6279 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6280 Likewise. Avoid unnecessary shadowing of variables.
6281 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6282 Set __futex to 2 * __total_seq. Pass __futex value from before the
6283 unlock and __futex address instead of address of low 32-bits of
6284 __wakeup_seq to futex_requeue macro, adjust for new return value
6286 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6287 (__pthread_cond_signal): Increment __futex at the same time as
6288 __wakeup_seq or __total_seq. Pass address of __futex instead of
6289 address of low 32-bits of __wakeup_seq to futex syscall.
6290 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6291 (__pthread_cond_wait): Likewise. Pass __futex value from before
6292 releasing internal lock to FUTEX_WAIT.
6293 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6294 (__pthread_cond_timedwait): Likewise.
6295 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6296 (FUTEX_CMP_REQUEUE): Define.
6297 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6298 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6299 Pass __futex value from before the unlock and __futex address instead
6300 of address of low 32-bits of __wakeup_seq to futex syscall.
6301 Fallback to FUTEX_WAKE all on any errors.
6303 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6305 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6306 Add nop to align the end of critical section.
6307 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6309 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6311 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6312 Add __broadcast_seq field.
6313 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6314 all waiters as woken with woken_seq and bump broadcast counter.
6315 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6316 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6317 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6318 Comment typo fixes. Avoid returning -ETIMEDOUT.
6320 2004-06-01 Ulrich Drepper <drepper@redhat.com>
6322 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6323 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6324 Reported by Kaz Kojima.
6326 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6328 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6330 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6332 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6333 __broadcast_seq with bc_seq after acquiring internal lock instead of
6336 2004-05-18 Jakub Jelinek <jakub@redhat.com>
6338 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6340 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6341 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6342 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6343 (pthread_cond_t): Add __data.__broadcast_seq field.
6344 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6345 (FRAME_SIZE): Define.
6346 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6348 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6350 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6352 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6353 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6356 2004-05-18 Ulrich Drepper <drepper@redhat.com>
6358 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6359 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6360 Add __broadcast_seq field.
6361 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6362 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6363 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6364 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6365 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6366 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6367 all waiters as woken with woken_seq and bump broadcast counter.
6368 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6369 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6370 __broadcast_seq field.
6371 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6372 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6373 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6374 * pthread_cond_init.c: Initialize __broadcast_seq field.
6375 * Makefile (tests): Add tst-cond17 and tst-cond18.
6376 Add .NOTPARALLEL goal.
6377 * tst-cond16.c: New file. From Jakub.
6378 * tst-cond17.c: New file. From Jakub.
6379 * tst-cond18.c: New file. From Jakub.
6381 2004-05-16 Ulrich Drepper <drepper@redhat.com>
6383 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6386 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6387 Parametrize frame size. Correct some unwind info.
6388 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6390 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6392 * tst-stack3.c: Note testing functionality beyond POSIX.
6394 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6396 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6397 Change conditional from ifdef to if.
6399 2004-04-23 Jakub Jelinek <jakub@redhat.com>
6401 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6402 SYSDEP_CANCEL_ERROR): Define.
6405 2004-05-01 Jakub Jelinek <jakub@redhat.com>
6407 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6409 2004-04-20 Jakub Jelinek <jakub@redhat.com>
6411 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6413 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6415 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6416 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6417 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6418 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6420 2004-04-19 Ulrich Drepper <drepper@redhat.com>
6422 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6423 thread has all signals blocked.
6425 2004-04-18 Andreas Jaeger <aj@suse.de>
6427 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6428 (SEM_VALUE_MAX): Add missing brace.
6430 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6432 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6434 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6435 * sysdeps/pthread/tst-mqueue8x.c: New test.
6436 * tst-cancel4.c: Update comment about message queues.
6438 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6439 return it_value { 0, 0 }.
6440 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6442 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6443 assertion for SIGEV_NONE.
6444 (thread_attr_compare): Compare all attributes, not just a partial
6447 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6449 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6451 2004-04-17 Ulrich Drepper <drepper@redhat.com>
6453 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6454 Just use a plain number.
6455 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6456 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6457 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6458 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6459 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6460 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6461 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6463 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6465 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6467 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6469 2004-04-15 Jakub Jelinek <jakub@redhat.com>
6471 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6472 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6473 of calling sigwaitinfo.
6475 2004-04-16 Ulrich Drepper <drepper@redhat.com>
6477 * allocatestack.c (allocate_stack): Set reported_guardsize
6479 * pthread_getattr_np.c (pthread_getattr_np): Use
6480 reported_guardsize instead of guardsize.
6481 * descr.h (struct pthread): Add reported_guardsize field.
6483 2004-04-13 Jakub Jelinek <jakub@redhat.com>
6485 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6487 2004-04-12 Ulrich Drepper <drepper@redhat.com>
6489 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6491 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6493 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6494 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6495 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6496 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6497 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6499 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6500 (_POSIX_MESSAGE_PASSING): Define.
6501 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6502 (_POSIX_MESSAGE_PASSING): Define.
6503 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6504 (_POSIX_MESSAGE_PASSING): Define.
6506 2004-04-04 Ulrich Drepper <drepper@redhat.com>
6508 * tst-context1.c (fct): Check whether correct stack is used.
6510 2004-04-03 Ulrich Drepper <drepper@redhat.com>
6512 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6513 matching constraints for asm mem parameters.
6515 * tst-clock2.c (tf): Don't define unless needed.
6517 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6519 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6522 2004-03-30 Ulrich Drepper <drepper@redhat.com>
6524 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6525 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6526 * pthreadP.h: Declare __nptl_deallocate_tsd.
6527 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6530 * Makefile (tests): Add tst-tsd5.
6531 * tst-tsd5.c: New file.
6533 2004-03-29 Ulrich Drepper <drepper@redhat.com>
6535 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6536 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6537 is SHLIB_COMPAT check.
6538 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6539 (__pthread_attr_getaffinity_old): Likewise.
6540 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6541 (__pthread_getaffinity_old): Likewise.
6542 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6543 (__pthread_setaffinity_old): Likewise.
6545 2004-03-26 Ulrich Drepper <drepper@redhat.com>
6547 * allocatestack.c (_make_stacks_executable): Call
6548 _dl_make_stack_executable first.
6550 2004-03-24 Roland McGrath <roland@redhat.com>
6552 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6553 constraint instead of "0".
6555 2004-03-24 Ulrich Drepper <drepper@redhat.com>
6557 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6558 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6560 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6561 code to avoid warning.
6563 2004-03-24 Andreas Jaeger <aj@suse.de>
6565 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6566 (__pthread_attr_setaffinity_old): Remove const.
6568 2004-03-23 Ulrich Drepper <drepper@redhat.com>
6570 * sysdeps/unix/sysv/linux/smp.h: New file.
6571 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6572 * init.c: Define __is_smp.
6573 (__pthread_initialize_minimal_internal): Call is_smp_system to
6574 initialize __is_smp.
6575 * pthreadP.h: Declare __is_smp.
6576 Define MAX_ADAPTIVE_COUNT is necessary.
6577 * pthread_mutex_init.c: Add comment regarding __spins field.
6578 * pthread_mutex_lock.c: Implement adaptive mutex type.
6579 * pthread_mutex_timedlock.c: Likewise.
6580 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6581 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6583 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6584 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6585 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6586 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6587 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6588 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6589 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6590 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6591 lll_mutex_cond_trylock.
6592 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6593 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6594 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6595 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6596 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6597 Define BUSY_WAIT_NOP.
6598 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6599 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6601 * tst-mutex5.c: Add support for testing adaptive mutexes.
6602 * tst-mutex7.c: Likewise.
6603 * tst-mutex5a.c: New file.
6604 * tst-mutex7a.c: New file.
6605 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6607 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6608 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6609 vgettimeofday call might destroy the content.
6611 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6614 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6615 No need to restrict type of ret. Make it int. Add comment.
6617 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6618 Remove unnecessary setne instruction.
6620 2004-03-22 Jakub Jelinek <jakub@redhat.com>
6622 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6623 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6624 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6625 If realloc fails, break out of the loop.
6627 2004-03-20 Andreas Jaeger <aj@suse.de>
6629 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6630 (__pthread_setaffinity_old): Fix interface.
6631 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6632 (__pthread_getaffinity_old): Likewise.
6634 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6635 (__pthread_setaffinity_new): Remove duplicate declaration.
6637 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6639 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6640 the return value to a safe register.
6641 (CDISABLE): Set the function argument correctly.
6643 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6645 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6646 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6647 Rewrite so that only one locked memory operation per round is needed.
6648 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6649 (pthread_barrier_wait): After wakeup, release lock only when the
6650 last thread stopped using the barrier object.
6651 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6652 (__pthread_cond_wait): Don't store mutex address if the current
6653 value is ~0l. Add correct cleanup support and unwind info.
6654 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6655 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6656 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6657 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6658 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6659 Add correct cleanup support and unwind info.
6660 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6661 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6662 information for syscall wrappers.
6664 2004-03-18 Ulrich Drepper <drepper@redhat.com>
6666 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6667 cpusetsize field, remove next.
6668 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6669 parameter for size of the CPU set.
6670 (pthread_setaffinity_np): Likewise.
6671 (pthread_attr_getaffinity_np): Likewise.
6672 (pthread_attr_setaffinity_np): Likewise.
6673 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6674 interface change, keep compatibility code.
6675 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6676 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6677 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6678 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6679 __pthread_getaffinity_np.
6680 * Versions: Add version for changed interfaces.
6681 * tst-attr3.c: Adjust test for interface change.
6682 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6683 increasing buffer sizes.
6684 * pthread_attr_destroy.c: Remove unused list handling.
6685 * pthread_attr_init.c: Likewise.
6687 2004-03-17 Roland McGrath <roland@redhat.com>
6689 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6690 first argument to clock_getres so we ever enable kernel timers.
6692 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
6694 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6696 2004-03-12 Richard Henderson <rth@redhat.com>
6698 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6699 oldvalue from CENABLE to CDISABLE.
6701 2004-03-12 Ulrich Drepper <drepper@redhat.com>
6703 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6704 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6705 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6706 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6708 2004-03-11 Richard Henderson <rth@redhat.com>
6710 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6711 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6712 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6714 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6716 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6717 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6718 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6720 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6722 * forward.c (__pthread_cond_broadcast_2_0,
6723 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6724 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6725 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6727 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6729 * sysdeps/sh/tcb-offsets.sym: Add PID.
6730 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6731 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6733 2004-03-10 Ulrich Drepper <drepper@redhat.com>
6735 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6736 include <sysdep-cancel.h>, vfork is no cancellation point.
6737 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6738 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6739 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6741 2004-03-10 Jakub Jelinek <jakub@redhat.com>
6743 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6745 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6746 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6748 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6750 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6751 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6752 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6753 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6754 of DO_CALL_VIA_BREAK. Work around a gas problem.
6756 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6757 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6758 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6759 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6760 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6761 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6763 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6764 a local register for saving old PID. Negate PID in parent upon exit.
6766 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6768 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6769 before syscall, set to the old value in the parent afterwards.
6770 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6771 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6773 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6774 before syscall, set to the old value in the parent afterwards.
6775 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6776 * sysdeps/s390/tcb-offsets.sym: Add PID.
6778 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6779 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6780 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6781 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6782 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6783 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6785 2004-03-10 Andreas Schwab <schwab@suse.de>
6787 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6788 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6789 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6791 2004-03-09 Jakub Jelinek <jakub@redhat.com>
6793 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6794 * tst-cancel21.c (do_one_test): Likewise.
6795 Reported by Gordon Jin <gordon.jin@intel.com>.
6797 2004-02-09 Jakub Jelinek <jakub@redhat.com>
6799 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6800 if non-zero and set to INT_MIN if zero.
6801 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6802 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6803 (SAVE_PID, RESTORE_PID): Define.
6805 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6806 Use relative path to avoid including NPTL i386/vfork.S.
6807 (SAVE_PID, RESTORE_PID): Define.
6808 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6809 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6810 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6812 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6813 * tst-vfork1.c: New test.
6814 * tst-vfork2.c: New test.
6815 * tst-vfork1x.c: New test.
6816 * tst-vfork2x.c: New test.
6818 2004-03-08 Ulrich Drepper <drepper@redhat.com>
6820 * sysdeps/i386/tcb-offsets.sym: Add PID.
6821 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6822 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6823 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6825 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
6827 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6829 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
6831 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6834 2004-03-07 Ulrich Drepper <drepper@redhat.com>
6836 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6839 * tst-once4.c: Remove unnecessary macro definition.
6841 * tst-mutex7.c (do_test): Limit thread stack size.
6842 * tst-once2.c (do_test): Likewise.
6843 * tst-tls3.c (do_test): Likewise.
6844 * tst-tls1.c (do_test): Likewise.
6845 * tst-signal3.c (do_test): Likewise.
6846 * tst-kill6.c (do_test): Likewise.
6847 * tst-key4.c (do_test): Likewise.
6848 * tst-join4.c (do_test): Likewise.
6849 * tst-fork1.c (do_test): Likewise.
6850 * tst-context1.c (do_test): Likewise.
6851 * tst-cond2.c (do_test): Likewise.
6852 * tst-cond10.c (do_test): Likewise.
6853 * tst-clock2.c (do_test): Likewise.
6854 * tst-cancel10.c (do_test): Likewise.
6855 * tst-basic2.c (do_test): Likewise.
6856 * tst-barrier4.c (do_test): Likewise.
6858 2004-03-05 Ulrich Drepper <drepper@redhat.com>
6860 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6862 2004-03-01 Ulrich Drepper <drepper@redhat.com>
6864 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6865 (__pthread_cond_timedwait): Optimize wakeup test.
6866 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6867 (__pthread_cond_wait): Likewise.
6868 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6869 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6872 2004-02-29 Ulrich Drepper <drepper@redhat.com>
6874 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6875 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
6876 the atomic instruction needed.
6877 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6878 (__lll_mutex_lock_wait): Likewise.
6880 2004-02-28 Ulrich Drepper <drepper@redhat.com>
6882 * Makefile (tests): Add tst-cond14 and tst-cond15.
6883 * tst-cond14.c: New file.
6884 * tst-cond15.c: New file.
6886 2004-02-27 Ulrich Drepper <drepper@redhat.com>
6888 * sysdeps/pthread/createthread.c (create_thread): Remove use of
6889 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
6890 needs to be implemented differently to be useful.
6892 2004-02-26 Ulrich Drepper <drepper@redhat.com>
6894 * pthread_attr_setschedparam.c: Don't test priority against limits
6895 here. Set ATTR_FLAG_SCHED_SET flag.
6896 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6897 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6898 from parent thread to child. If attribute is used and scheduling
6899 parameters are not inherited, copy parameters from attribute or
6900 compute them. Check priority value.
6901 * pthread_getschedparam.c: If the parameters aren't known yet get
6902 them from the kernel.
6903 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6904 ATTR_FLAG_POLICY_SET flag for thread.
6905 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6906 and ATTR_FLAG_POLICY_SET.
6908 * sysdeps/pthread/createthread.c: Use tgkill if possible.
6910 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6911 fail if stack address hasn't been set. Just return 0.
6913 2004-02-25 Ulrich Drepper <drepper@redhat.com>
6915 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
6916 libpthread for the files in this list.
6917 (CFLAGS-tst-unload): Removed.
6918 * tst-unload.c (do_test): Don't use complete path for
6921 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6924 2004-02-22 Ulrich Drepper <drepper@redhat.com>
6926 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6927 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6928 operation per round is needed.
6929 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6930 (__lll_mutex_lock_wait): Likewise.
6932 2004-02-20 Ulrich Drepper <drepper@redhat.com>
6934 * tst-cancel9.c (cleanup): Don't print to stderr.
6936 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6938 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6940 2004-02-20 Jakub Jelinek <jakub@redhat.com>
6942 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6943 (__syscall_error_handler2): Call CDISABLE.
6944 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6945 (__syscall_error_handler2): Call CDISABLE.
6947 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6948 Release lock before the loop, don't reacquire it.
6950 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6952 2004-02-19 Andreas Schwab <schwab@suse.de>
6954 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6957 2004-02-18 Ulrich Drepper <drepper@redhat.com>
6959 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6960 (pthread_barrier_wait): After wakeup, release lock only when the
6961 last thread stopped using the barrier object.
6962 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6963 (pthread_barrier_wait): Likewise.
6964 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6966 * Makefile (tests): Add tst-barrier4.
6967 * tst-barrier4.c: New file.
6969 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6970 (__pthread_cond_timedwait): Perform timeout test while holding
6971 internal lock to prevent wakeup race.
6972 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6973 * sysdeps/pthread/pthread_cond_timedwait.c
6974 (__pthread_cond_timedwait): Likewise.
6975 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6976 (__pthread_cond_timedwait): Likewise.
6978 2004-02-18 Jakub Jelinek <jakub@redhat.com>
6980 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6981 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6982 * Makefile (tests): Add tst-rwlock13.
6983 * tst-rwlock13.c: New test.
6985 2004-02-16 Ulrich Drepper <drepper@redhat.com>
6987 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6988 (__condvar_tw_cleanup): Little optimization.
6989 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6991 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
6993 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6994 libpthread as "lib" parameter to SHLIB_COMPAT.
6995 (__novmx_siglongjmp): Fix typo in function name.
6996 (__novmx_longjmp): Fix typo in function name.
6998 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7000 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7003 * sysdeps/generic/pt-longjmp.c: Moved to...
7004 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
7006 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
7008 * Makefile (libpthread-routines): Add pt-cleanup.
7009 * pt-longjmp.c: Removed.
7010 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7011 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7012 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7013 Version longjmp, siglongjmp for GLIBC_2.3.4.
7014 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7016 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7018 * sysdeps/pthread/pthread_cond_timedwait.c
7019 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
7020 Reuse code. Add __builtin_expects.
7022 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7023 (__pthread_cond_timedwait): Get internal lock in case timeout has
7024 passed before the futex syscall.
7025 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7027 2004-01-20 Ulrich Drepper <drepper@redhat.com>
7029 * allocatestack.c: Pretty printing.
7031 * sysdeps/pthread/createthread.c (create_thread): Don't add
7032 CLONE_DETACHED bit if it is not necessary.
7034 2004-01-16 Ulrich Drepper <drepper@redhat.com>
7036 * pthread_getattr_np.c: Include ldsodefs.h.
7038 2004-01-16 Richard Henderson <rth@redhat.com>
7040 * allocatestack.c: Don't declare __libc_stack_end.
7041 * init.c (__pthread_initialize_minimal_internal): Likewise.
7042 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7044 2004-01-15 Richard Henderson <rth@redhat.com>
7046 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7047 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7048 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7049 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7050 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7051 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7052 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7053 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7055 2004-01-14 Ulrich Drepper <drepper@redhat.com>
7057 * init.c (pthread_functions): Make array const.
7059 2004-01-13 Ulrich Drepper <drepper@redhat.com>
7061 * allocatestack.c (__make_stacks_executable): Change interface.
7062 Check parameters. Pass parameter on to libc counterpart.
7063 * pthreadP.h: Change declaration.
7065 2004-01-13 Richard Henderson <rth@redhat.com>
7067 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7069 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7072 * sysdeps/alpha/Makefile: New file.
7073 * sysdeps/alpha/tcb-offsets.sym: New file.
7074 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7075 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7077 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7080 2004-01-08 Jakub Jelinek <jakub@redhat.com>
7082 * Makefile (tests): Add tst-backtrace1.
7083 * tst-backtrace1.c: New test.
7085 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7087 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7088 register as second parameter to the REGISTER macro.
7089 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7090 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7091 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7092 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7093 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7094 of thread register as second parameter to REGISTER macro in 64 case.
7096 2004-01-03 Ulrich Drepper <drepper@redhat.com>
7098 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7099 (CFLAGS-getpid.o): Defined.
7100 (CFLAGS-getpid.os): Defined.
7102 2003-12-31 Ulrich Drepper <drepper@redhat.com>
7104 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7105 returned for main thread does not overlap with any other VMA.
7106 Patch by Jakub Jelinek.
7108 2003-12-29 Jakub Jelinek <jakub@redhat.com>
7110 * tst-raise1.c: Include stdio.h.
7112 2003-12-23 Jakub Jelinek <jakub@redhat.com>
7114 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7115 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7116 If pid is 0, set it to selftid.
7117 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7118 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7119 != 0, return self->tid without doing a syscall.
7120 * descr.h (struct pthread): Move pid field after tid.
7122 * Makefile (tests): Add tst-raise1.
7123 * tst-raise1.c: New file.
7125 2003-12-23 Roland McGrath <roland@redhat.com>
7127 * tst-oddstacklimit.c: New file.
7128 * Makefile (tests): Add it.
7129 (tst-oddstacklimit-ENV): New variable.
7131 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7132 value up to page size for __default_stacksize.
7134 2003-12-21 Ulrich Drepper <drepper@redhat.com>
7136 * Makefile (tests): Add tst-eintr5.
7137 * tst-eintr5.c: New file.
7139 * eintr.c (eintr_source): Prevent sending signal to self.
7141 * tst-eintr2.c (tf1): Improve error message.
7143 2003-12-20 Ulrich Drepper <drepper@redhat.com>
7145 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7146 * sysdeps/unix/sysv/linux/getpid.c: New file.
7147 * pthread_cancel.c: Add comment explaining use of PID field.
7148 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7149 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7150 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7151 temporarily to signal the field must not be relied on and updated
7153 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7154 temporarily negative.
7155 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7157 2003-12-19 Ulrich Drepper <drepper@redhat.com>
7159 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7160 (eintr_source): If ARG != NULL, use pthread_kill.
7161 * tst-eintr1.c: Adjust for this change.
7162 * tst-eintr2.c: Likewise.
7163 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7164 * tst-eintr3.c: New file.
7165 * tst-eintr4.c: New file.
7167 2003-12-19 Jakub Jelinek <jakub@redhat.com>
7169 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7170 if CANCELSTATE_BITMASK is set.
7171 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7174 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7175 (tests-reverse): Add tst-cancel23.
7176 * tst-cancel22.c: New test.
7177 * tst-cancel23.c: New test.
7179 2003-12-18 Ulrich Drepper <drepper@redhat.com>
7181 * tst-eintr1.c: Better error messages.
7183 * Makefile (tests): Add tst-eintr2.
7184 * tst-eintr2.c: New file.
7186 2003-12-18 Jakub Jelinek <jakub@redhat.com>
7188 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7189 (CFLAGS-tst-cancelx21.c): Set.
7190 * tst-cancel21.c: New test.
7191 * tst-cancelx21.c: New test.
7193 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7195 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7196 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7197 * pt-longjmp.c: Include jmpbuf-unwind.h.
7198 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7199 _JMPBUF_UNWINDS. Adjust compared pointers.
7200 * init.c (__pthread_initialize_minimal_internal): Initialize
7201 pd->stackblock_size.
7202 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7203 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7204 * sysdeps/i386/jmpbuf-unwind.h: New file.
7205 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7206 * sysdeps/s390/jmpbuf-unwind.h: New file.
7207 * sysdeps/sh/jmpbuf-unwind.h: New file.
7208 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7209 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7210 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7211 (_JMPBUF_CFA_UNWINDS): Remove.
7212 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7214 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7216 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7217 (CFLAGS-tst-cancelx20.c): Set.
7218 * tst-cancel20.c: New test.
7219 * tst-cancelx20.c: New test.
7221 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7223 * init.c (__pthread_initialize_minimal_internal): Don't treat
7224 architectures with separate register stack special here when
7225 computing default stack size.
7227 2003-12-17 Roland McGrath <roland@redhat.com>
7229 * Makefile (tst-cancelx7-ARGS): New variable.
7230 Reportd by Greg Schafer <gschafer@zip.com.au>.
7232 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7234 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7235 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7236 (tst-stack3-ENV): Set.
7237 ($(objpfx)tst-stack3-mem): New.
7238 * tst-stack3.c: New test.
7240 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7242 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7243 Add unwind directives. Drop unused .regstk directive.
7244 (_fini_EPILOG_BEGINS): Add unwind directives.
7246 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7248 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7249 Assume parameter is a pointer.
7250 (lll_futex_wake): Likewise.
7251 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7253 (lll_futex_wake): Likewise.
7254 Reported by Boris Hu.
7255 * sysdeps/unix/sysv/linux/unregister-atfork.c
7256 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7258 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7260 2003-12-10 Ulrich Drepper <drepper@redhat.com>
7262 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7263 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7264 __rtld_lock_initialize for ld.so lock.
7265 Patch in part by Adam Li <adam.li@intel.com>.
7267 2003-12-02 David Mosberger <davidm@hpl.hp.com>
7269 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7270 in $(gnulib). Also, remove stale comment.
7272 2003-11-12 David Mosberger <davidm@hpl.hp.com>
7274 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7275 advantage of new syscall stub and optimize accordingly.
7277 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7278 from SYS_futex, to match expectations of
7279 sysdep.h:DO_INLINE_SYSCALL.
7280 (lll_futex_clobbers): Remove.
7281 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7282 (lll_futex_wake): Likewise.
7283 (lll_futex_requeue): Likewise.
7284 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7285 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7287 (__lll_mutex_lock): Likewise.
7288 (__lll_mutex_cond_lock): Likewise.
7289 (__lll_mutex_timed_lock): Likewise.
7290 (__lll_mutex_unlock): Likewise.
7291 (__lll_mutex_unlock_force): Likewise.
7293 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7294 comes before the include of <sysdep.h>.
7295 (THREAD_SELF_SYSINFO): New macro.
7296 (THREAD_SYSINFO): Likewise.
7297 (INIT_SYSINFO): New macro.
7298 (TLS_INIT_TP): Call INIT_SYSINFO.
7300 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7302 * sysdeps/pthread/createthread.c (create_thread): Use
7303 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7304 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7305 THREAD_SELF_SYSINFO instead of open code.
7306 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7307 (THREAD_SYSINFO): Likewise.
7309 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7311 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7313 2003-12-06 Ulrich Drepper <drepper@redhat.com>
7315 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7316 instead of .init. Patch by David Mosberger.
7318 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
7320 * sysdeps/pthread/configure.in: Remove broken declaration in C
7321 cleanup handling check.
7323 2003-11-30 Andreas Jaeger <aj@suse.de>
7325 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7326 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7329 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7331 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7332 * pthread_attr_destroy.c: Include shlib-compat.h.
7333 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7334 is set in iattr->flags.
7335 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7337 2003-11-21 Jakub Jelinek <jakub@redhat.com>
7339 * Makefile (distribute): Add tst-cleanup4aux.c.
7341 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7344 2003-11-21 Ulrich Drepper <drepper@redhat.com>
7346 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7347 pthread_cond_signal.
7349 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7350 store mutex address if the current value is ~0l.
7351 * sysdeps/pthread/pthread_cond_timedwait.c
7352 (__pthread_cond_timedwait): Likewise.
7353 * sysdeps/pthread/pthread_cond_broadcast.c
7354 (__pthread_cond_broadcast): Don't use requeue for pshared
7357 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7358 (__pthread_cond_wait): Don't store mutex address if the current
7360 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7361 (__pthread_cond_timedwait): Likewise.
7362 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7363 (__pthread_cond_broadcast): Don't use requeue for pshared
7366 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7367 element with ~0l for pshared condvars, with NULL otherwise.
7369 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7370 (__pthread_cond_wait): Don't store mutex address if the current
7372 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7373 (__pthread_cond_timedwait): Likewise.
7374 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7375 (__pthread_cond_broadcast): Don't use requeue for pshared
7378 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7379 * tst-cond12.c: New file.
7380 * tst-cond13.c: New file.
7382 2003-11-17 Ulrich Drepper <drepper@redhat.com>
7384 * sysdeps/pthread/configure.in: Make missing forced unwind support
7387 2003-11-11 Ulrich Drepper <drepper@redhat.com>
7389 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7391 2003-11-06 Ulrich Drepper <drepper@redhat.com>
7393 * Makefile: Add magic to clean up correctly.
7395 2003-11-05 Jakub Jelinek <jakub@redhat.com>
7397 * unwind.c (FRAME_LEFT): Define.
7398 (unwind_stop): Handle old style cleanups here.
7399 (__pthread_unwind): Handle old style cleanups only if
7400 !HAVE_FORCED_UNWIND.
7401 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7402 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7403 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7404 ($(objpfx)tst-cleanupx4): Likewise.
7405 * tst-cleanup4.c: New test.
7406 * tst-cleanup4aux.c: New.
7407 * tst-cleanupx4.c: New test.
7409 2003-11-04 Ulrich Drepper <drepper@redhat.com>
7411 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7412 lll_mutex_*lock macros to skip atomic operations on some archs.
7414 2003-11-03 Ulrich Drepper <drepper@redhat.com>
7416 * sysdeps/pthread/tst-timer.c (main): Initialize
7417 sigev2.sigev_value as well.
7419 2003-10-15 Roland McGrath <roland@redhat.com>
7421 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7423 * sysdeps/pthread/configure: Regenerated.
7425 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7427 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7428 locking macros. No distinction between normal and mutex locking
7430 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7431 Merge bits from lowlevelmutex.S we still need.
7432 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7433 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7434 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7435 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7436 new mutex implementation.
7437 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7438 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7439 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7440 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7441 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7442 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7443 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7444 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7445 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7446 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7447 symbol for entry point to avoid cancellation.
7449 2003-10-07 Jakub Jelinek <jakub@redhat.com>
7451 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7453 (SAVE_OLDTYPE_0): Fix a typo.
7455 2003-10-03 Ulrich Drepper <drepper@redhat.com>
7457 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7458 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7460 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7462 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7465 2003-10-02 Jakub Jelinek <jakub@redhat.com>
7467 * Makefile (tests): Add tst-cancel19.
7468 * tst-cancel19.c: New test.
7470 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7472 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7473 restoring of the old cancellation type.
7475 2003-09-30 Jakub Jelinek <jakub@redhat.com>
7477 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7479 2003-09-27 Wolfram Gloger <wg@malloc.de>
7481 * sysdeps/pthread/malloc-machine.h: New file
7483 2003-09-24 Roland McGrath <roland@redhat.com>
7485 * allocatestack.c (__make_stacks_executable): Don't ignore return
7486 value from _dl_make_stack_executable.
7488 2003-09-24 Ulrich Drepper <drepper@redhat.com>
7490 * allocatestack.c (__make_stacks_executable): Also change
7491 permission of the currently unused stacks.
7493 * allocatestack.c (change_stack_perm): Split out from
7494 __make_stacks_executable.
7495 (allocate_stack): If the required permission changed between the time
7496 we started preparing the stack and queueing it, change the permission.
7497 (__make_stacks_executable): Call change_stack_perm.
7499 * Makefile: Build tst-execstack-mod locally.
7500 * tst-execstack-mod.c: New file.
7502 2003-09-23 Jakub Jelinek <jakub@redhat.com>
7504 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7506 2003-09-23 Roland McGrath <roland@redhat.com>
7508 * tst-execstack.c: New file.
7509 * Makefile (tests): Add it.
7510 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7511 (LDFLAGS-tst-execstack): New variable.
7513 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7514 whether to use PROT_EXEC for stack mmap.
7515 (__make_stacks_executable): New function.
7516 * pthreadP.h: Declare it.
7517 * init.c (__pthread_initialize_minimal_internal): Set
7518 GL(dl_make_stack_executable_hook) to that.
7520 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7522 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7523 recommendation from AMD re avoidance of lock prefix.
7525 2003-09-22 Jakub Jelinek <jakub@redhat.com>
7527 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7528 lll_futex_timed_wait instead of lll_futex_wait.
7529 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7530 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7531 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7532 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7533 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7534 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7535 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7536 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7537 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7538 Completely revamp the locking macros. No distinction between
7539 normal and mutex locking anymore.
7540 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7541 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7542 __lll_lock_timedwait): Fix prototypes.
7543 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7544 __lll_lock_timedwait): Likewise.
7545 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7546 macros, add __builtin_expect.
7547 (lll_mutex_timedlock): Likewise. Fix return value.
7548 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7549 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7550 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7551 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7552 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7553 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7554 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7555 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7557 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7559 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7560 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7561 operation if possible.
7563 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7564 like jumping over the lock prefix.
7566 2003-09-21 Ulrich Drepper <drepper@redhat.com>
7568 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7569 locking macros. No distinction between normal and mutex locking
7571 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7572 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7573 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7574 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7575 locking. Merge bits from lowlevelmutex.S we still need.
7576 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7577 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7578 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7579 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7580 * Makefile (routines): Remove libc-lowlevelmutex.
7581 (libpthread-rountines): Remove lowlevelmutex.
7582 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7583 for new mutex implementation.
7584 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7585 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7586 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7587 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7588 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7590 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7592 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7593 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7594 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7595 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7596 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7597 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7598 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7599 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7601 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7603 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7604 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7605 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7607 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7608 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7610 2003-09-20 Ulrich Drepper <drepper@redhat.com>
7612 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7613 in parameters of asm with output parameters.
7615 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7616 type of DECR parameter to int.
7617 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7619 2003-09-18 Jakub Jelinek <jakub@redhat.com>
7621 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7622 guardsize for each thread.
7624 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7626 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7627 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7628 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7630 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7631 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7633 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7634 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7635 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7636 (pthread_getaffinity_np): Add hidden_def.
7638 * Makefile (tests): Add tst-attr3.
7639 * tst-attr3.c: New test.
7641 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7643 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7645 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7646 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7648 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7650 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7651 * tst-align.c: Include tst-stack-align.h.
7652 (tf, do_test): Use TEST_STACK_ALIGN macro.
7654 2003-09-17 Ulrich Drepper <drepper@redhat.com>
7656 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7659 2003-09-16 Ulrich Drepper <drepper@redhat.com>
7661 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7662 stack-related values for the initial thread.
7664 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7666 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7668 2003-09-11 Ulrich Drepper <drepper@redhat.com>
7670 * pthread_mutex_lock.c: Minor code rearrangements.
7672 2003-09-05 Roland McGrath <roland@redhat.com>
7674 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7675 Instead, include ../nptl_db/db_info.c to do its magic.
7676 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7677 (__pthread_pthread_key_2ndlevel_size): Likewise.
7678 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7679 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7680 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7681 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7682 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7683 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7684 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7685 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7686 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7687 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7688 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7689 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7690 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7691 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7692 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7693 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7694 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7696 2003-09-08 Ulrich Drepper <drepper@redhat.com>
7698 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7699 of pthread_t to be compatible with LT.
7700 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7701 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7702 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7703 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7704 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7705 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7706 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7708 2003-09-04 Ulrich Drepper <drepper@redhat.com>
7710 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7712 2003-09-04 Jakub Jelinek <jakub@redhat.com>
7714 * unwind-forcedunwind.c: Move to...
7715 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7716 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7717 * sysdeps/pthread/jmpbuf-unwind.h: New file.
7718 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7719 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7720 * unwind.c: Include jmpbuf-unwind.h.
7721 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7723 2003-09-02 Jakub Jelinek <jakub@redhat.com>
7725 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7726 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7727 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7728 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7729 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7730 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7731 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7732 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7733 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7734 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7735 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7737 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7738 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7739 * Makefile (tests): Add tst-stack2.
7740 * tst-stack2.c: New test.
7741 * tst-stack1.c: Include limits.h and sys/param.h.
7742 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7744 * pthread_condattr_setpshared.c: Include errno.h.
7745 (pthread_condattr_setpshared): Return EINVAL if pshared
7746 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7748 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7749 defined symbol for entry point to avoid cancellation.
7750 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7752 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7754 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7756 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7758 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7760 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7761 __close_nocancel, __read_nocancel, __write_nocancel,
7762 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7763 libpthread.so or librt.so, define to corresponding function
7764 without _nocancel suffix.
7765 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7766 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7767 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7769 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7771 2003-09-02 Ulrich Drepper <drepper@redhat.com>
7773 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7774 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7776 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7777 in subsections has a symbol associated with it.
7779 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7780 defined symbol for entry point to avoid cancellation.
7781 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7783 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7785 * Makefile (tests): Add tst-tls5.
7786 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7787 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7788 ($(objpfx)tst-tls5): New.
7789 ($(objpfx)tst-tls6.out): Likewise.
7790 (tests): Depend on $(objpfx)tst-tls6.out.
7791 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7792 (do_test): Check pthread_self () return value alignment.
7793 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7794 (tf): Check pthread_self () return value alignment.
7795 * tst-tls5.c: New test.
7797 * tst-tls5mod.c: New.
7798 * tst-tls5moda.c: New.
7799 * tst-tls5modb.c: New.
7800 * tst-tls5modc.c: New.
7801 * tst-tls5modd.c: New.
7802 * tst-tls5mode.c: New.
7803 * tst-tls5modf.c: New.
7804 * tst-tls6.sh: New test.
7806 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7807 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7808 * init.c (pthread_functions): Initialize them.
7809 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7810 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7811 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7812 pthread_cond_timedwait@@GLIBC_2.3.2.
7814 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7816 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7817 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7818 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7819 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7820 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7821 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7823 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7825 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7826 _POSIX_THREAD_PRIORITY_SCHEDULING.
7827 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7829 2003-08-31 Ulrich Drepper <drepper@redhat.com>
7831 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7832 nested function, use static inline function from libio.h.
7833 Code by Richard Henderson.
7835 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7838 2003-08-30 Jakub Jelinek <jakub@redhat.com>
7840 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7841 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7842 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7843 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7844 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7845 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7846 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7847 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7848 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7849 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7850 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7851 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7852 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7853 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7854 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7855 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7856 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7857 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7858 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7859 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7860 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7861 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7862 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7863 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7864 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7865 * sysdeps/sparc/tls.h: New file.
7866 * sysdeps/sparc/tcb-offsets.sym: New file.
7867 * sysdeps/sparc/Makefile: New file.
7868 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7869 * init.c [__sparc__] (__NR_set_tid_address): Define.
7871 2003-08-29 Jakub Jelinek <jakub@redhat.com>
7873 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7874 _IO_release_lock): Define.
7876 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
7878 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7879 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
7881 2003-08-27 Ulrich Drepper <drepper@redhat.com>
7883 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7884 (__pthread_cleanup_class): Add missing return types of member
7887 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
7889 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7890 (lll_mutex_unlock_force): Add memory barrier between store and futex
7893 2003-08-25 Ulrich Drepper <drepper@redhat.com>
7895 * tst-cancel4.c (do_test): Also unlink tempfname and remove
7896 tempmsg in first loop.
7898 2003-08-18 Ulrich Drepper <drepper@redhat.com>
7900 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7901 _POSIX_THREAD_PRIORITY_SCHEDULING.
7902 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7904 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7906 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7907 (__rtld_lock_default_lock_recursive,
7908 __rtld_lock_default_unlock_recursive): Define.
7909 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7910 __rtld_lock_unlock_recursive): Define using
7911 GL(_dl_rtld_*lock_recursive).
7912 * init.c (__pthread_initialize_minimal_internal): Initialize
7913 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7914 Lock GL(_dl_load_lock) the same number of times as
7915 GL(_dl_load_lock) using non-mt implementation was nested.
7917 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7918 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7920 2003-08-06 Jakub Jelinek <jakub@redhat.com>
7922 * tst-cancel17.c (do_test): Make len2 maximum of page size and
7925 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7927 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7929 2003-08-03 Jakub Jelinek <jakub@redhat.com>
7931 * sysdeps/pthread/createthread.c (do_clone): Move error handling
7932 to first syscall error check. Move syscall error check for tkill
7933 into __ASSUME_CLONE_STOPPED #ifdef.
7935 2003-08-02 Ulrich Drepper <drepper@redhat.com>
7937 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7938 is not defined, do explicit synchronization.
7939 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
7940 is not defined also unlock pd->lock for non-debugging case in case
7942 * pthread_create.c (start_thread): Always get and release pd->lock
7943 if __ASSUME_CLONE_STOPPED is not defined.
7944 (start_thread_debug): Removed. Adjust users.
7945 * allocatestack.c (allocate_stack): Always initialize lock if
7946 __ASSUME_CLONE_STOPPED is not defined.
7947 * Makefile (tests): Add tst-sched1.
7948 * tst-sched1.c: New file.
7950 * sysdeps/pthread/createthread.c (do_clone): Only use
7951 sched_setschduler and pass correct parameters.
7953 2003-07-31 Jakub Jelinek <jakub@redhat.com>
7955 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7956 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7957 PTHREAD_STACK_MIN in comments.
7959 2003-07-31 Jakub Jelinek <jakub@redhat.com>
7961 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7962 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7964 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7965 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7966 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7967 (__pthread_cleanup_upto): Fix prototype.
7968 (_longjmp_unwind): Adjust caller.
7969 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7970 Change second argument to const struct pointer.
7971 * tst-sem8.c (main): Remove unused s2 and s3 variables.
7972 * tst-sem9.c (main): Likewise.
7973 * unwind.c: Include string.h for strlen prototype.
7975 2003-07-31 Ulrich Drepper <drepper@redhat.com>
7977 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7978 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7979 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7981 Patch by Nicholas Miell <nmiell@attbi.com>.
7983 2003-07-30 Jakub Jelinek <jakub@redhat.com>
7985 * init.c (__pthread_initialize_minimal_internal): Initialize
7986 GL(dl_init_static_tls).
7987 * pthreadP.h (__pthread_init_static_tls): New prototype.
7988 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7990 * Makefile (tests): Add tst-tls4.
7991 (modules-names): Add tst-tls4moda and tst-tls4modb.
7992 ($(objpfx)tst-tls4): Link against libdl and libpthread.
7993 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7995 * tst-tls4.c: New file.
7996 * tst-tls4moda.c: New file.
7997 * tst-tls4modb.c: New file.
7999 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
8001 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8002 before __timer_dealloc.
8003 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8004 Don't call list_unlink.
8006 2003-07-29 Roland McGrath <roland@redhat.com>
8008 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8010 2003-07-25 Jakub Jelinek <jakub@redhat.com>
8012 * tst-cancel17.c (do_test): Check if aio_cancel failed.
8013 Don't reuse struct aiocb A if it failed.
8014 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8015 not just one byte, as that does not block.
8017 2003-07-22 Jakub Jelinek <jakub@redhat.com>
8019 * sysdeps/pthread/unwind-resume.c: New file.
8020 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8021 unwind-resume in csu subdir.
8022 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8024 (librt-sysdep_routines, librt-shared-only-routines): Add
8026 * sysdeps/pthread/rt-unwind-resume.c: New file.
8027 * unwind-forcedunwind.c: New file.
8028 * Makefile (libpthread-routines): Add unwind-forcedunwind.
8029 (libpthread-shared-only-routines): Likewise.
8030 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8031 * pthreadP.h (pthread_cancel_init): New prototype.
8032 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8034 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8035 attr argument const struct pthread_attr *.
8037 * res.c (__res_state): Return __resp.
8038 * descr.h: Include resolv.h.
8039 (struct pthread): Add res field.
8040 * pthread_create.c: Include resolv.h.
8041 (start_thread): Initialize __resp.
8042 * Makefile (tests): Add tst-_res1.
8043 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8044 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8045 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8047 * tst-_res1.c: New file.
8048 * tst-_res1mod1.c: New file.
8049 * tst-_res1mod2.c: New file.
8051 2003-07-21 Ulrich Drepper <drepper@redhat.com>
8053 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8055 * Makefile: Define various *-no-z-defs variables for test DSOs
8056 which has undefined symbols.
8058 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8060 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8061 Retry if the stwcx fails to store once_control.
8063 2003-07-20 Ulrich Drepper <drepper@redhat.com>
8065 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8066 pthread_attr_setaffinity.
8067 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8068 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8069 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8070 * pthread_attr_destroy.c: Free cpuset element if allocated.
8071 * pthread_create.c: Pass iattr as additional parameter to
8073 * sysdeps/pthread/createthread.c: If attribute is provided and
8074 a new thread is created with affinity set or scheduling parameters,
8075 start thread with CLONE_STOPPED.
8076 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8077 pthread_attr_setaffinity.
8078 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8081 2003-07-15 Ulrich Drepper <drepper@redhat.com>
8083 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8085 2003-07-14 Ulrich Drepper <drepper@redhat.com>
8087 * sysdeps/pthread/configure.in: Require CFI directives also for
8090 2003-07-15 Jakub Jelinek <jakub@redhat.com>
8092 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8095 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8097 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8099 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8100 registers as variables. Call __pthread_mutex_unlock_usercnt.
8101 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8102 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8103 not self pointer in __writer. Compare with TID to determine
8105 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8106 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8108 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8110 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8111 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8112 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8113 macros also when compiling librt.
8115 2003-07-11 Jakub Jelinek <jakub@redhat.com>
8117 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8118 -fasynchronous-unwind-tables.
8119 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8120 (PSEUDO): Add cfi directives.
8121 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8123 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8126 2003-07-08 Jakub Jelinek <jakub@redhat.com>
8128 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8129 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8130 * unwind.c (__pthread_unwind_next): Add hidden_def.
8131 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8133 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8134 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8135 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8137 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8138 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8140 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8141 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8142 __pthread_unregister_cancel and __pthread_unwind_next.
8144 2003-07-04 Jakub Jelinek <jakub@redhat.com>
8146 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8147 different symbol for the cancellation syscall wrapper and
8148 non-cancellation syscall wrapper.
8149 (PSEUDO_END): Define.
8151 2003-07-05 Richard Henderson <rth@redhat.com>
8153 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8154 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8155 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8156 return actual return value from the syscall, not 0.
8158 2003-07-07 Ulrich Drepper <drepper@redhat.com>
8160 * descr.h (struct pthread): Add pid field.
8161 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8162 (__reclaim_stacks): Likewise.
8163 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8164 also check for PID of the signal source.
8165 (__pthread_initialize_minimal_internal): Also initialize pid field
8166 of initial thread's descriptor.
8167 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8168 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8169 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8170 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8171 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8173 2003-07-05 Ulrich Drepper <drepper@redhat.com>
8175 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8176 Fix use of parameter.
8177 (__libc_cleanup_pop): Likewise.
8179 2003-07-04 Ulrich Drepper <drepper@redhat.com>
8181 * init.c (sigcancel_handler): Change parameters to match handler
8182 for SA_SIGACTION. Check signal number and code to recognize
8183 invalid invocations.
8185 2003-07-03 Roland McGrath <roland@redhat.com>
8187 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8188 Apply sizeof (struct pthread) bias to r13 value.
8190 2003-07-03 Ulrich Drepper <drepper@redhat.com>
8192 * sysdeps/pthread/configure.in: Require CFI directives.
8194 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8196 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8197 libpthread compilation.
8198 * unwind.c (__pthread_unwind): Add hidden_def.
8199 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8201 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8203 * libc-cancellation.c (__libc_cleanup_routine): Define.
8204 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8205 (__pthread_cleanup_pop): Define.
8207 2003-07-01 Richard Henderson <rth@redhat.com>
8209 * sysdeps/alpha/elf/pt-initfini.c: New file.
8210 * sysdeps/alpha/pthread_spin_lock.S: New file.
8211 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8212 * sysdeps/alpha/pthreaddef.h: New file.
8213 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8214 * sysdeps/alpha/tls.h: New file.
8215 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8216 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8217 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8218 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8219 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8220 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8221 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8222 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8223 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8224 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8226 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8228 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8229 cleanup support and unwind info.
8231 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8233 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8234 Use correct cleanup handler registration. Add unwind info.
8235 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8236 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8237 * tst-once3.c: Add cleanup handler and check it is called.
8238 * tst-once4.c: Likewise.
8239 * tst-oncex3.c: New file.
8240 * tst-oncex4.c: New file.
8241 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8243 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8245 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8247 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8249 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8250 (tf_msgsnd): Likewise.
8252 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8253 premature returns a bit more.
8255 2003-06-26 Ulrich Drepper <drepper@redhat.com>
8257 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8258 definition to the front.
8260 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8261 the cleanup functions to make the names unique. Fix dwarf opcode
8263 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8264 functions to make the names unique. Fix CFA offset for two blocks.
8266 2003-06-25 Ulrich Drepper <drepper@redhat.com>
8268 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8269 missing closing braces.
8270 Patch by Christophe Saout <christophe@saout.de>.
8272 2003-06-24 Roland McGrath <roland@redhat.com>
8274 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8276 2003-06-24 Ulrich Drepper <drepper@redhat.com>
8278 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8279 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8281 * pthreadP.h: Declare __find_thread_by_id.
8282 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8283 * pthread_clock_gettime.c: Allow using other thread's clock.
8284 * pthread_clock_settime.c: Likewise.
8285 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8286 * Makefile: Add rules to build and run tst-clock2.
8287 * tst-clock2.c: New file.
8289 2003-06-23 Ulrich Drepper <drepper@redhat.com>
8291 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8292 to use exception-based cleanup handler.
8293 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8295 * tst-cond8.c (ch): Announce that we are done.
8297 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8299 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8300 Also test aio_suspend with timeout value.
8302 2003-06-22 Ulrich Drepper <drepper@redhat.com>
8304 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8305 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8308 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8309 (__pthread_mutex_lock_internal): Likewise.
8310 (__pthread_mutex_unlock_internal): Likewise.
8311 (__pthread_mutex_unlock_usercnt): Declare.
8312 * pthread_mutex_destroy.c: Always fail if used in any way.
8313 * pthread_mutex_init.c: Update comment.
8314 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8315 * pthread_mutex_timedlock.c: Adjust __nusers.
8316 * pthread_mutex_trylock.c: Adjust __nusers.
8317 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8318 and public interfaces are wrapper with pass additional parameter.
8319 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8321 * tst-mutex8.c: New file.
8322 * Makefile (tests): Add tst-mutex8.
8323 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8324 __pthread_mutex_unlock_usercnt.
8325 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8326 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8327 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8328 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8329 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8330 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8331 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8333 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8334 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8335 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8336 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8337 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8339 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8340 * pthread_mutex_timedlock.c: Likewise.
8341 * pthread_mutex_trylock.c: Adjust __nusers.
8342 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8343 * tst-mutex9.c: New file.
8344 * Makefile (tests): Add tst-mutex9.
8345 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8346 * sysdeps/ia64/tls.h: Likewise.
8347 * sysdeps/powerpc/tls.h: Likewise.
8348 * sysdeps/s390/tls.h: Likewise.
8349 * sysdeps/sh/tls.h: Likewise.
8350 * sysdeps/x86_64/tls.h: Likewise.
8351 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8352 Change type of __owner.
8353 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8354 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8355 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8356 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8357 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8359 2003-06-19 Jakub Jelinek <jakub@redhat.com>
8361 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8362 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8364 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8365 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8366 instead of nr to lll_futex_wake. Only set errno and return -1
8369 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8370 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8371 return actual return value from the syscall, not 0.
8373 2003-06-18 Ulrich Drepper <drepper@redhat.com>
8375 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8376 find a random value.
8377 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8380 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8381 compat_timer_settime.
8382 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8383 compat_timer_gettime.
8384 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8385 compat_timer_getoverrun.
8386 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8387 compat_timer_delete.
8389 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8390 error-checking mutex detect busy mutexes.
8392 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8394 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8395 Add ax to clobber list.
8396 (lll_mutex_cond_lock): Likewise.
8397 (lll_mutex_unlock): Likewise.
8398 (lll_lock): Likewise.
8399 (lll_unlock): Likewise.
8401 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8402 * tst-cancel18.c: New file.
8403 * tst-cancelx18.c: New file.
8405 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8408 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8409 * tst-cancel17.c: New file.
8410 * tst-cancelx17.c: New file.
8412 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8413 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8414 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8416 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8418 2003-06-16 Jakub Jelinek <jakub@redhat.com>
8420 * sysdeps/pthread/createthread.c (create_thread): Set
8421 header.multiple_threads unconditionally.
8422 * allocatestack.c (allocate_stack): Likewise.
8423 * descr.h (struct pthread): Add header.multiple_threads
8425 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8426 Define for librt. #error if neither libpthread, libc nor librt.
8427 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8429 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8430 CDISABLE): Likewise.
8431 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8432 CDISABLE): Likewise.
8433 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8434 CDISABLE): Likewise.
8435 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8436 CDISABLE): Likewise. Access header.multiple_threads outside of
8437 libc and libpthread.
8438 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8440 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8441 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8443 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8445 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8446 Also test early cancellation before the thread reaches the cancellation
8449 * Makefile: Compile forward.c with exceptions.
8451 * sysdeps/unix/sysv/linux/sleep.c: New file.
8453 2003-06-16 Ulrich Drepper <drepper@redhat.com>
8455 * Makefile: Add CFLAGS definition to compile function wrappers
8456 duplicated from libc with exceptions.
8457 * tst-cancel4.c: Also check cancellation handlers.
8459 * Makefile: Add rules to build and run tst-cancel16 and
8460 tst-cancelx16. Add missing CFLAGS definitions.
8461 * tst-cancel16.c: New file.
8462 * tst-cancelx16.c: New file.
8464 2003-06-15 Ulrich Drepper <drepper@redhat.com>
8466 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8467 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8468 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8469 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8471 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8472 (LIBC_CANCEL_RESET): Likewise.
8473 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8474 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8476 (CFLAGS-libcrt-cancellation.c): Define.
8477 * sysdeps/pthread/librt-cancellation.c: New file.
8478 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8479 macros also when compiling librt.
8480 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8481 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8482 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8483 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8484 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8485 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8486 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8488 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8489 compat_timer_create.
8491 2003-06-14 Ulrich Drepper <drepper@redhat.com>
8493 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8495 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8497 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8498 Add libc_hidden_def.
8500 2003-06-13 Roland McGrath <roland@redhat.com>
8502 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8503 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8505 2003-06-11 Ulrich Drepper <drepper@redhat.com>
8507 * allocatestack.c (queue_stack): Always inline.
8508 * ptreadhP.h (__do_cancel): Likewise.
8510 2003-06-10 Jakub Jelinek <jakub@redhat.com>
8512 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8515 2003-06-10 Ulrich Drepper <drepper@redhat.com>
8517 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8518 (__pthread_cond_signal): Remove incorrect second addition for
8521 2003-06-09 Ulrich Drepper <drepper@redhat.com>
8523 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8524 (__pthread_cond_signal): Use correct futex pointer in
8525 __lll_mutex_lock_wait call.
8527 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8528 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8530 2003-06-08 Ulrich Drepper <drepper@redhat.com>
8532 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8534 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8537 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8538 hand-written CFI generation code. Since ENTRY/END also initiated
8539 CFI frames this caused two CFI sets to be generated.
8541 2003-06-07 Ulrich Drepper <drepper@redhat.com>
8543 * cleanup_routine.c: New file.
8544 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8545 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8547 * Makefile (libpthread-routines): Add cleanup_routine.
8548 Add more CFLAGS variables to compile with exceptions. Add comments
8549 why which file needs unwind tables.
8550 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8552 * tst-cancelx1.c: New file.
8553 * tst-cancelx2.c: New file.
8554 * tst-cancelx3.c: New file.
8555 * tst-cancelx4.c: New file.
8556 * tst-cancelx5.c: New file.
8557 * tst-cancelx6.c: New file.
8558 * tst-cancelx7.c: New file.
8559 * tst-cancelx8.c: New file.
8560 * tst-cancelx9.c: New file.
8561 * tst-cancelx10.c: New file.
8562 * tst-cancelx11.c: New file.
8563 * tst-cancelx12.c: New file.
8564 * tst-cancelx13.c: New file.
8565 * tst-cancelx14.c: New file.
8566 * tst-cancelx15.c: New file.
8567 * tst-cleanupx0.c: New file.
8568 * tst-cleanupx0.expect: New file.
8569 * tst-cleanupx1.c: New file.
8570 * tst-cleanupx2.c: New file.
8571 * tst-cleanupx3.c: New file.
8573 * tst-cleanup0.c: Make standard compliant.
8574 * tst-cleanup1.c: Likewise.
8576 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8577 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8578 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8579 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8580 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8581 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8582 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8584 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8585 * tst-cancel12.c: New file.
8586 * tst-cancel13.c: New file.
8587 * tst-cancel14.c: New file.
8588 * tst-cancel15.c: New file.
8589 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8592 * tst-cancel1.c: Add some comments.
8594 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8597 2003-06-06 Ulrich Drepper <drepper@redhat.com>
8599 * Makefile (CFLAGS-pthread_cancel.c): Define.
8601 2003-06-05 Ulrich Drepper <drepper@redhat.com>
8603 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8604 Change type of __writer element to int.
8605 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8606 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8607 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8608 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8609 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8610 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8611 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8612 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8613 Compare with TID to determine deadlocks.
8614 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8615 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8616 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8617 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8618 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8619 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8621 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8623 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8624 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8625 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8627 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8629 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8630 * Makefile (tests): Add tst-rwlock12.
8631 * tst-rwlock12.c: New file.
8633 2003-06-05 Jakub Jelinek <jakub@redhat.com>
8635 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8636 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8637 Remove bogus hidden_proto.
8638 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8640 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8641 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8642 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8643 ___lll_mutex_timedlock): Likewise.
8645 2003-06-04 Ulrich Drepper <drepper@redhat.com>
8647 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8648 (__pthread_cond_signal): Add some code to eventually handle
8651 2003-06-01 Ulrich Drepper <drepper@redhat.com>
8653 * Makefile (tests): Add tst-exec4.
8654 (tst-exec4-ARGS): Define.
8655 * tst-exec4.c: New file.
8657 2003-05-31 Ulrich Drepper <drepper@redhat.com>
8659 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8660 Also fail if tv_nsec < 0.
8661 (__lll_timedwait_tid): Likewise.
8662 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8663 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8665 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8667 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8669 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8671 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8673 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8676 * Makefile (tests): Add tst-sem8 and tst-sem9.
8677 * tst-sem8.c: New file.
8678 * tst-sem9.c: New file.
8679 * sem_open.c: Fix creation of in_use record if the file exists but
8682 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8685 * sysdeps/pthread/timer_create.c (timer_create): In case
8686 evp==NULL, assign timer ID to sival_ptr.
8688 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8689 struct pthread_unwind_buf *.
8690 (struct pthread): Likewise for cleanup_jmp_buf element.
8692 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8693 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8694 * unwind.c (__pthread_unwind_next): Likewise.
8696 2003-05-30 Ulrich Drepper <drepper@redhat.com>
8698 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8699 (lll_futex_timed_wait): Use int for futex value parameter.
8700 (lll_futex_wake): Likewise.
8701 (lll_futex_requeue): Likewise.
8703 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8704 Replace one memory operation with one register operation.
8706 * tst-join4.c (do_test): Fix error message.
8708 * tst-rwlock6.c (do_test): Use correct format specifier.
8710 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8711 (__lll_mutex_lock_wait): Replace one memory operation with one
8713 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8714 (__lll_mutex_lock_wait): Likewise.
8716 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8717 (__lll_mutex_cond_lock): Add one to value parameter of
8718 __lll_lock_wait to reflect reality in the futex syscall.
8719 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8720 (lll_mutex_cond_lock): Likewise.
8722 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8724 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8726 (lll_mutex_cond_lock): Define.
8728 2003-05-29 Ulrich Drepper <drepper@redhat.com>
8730 * Makefile (tests): Add tst-signal6.
8731 * tst-signal6.c: New file.
8733 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8734 (__lll_mutex_unlock_force): New function
8735 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8737 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8738 (__lll_mutex_unlock_force): New function.
8739 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8741 * tst-rwlock7.c (do_test): Use correct format specifier.
8743 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8744 Find break parameter in correct asm argument.
8746 2003-05-27 Jakub Jelinek <jakub@redhat.com>
8748 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8750 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8752 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8754 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8755 lll_futex_requeue, lll_mutex_unlock_force): Define.
8757 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8759 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8760 (pthread_cond_t): Add __mutex.
8761 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8762 lll_futex_requeue, lll_mutex_unlock_force): Define.
8764 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8766 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8767 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8769 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8771 (lll_futex_wait, lll_futex_wake): Define.
8772 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8773 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8774 FUTEX_REQUEUE instead of FUTEX_WAIT.
8775 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8776 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8777 mutex which was used in condvar structure. Call
8778 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8779 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8781 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8782 include tcb-offsets.h. Read wakeup value in locked region.
8783 Use the value of gbr register as THREAD_ID.
8784 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8785 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8786 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8788 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8791 2003-05-28 Ulrich Drepper <drepper@redhat.com>
8793 * sysdeps/pthread/pthread_cond_broadcast.c
8794 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8796 2003-05-26 Ulrich Drepper <drepper@redhat.com>
8798 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8799 typo in register name.
8800 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8801 correctly. Actually use requeue. Little optimization.
8802 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8803 mutex address early. Handle cancellation state as 32-bit value.
8804 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8805 Remove unnecessary label.
8807 2003-05-25 Ulrich Drepper <drepper@redhat.com>
8809 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8810 instead of FUTEX_WAIT.
8811 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8812 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8813 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8814 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8815 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8816 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8817 used in condvar structure. Call __pthread_mutex_cond_lock instead
8818 of __pthread_mutex_lock_internal.
8819 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8820 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8821 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8822 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8823 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8824 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8825 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8826 Add pthread_mutex_cond_lock.
8827 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8828 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8829 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8830 lll_mutex_cond_lock.
8831 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8832 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8833 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8835 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8836 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8838 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8839 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8841 * pthreadP.h: Declare __pthread_mutex_cond_lock.
8842 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8843 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
8844 macro don't define aliases.
8846 * cancellation.c: Remove __pthread_enable_asynccancel_2.
8847 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8848 * sysdeps/pthread/pthread_cond_timedwait.c: Use
8849 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8850 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8851 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8852 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8853 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8854 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8856 2003-05-17 Ulrich Drepper <drepper@redhat.com>
8858 * sem_open.c: Fix one endless loop. Implement correct semantics
8859 wrt opening the same semaphore more then once.
8860 * sem_close.c: Adjust for sem_open change.
8861 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
8862 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8863 * Makefile (tests): Add tst-sem7.
8864 * tst-sem7.c: New file.
8866 2003-05-16 Roland McGrath <roland@redhat.com>
8868 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8869 uninitialized variable braino.
8871 2003-05-16 Ulrich Drepper <drepper@redhat.com>
8873 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8874 test for syscall availability.
8876 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8877 __no_posix_timers to -1 if the syscalls don't exist.
8879 * pthread_join.c (pthread_join): Set tid field of the joined
8880 thread to -1. This isn't necessary but helps to recognize some
8881 error conditions with almost no cost.
8883 * allocatestack.c (FREE_P): Also negative values indicate an
8886 * unwind.c: Include <unistd.h>.
8888 2003-05-14 Ulrich Drepper <drepper@redhat.com>
8890 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8892 2003-05-14 Jakub Jelinek <jakub@redhat.com>
8894 * Makefile (crti-objs, crtn-objs): New variables.
8895 (omit-deps, extra-objs): Add crtn.
8896 ($(objpfx)libpthread.so): Depend on both crti and crtn
8897 and links to them in multidir.
8898 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8900 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
8902 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8903 (lll_mutex_unlock): Use atomic_exchange_rel.
8905 2003-05-11 Ulrich Drepper <drepper@redhat.com>
8907 * cond-perf.c (cons): Add missing locking around setting of alldone.
8909 2003-05-10 Ulrich Drepper <drepper@redhat.com>
8911 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8913 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8915 2003-05-09 Ulrich Drepper <drepper@redhat.com>
8917 * tst-sem6.c: New file.
8918 * Makefile (tests): Add tst-sem6.
8920 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8921 Use atomic_exchange_rel instead of atomic_exchange.
8922 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8925 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8926 code for lll_futex_wait and lll_futex_wake in static apps. Use
8927 vsyscall is possible.
8929 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8930 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8931 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8932 pthread_setaffinity_np.
8933 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8934 and pthread_setaffinity_np.
8935 * Makefile (libpthread-routines): Add pthread_getaffinity and
8936 pthread_setaffinity.
8938 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8939 use it in case mmap to allocate the stack fails.
8940 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8941 ARCH_MAP_FLAGS here.
8942 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8945 2003-05-08 Ulrich Drepper <drepper@redhat.com>
8947 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8948 handler implementation. It is now lockless in fork().
8949 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8950 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8951 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
8952 declare the __fork_*_lists.
8953 (struct fork_handler): Include pointers to all three functions.
8954 Add next, refcntr and need_signal elements.
8955 (__fork_handlers): New declaration.
8956 (__register_atfork_malloc): Remove declaration.
8957 (HAVE_register_atfork_malloc): Remove definition.
8958 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8959 __pthread_child_handler variable.
8960 (__libc_pthread_init): Use __register_atfork instead of explicitly
8962 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8964 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8966 * unwind.c (unwind_cleanup): Print error message and then abort. This
8967 function must never be reached.
8969 * cond-perf.c: New file.
8971 2003-05-05 Ulrich Drepper <drepper@redhat.com>
8973 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8975 2003-05-04 Roland McGrath <roland@redhat.com>
8977 * Makefile ($(objpfx)../libc.so): New target.
8979 2003-05-02 Ulrich Drepper <drepper@redhat.com>
8981 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8982 (pthread_condattr_t): Size is only an int, don't use long for
8984 (pthread_mutexattr_t): Likewise.
8985 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8986 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8987 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8989 2003-05-01 Ulrich Drepper <drepper@redhat.com>
8991 * sysdeps/i386/tls.h: Define THREAD_ID.
8992 * sysdeps/ia64/tls.h: Likewise.
8993 * sysdeps/powerpc/tls.h: Likewise.
8994 * sysdeps/s390/tls.h: Likewise.
8995 * sysdeps/sh/tls.h: Likewise.
8996 * sysdeps/x86_64/tls.h: Likewise.
8997 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8999 * pthread_mutex_timedlock.c: Likewise.
9000 * pthread_mutex_trylock.c: Likewise.
9001 * pthread_mutex_unlock.c: Likewise.
9002 * pthread_rwlock_trywrlock.c: Likewise.
9003 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9004 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9005 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9006 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9008 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9011 2003-04-29 Jakub Jelinek <jakub@redhat.com>
9013 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9014 (__SIZEOF_PTHREAD_COND_T): Define to 48.
9015 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9016 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9017 Make __align long long instead of long.
9018 (pthread_rwlock_t): Formatting.
9019 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9020 (pthread_rwlock_t): Formatting.
9021 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9022 (pthread_cond_t): Make __align long long instead of long.
9023 (pthread_rwlock_t): Move __flags field to the same position as in
9026 2003-04-30 Ulrich Drepper <drepper@redhat.com>
9028 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9029 * tst-rwlock7.c (do_test): Likewise.
9031 2003-04-26 Roland McGrath <roland@redhat.com>
9033 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9035 2003-04-22 Jakub Jelinek <jakub@redhat.com>
9037 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9038 sizeof (struct pthread).
9039 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9041 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9043 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9045 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9047 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9049 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9051 (NO_TLS_OFFSET): Define.
9052 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9053 add TLS_TCB_SIZE unnecessarily.
9055 2003-04-22 Roland McGrath <roland@redhat.com>
9057 * Makeconfig (shared-thread-library): Reverse link order to work
9060 2003-04-22 Ulrich Drepper <drepper@redhat.com>
9062 * semaphore.h: Fix typo in comment.
9064 2003-04-21 Ulrich Drepper <drepper@redhat.com>
9066 * sysdeps/pthread/sigfillset.c: New file.
9068 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9069 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9070 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9071 * sysdeps/pthread/sigaction.c: Likewise.
9072 * sysdeps/pthread/sigprocmask.c: New file.
9073 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9075 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9076 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9079 2003-04-19 Ulrich Drepper <drepper@redhat.com>
9081 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9082 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9084 * sysdeps/unix/sysv/linux/unregister-atfork.c
9085 (__unregister_atfork): Don't free memory not allocated dynamically.
9087 * semaphore.h: Remove __THROW marker from cancellation points.
9088 * nptl/sysdeps/pthread/pthread.h: Likewise.
9090 2003-04-18 Ulrich Drepper <drepper@redhat.com>
9092 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9093 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9096 2003-04-16 Jakub Jelinek <jakub@redhat.com>
9098 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9100 2003-04-15 Roland McGrath <roland@redhat.com>
9102 * forward.c (__pthread_unwind): Tweak to avoid warning.
9104 2003-04-15 Ulrich Drepper <drepper@redhat.com>
9106 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9108 2003-04-14 Ulrich Drepper <drepper@redhat.com>
9110 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9111 overflow CFA advance instructions.
9112 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9114 2003-04-14 Jakub Jelinek <jakub@redhat.com>
9116 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9117 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9118 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9121 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9122 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9123 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9124 DW_CFA_advance_loc for .Laddl-.Lsubl.
9126 2003-04-13 Ulrich Drepper <drepper@redhat.com>
9128 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9129 position-independent unwind data for static libraries.
9130 Add missing unwind info. Add comments.
9132 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9133 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9134 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9135 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9137 2003-04-12 Ulrich Drepper <drepper@redhat.com>
9139 * Makefile: Make sure all cancellation points are compiled with
9140 exception and asynchronous unwind tables.
9142 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9143 which mishandles loading of global object addresses in PIC.
9144 (THREAD_SETMEM_NC): Likewise.
9146 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9148 * pthread.h: Define new data structure for cleanup buffer. Declare
9149 new cleanup handler interfaces.
9150 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9151 (struct pthread): Add cleanup_jmp_buf pointer. Define
9152 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9153 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9154 it. Declare old cleanup handler installation functions.
9155 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9157 * cleanup_defer.c: Likewise.
9158 * cleanup_compat.c: New file. Old cleanup code.
9159 * cleanup_def_compat.c: New file. Old cleanup code.
9160 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9161 if own thread descriptor.
9162 * unwind.c: New file.
9163 * forward.c: Add __pthread_unwind.
9164 * init.c (pthread_functions): Add __pthread_unwind.
9165 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9166 Add ptr___pthread_unwind.
9167 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9168 and unwind function.
9169 * Makefile (libpthread-routines): Add cleanup_compat,
9170 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9171 table generation if necessary.
9172 * version.c: Record whether unwind support is compiled in.
9173 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9174 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9176 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9177 complication to generate unwind information for syscall wrappers.
9178 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9179 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9180 __cleanup_fct_attribute.
9182 * Makefile: Add rules to build and run tst-cleanup0.
9183 * tst-cleanup0.c: New file.
9184 * tst-cleanup0.expect: New file.
9186 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9187 caller. Optimize to avoid often unecessary local variable.
9189 2003-04-11 Roland McGrath <roland@redhat.com>
9191 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9192 sets variable `multidir'; include that.
9193 (generated): Add it.
9194 ($(objpfx)$(multidir)/crti.o): New target.
9195 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9197 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9199 * tst-attr2.c (do_test): Add cast to avoid warning.
9200 * tst-mutex4.c (do_test): Likewise.
9202 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9204 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9207 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9209 * Makefile (tests): Add tst-detach1.
9210 * tst-detach1.c: New file.
9212 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9214 * sysdeps/pthread/pthread.h: Remove duplicate
9215 pthread_cleanup_{push,pop} definitions.
9217 * tst-barrier2.c: Eliminate warnings.
9218 * tst-cancel4.c: Likewise.
9219 * tst-cond4.c: Likewise.
9220 * tst-cond6.c: Likewise.
9221 * tst-detach1.c: Likewise.
9222 * tst-rwlock4.c: Likewise.
9223 * tst-rwlock6.c: Likewise.
9224 * tst-rwlock7.c: Likewise.
9225 * tst-sem3.c: Likewise.
9226 * tst-spin2.c: Likewise.
9227 * tst-umask1.c: Likewise.
9229 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9231 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9233 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9235 * descr.h (struct pthread): Move cancelhandling member to the front.
9237 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9239 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9240 malloc_parent, and malloc_child statically.
9241 (__register_atfork_malloc): New function.
9242 (free_mem): Don't free any of the malloc_* variables on the list.
9243 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9244 Define HAVE_register_atfork_malloc.
9246 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9248 * sysdeps/pthread/createthread.c (create_thread): Add some more
9249 comments explaining when to set multiple_threads and when not.
9251 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9252 THREAD_ATOMIC_BIT_SET if not already defined.
9253 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9254 THREAD_ATOMIC_BIT_SET:
9255 * sysdeps/x86_64/tls.h: Likewise.
9256 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9257 THREAD_ATOMIC_CMPXCHG_VAL.
9258 (_pthread_cleanup_pop_restore): Likewise.
9259 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9260 (__pthread_enable_asynccancel_2): Likewise.
9261 (__pthread_disable_asynccancel): Likewise.
9262 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9263 (__libc_disable_asynccancel): Likewise.
9264 * init.c (sigcancel_handler): Likewise.
9265 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9266 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9268 2003-04-03 Ulrich Drepper <drepper@redhat.com>
9270 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9271 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9272 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9273 * Makefile (tests): Add tst-cancel11.
9274 * tst-cancel11.c: New file.
9276 2003-04-01 Ulrich Drepper <drepper@redhat.com>
9278 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9279 round, not the first. Use specific_used flag instead of local
9280 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9281 (__free_tcb): Don't call deallocate_tsd here.
9282 (start_thread): Call deallocate_tsd here.
9283 * pthread_setspecific.c: Set specific_used flag really only when
9285 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9286 * tst-tsd3.c: New file.
9287 * tst-tsd4.c: New file.
9289 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9291 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9292 Use atomic_exchange_and_add instead of __lll_add.
9293 (__lll_mutex_timedlock): Likewise.
9294 Patch by Ian Wienand.
9296 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9298 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9299 (SINGLE_THREAD_P): Fix typo.
9300 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9302 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9304 * Makefile (tests): Add tst-align.
9305 * tst-align.c: New file.
9306 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9308 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9311 * tst-tsd2.c: Add casts to avoid warnings.
9313 2003-03-30 Ulrich Drepper <drepper@redhat.com>
9315 * descr.h (struct pthread): Move most often used elements to the front.
9317 2003-03-29 Ulrich Drepper <drepper@redhat.com>
9319 * Makefile (libpthread-routines): Add pthread_atfork.
9320 (libpthread-static-only-routines): Add pthread_atfork.
9322 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9324 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9326 (INSTALL_DTV): Add parens.
9327 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9328 Use passed descr instead of THREAD_SELF.
9329 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9330 (__lll_mutex_timedlock_wait): Correct expected value after
9332 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9333 Release lock before waking up the waiters.
9334 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9335 criteria. Reorderstruct passed to cleanup handler. Fix
9336 handling of cancellation and failung pthread_mutex_unlock call.
9337 Use __pthread_enable_asynccancel_2 instead of
9338 __pthread_enable_asynccancel.
9339 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9340 Return result of lock re-get if it fails.
9341 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9342 for __pthread_cleanup_push.
9343 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9344 completely broken rwlock implementation.
9345 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9346 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9347 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9348 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9349 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9350 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9351 versioned_symbol macro.
9352 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9353 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9355 2003-03-27 Ulrich Drepper <drepper@redhat.com>
9357 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9358 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9360 (struct timer): Remove th and bar field.
9361 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9362 debugging code. Create only one helper thread.
9363 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9365 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9366 Renamed. Define statically. Use thread info from siginfo.
9367 (__helper_once): New variable.
9368 (__helper_tid): New variable.
9369 (__reset_helper_control): New function.
9370 (__start_helper_thread): New function.
9372 * pthread_create.c (start_thread): Don't use setjmp inside
9373 __builtin_expect to work around gcc bug.
9375 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9376 timer_delete syscall fails, but not with ENOSYS, set
9379 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9380 (timer_settime): Fix typo.
9381 * sysdeps/unix/sysv/linux/timer_getoverr.c
9382 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9384 2003-03-27 Jakub Jelinek <jakub@redhat.com>
9386 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9387 offset of cleanupbuf.__prev.
9389 2003-03-26 Jakub Jelinek <jakub@redhat.com>
9391 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9394 2003-03-26 Ulrich Drepper <drepper@redhat.com>
9396 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9397 NULL provide default definition to syscall.
9399 2003-03-25 Roland McGrath <roland@redhat.com>
9401 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9402 (timer_id2ptr): Fix typo.
9404 2003-03-25 Ulrich Drepper <drepper@redhat.com>
9406 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9407 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9408 * sysdeps/ia64/pthreaddef.h: Likewise.
9409 * sysdeps/powerpc/pthreaddef.h: Likewise.
9410 * sysdeps/s390/pthreaddef.h: Likewise.
9411 * sysdeps/sh/pthreaddef.h: Likewise.
9412 * sysdeps/x86_64/pthreaddef.h: Likewise.
9413 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9414 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9416 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9417 SIGTIMER is not unblocked.
9418 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9420 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9422 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9423 pass pointer through as ID.
9424 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9425 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9426 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9427 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9428 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9429 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9430 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9431 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9432 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9433 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9434 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9435 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9436 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9437 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9438 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9439 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9440 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9441 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9442 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9443 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9444 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9445 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9446 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9447 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9448 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9449 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9450 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9451 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9452 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9453 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9454 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9455 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9456 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9458 * pthreadP.h: Remove FRAME_LEFT definition.
9459 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9460 already left frame. Programs which have this problem are not POSIX
9462 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9464 2003-03-24 Ulrich Drepper <drepper@redhat.com>
9466 * sysdeps/pthread/tst-timer.c: Check return values of the
9469 2003-03-23 Roland McGrath <roland@redhat.com>
9471 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9472 * tst-tls3mod.c: Likewise.
9473 * tst-tls1.c: Likewise.
9474 * tst-tls2.c: Likewise.
9476 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9479 * tst-join5.c (tf1, tf2): Add a cast.
9481 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9483 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9484 Don't test anything.
9485 * tst-cond4.c: Likewise.
9486 * tst-cond6.c: Likewise.
9487 * tst-flock2.c: Likewise.
9488 * tst-mutex4.c: Likewise.
9489 * tst-rwlock4.c: Likewise.
9490 * tst-signal1.c: Likewise.
9491 * tst-spin2.c: Likewise.
9492 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9494 * tst-mutex4.c: Use test-skeleton.c.
9495 * tst-spin2.c: Likewise.
9496 * tst-sysconf.c: Likewise.
9497 * tst-barrier2.c: Likewise.
9498 * tst-cond4.c: Likewise.
9499 * tst-cond6.c: Likewise.
9500 * tst-rwlock4.c: Likewise.
9501 * tst-unload.c: Likewise.
9502 * tst-flock2.c (do_test): Use return instead of exit.
9504 2003-03-22 Jakub Jelinek <jakub@redhat.com>
9506 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9508 2003-03-21 Ulrich Drepper <drepper@redhat.com>
9510 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9511 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9512 instead of __lll_compare_and_swap.
9513 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9515 Removed definition if __lll_compare_and_swap.
9517 * cancellation.c: Adjust for new form of compare&exchange macros.
9518 * cleanup_defer.c: Likewise.
9520 * libc-cancellation.c: Likewise.
9521 * old_pthread_cond_broadcast.c: Likewise.
9522 * old_pthread_cond_signal.c: Likewise.
9523 * old_pthread_cond_timedwait.c: Likewise.
9524 * old_pthread_cond_wait.c: Likewise.
9525 * pthread_cancel.c: Likewise.
9526 * pthread_create.c: Likewise.
9527 * pthread_detach.c: Likewise.
9528 * pthread_join.c: Likewise.
9529 * pthread_key_delete.c: Likewise.
9530 * pthread_setcancelstate.c: Likewise.
9531 * pthread_setcanceltype.c: Likewise.
9532 * pthread_timedjoin.c: Likewise.
9533 * pthread_tryjoin.c: Likewise.
9534 * sysdeps/pthread/createthread.c: Likewise.
9536 2003-03-20 Ulrich Drepper <drepper@redhat.com>
9538 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9539 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9540 definitions. Replace uses with calls to atomic_* functions.
9541 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9542 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9543 __lll_test_and_set calls with atomic_exchange_and_add and
9544 atomic_exchange calls respectively.
9545 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9546 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9547 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9548 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9549 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9550 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9551 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9553 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9554 returns the old value.
9556 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9558 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9559 int for variable OLDVAL and correct inline assembler contraint.
9560 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9561 type int for variable OLD.
9563 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9565 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9566 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9567 instead of multiple_threads field in the TCB.
9569 2003-03-19 Ulrich Drepper <drepper@redhat.com>
9571 * sysdeps/i386/i686/bits/atomic.h: Removed.
9572 * sysdeps/i386/i586/bits/atomic.h: Removed.
9573 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9574 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9575 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9576 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9577 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9578 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9579 * atomic.h: Removed. Moved to glibc.
9581 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9582 support for clock selection.
9584 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9587 2003-03-18 Roland McGrath <roland@redhat.com>
9589 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9590 Add __lll_rel_instr first. Add memory clobber.
9591 (lll_mutex_unlock): Use __lll_test_and_set.
9592 From Paul Mackerras <paulus@samba.org>.
9594 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9596 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9597 (SINGLE_THREAD_P): Add `header.' prefix.
9598 From Paul Mackerras <paulus@samba.org>.
9600 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9601 pthread_timedjoin_np to ...
9602 (libpthread: GLIBC_2.3.3): ... here.
9603 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9605 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9606 Avoid shadowing VAL variable.
9608 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9611 2003-03-18 Ulrich Drepper <drepper@redhat.com>
9613 * Makefile (tests): Add tst-cond11.
9614 * tst-cond11.c: New file.
9616 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9617 struct passed to cleanup handler to eliminate one more
9619 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9621 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9622 (pthrad_cond_t): Replace __unused field with __clock.
9624 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9625 waken all waiters in cleanup handler.
9626 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9627 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9629 * pthread_condattr_getclock.c: New file.
9630 * pthread_condattr_setclock.c: New file.
9631 * sysdeps/pthread/pthread.h: Declare these new functions.
9632 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9633 * Makefile (libpthread-routines): Add the new functions.
9634 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9635 Renamed field to value. Document use of the bits.
9636 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9638 * pthread_condattr_setpshared.c: Likewise.
9639 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9640 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9641 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9643 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9644 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9645 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9646 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9647 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9648 Implement clock selection.
9649 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9650 * pthread-errnos.sym: Add ENOSYS.
9651 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9652 _POSIX_CLOCK_SELECTION.
9653 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9655 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9656 invalid .size directive.
9658 2003-03-17 Roland McGrath <roland@redhat.com>
9660 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9663 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9665 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9666 Use __lll_add instead of spelling it out. Use protected symbol names.
9667 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9669 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9670 Renamed from lll_compare_and_swap. Use new name where necessary.
9671 (__lll_add): Defined.
9672 (__lll_dec_if_positive): Defined.
9673 (__lll_test_and_set): Defined.
9674 * sysdeps/ia64/pthread_spin_init.c: Removed.
9675 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9676 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9677 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9678 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9679 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9680 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9681 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9682 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9683 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9684 __sync_lock_release_si.
9685 Patch by Jakub Jelinek.
9687 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9688 Fix timeout handling.
9689 (__lll_timedwait_tid): Likewise.
9690 (lll_unlock_wake_cb): Wake up other waiters if necessary.
9691 Patch by Jakub Jelinek.
9693 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9695 2003-03-17 Roland McGrath <roland@redhat.com>
9697 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9698 * sysdeps/pthread/pthread_spin_init.c: New file.
9699 * sysdeps/pthread/pthread_spin_unlock.c: New file.
9700 * sysdeps/powerpc/Makefile: New file.
9701 * sysdeps/powerpc/pthread_spin_lock.c: New file.
9702 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9703 * sysdeps/powerpc/pthreaddef.h: New file.
9704 * sysdeps/powerpc/tcb-offsets.sym: New file.
9705 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9706 * sysdeps/powerpc/tls.h: New file.
9707 * sysdeps/powerpc/bits/atomic.h: New file.
9708 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9709 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9710 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9712 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9713 * sysdeps/unix/sysv/linux/sem_post.c: New file.
9714 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9715 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9716 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9717 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9718 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9719 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9720 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9721 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9722 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9723 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9724 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9725 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9726 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9728 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9730 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9731 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9732 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9733 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9734 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9736 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9738 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9739 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9740 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9741 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9742 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9744 2003-03-16 Roland McGrath <roland@redhat.com>
9746 * tst-fork4.c: Include <string.h>.
9747 * tst-signal2.c: Likewise.
9748 * tst-mutex5.c (do_test): exit -> return.
9749 * tst-mutex2.c: Include <stdlib.h>.
9751 2003-03-16 Ulrich Drepper <drepper@redhat.com>
9753 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9754 (__lll_mutex_timedlock_wait): Correct expected value after
9755 spurious wakeup. Otherwise we would never wait again.
9757 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9758 zone versus inline asm stupidity. Use correct instructions.
9760 * tst-rwlock6.c: Add some more status output.
9762 2003-03-15 Roland McGrath <roland@redhat.com>
9764 * sysdeps/pthread/configure.in: New file.
9765 * sysdeps/pthread/configure: New file (generated).
9767 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9769 * allocatestack.c (allocate_stack): Store the exact stack size of
9770 user allocated stacks.
9772 2003-03-15 Jakub Jelinek <jakub@redhat.com>
9774 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9775 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9776 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9777 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9778 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9779 Use `header.' prefix.
9780 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9782 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9784 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9785 __builtin_frame_address, use stack pointer.
9787 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9788 instead of __builtin_frame_pointer.
9790 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9792 * tst-basic1.c (do_test): Add cast to avoid warning.
9793 * tst-basic2.c (do_test): Likewise.
9795 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9796 amount of stack correction.
9798 * tst-fork4.c: Use test-skeleton.c.
9800 2003-03-14 Roland McGrath <roland@redhat.com>
9802 * init.c: Fix typo "#eli" for "#else".
9804 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9806 * allocatestack.c (__stack_user): Use hidden_data_def.
9807 * pthread_create.c (__pthread_keys): Likewise.
9809 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9811 2003-03-14 Roland McGrath <roland@redhat.com>
9813 * tst-fork4.c: New file.
9814 * Makefile (tests): Add it.
9816 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9817 we always define the padding space.
9818 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9819 stopped supporting its own extensions fully.
9820 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9821 struct also called `header', so `header.multiple_threads' is the field
9822 name to use on all machines.
9823 * allocatestack.c (allocate_stack): Use `header.' prefix.
9824 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9825 * pthread_create.c (__pthread_create_2_1): Likewise.
9826 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9827 (THREAD_SELF): Likewise.
9828 * sysdeps/x86_64/tls.h: Likewise.
9829 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9830 (SINGLE_THREAD_P): Likewise.
9831 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9832 (SINGLE_THREAD_P): Likewise.
9833 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9834 (SINGLE_THREAD_P): Likewise.
9836 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9839 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9841 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9842 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9844 * pthread_create.c (start_thread): setjmp is expected to return 0.
9846 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9847 (THREAD_GETMEM_NC): Likewise.
9849 2003-03-13 Ulrich Drepper <drepper@redhat.com>
9851 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9852 and the size of the stack which must be allocated is a multiple,
9853 allocate one more page.
9854 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9855 MULTI_PAGE_ALIASING.
9857 2003-03-13 Roland McGrath <roland@redhat.com>
9859 * pthread_create.c (start_thread): Set EXITING_BIT after the
9860 event-reporting (and destructors), not before.
9862 2003-03-13 Jakub Jelinek <jakub@redhat.com>
9864 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9865 lll_futex_wake): Declare register variables as long int instead of
9866 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9867 Make syscall arguments clobbered by the syscall.
9868 (lll_futex_wait): Define using lll_futex_timed_wait.
9870 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9873 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9876 * allocatestack.c (nptl_ncreated): Only declare if
9877 COLORING_INCREMENT != 0.
9879 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9880 (__libc_enable_asynccancel_2): Remove prototype.
9882 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9883 ctid to match kernel.
9885 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9887 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9888 libc_multiple_threads.
9889 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9890 __libc_multiple_threads to...
9891 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
9893 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9895 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9896 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9898 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9899 (__pthread_once_internal): Define.
9901 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9902 macros instead of .symver directly.
9903 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9904 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9906 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9907 * sysdeps/x86_64/tcb-offsets.sym: New file.
9908 * sysdeps/x86_64/Makefile: New file.
9910 * sysdeps/i386/tcb-offsets.sym: Add SELF.
9911 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9912 to access own pthread_t in TCB.
9913 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9915 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9917 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9919 2003-03-12 Roland McGrath <roland@redhat.com>
9921 * pthread-errnos.sym: New file.
9922 * Makefile (gen-as-const-headers): New variable, list that file.
9923 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9924 header <pthread-errnos.h> instead of defining errno values here.
9925 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9926 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9927 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9928 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9929 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9931 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9933 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9934 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9935 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9936 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9937 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9938 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9939 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9940 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9941 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9942 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9943 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9944 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9945 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9946 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9947 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9948 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9949 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9950 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9951 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9952 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9953 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9954 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9955 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9956 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9957 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9958 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9959 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9961 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9962 CLONE_CHILD_SETTID worked.
9964 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9966 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9968 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9971 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9972 (pthread_cond_t): Add padding.
9974 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9975 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9976 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9978 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9979 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9980 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9981 (__pthread_rwlock_timedrdlock): Likewise.
9982 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9983 (__pthread_rwlock_wrlock): Likewise.
9984 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9985 (__pthread_rwlock_rdlock): Likewise.
9987 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9989 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9990 result of lock re-get if it fails.
9992 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9994 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9995 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9996 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9997 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9998 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9999 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10000 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10001 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10002 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10003 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10005 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10006 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10008 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10009 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10010 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10011 (create_thread): Likewise.
10012 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10013 * init.c (__pthread_initialize_minimal_internal): Initialize
10014 __libc_multiple_threads_ptr if necessary.
10015 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
10016 __pthread_multiple_threads and __libc_multiple_threads_ptr.
10017 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10018 __libc_multiple_threads.
10019 (__libc_pthread_init): Return pointer to __libc_pthread_init if
10022 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10023 (THREAD_SETMEM_NC): Likewise.
10025 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10026 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10027 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10028 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10030 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10031 Eliminate one entire instruction.
10033 * cancellation.c (__pthread_enable_asynccancel_2): New function.
10034 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10035 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10036 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10037 instead of __pthread_enable_asynccancel.
10038 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10039 (__pthread_cond_wait): Likewise.
10040 * sysdeps/pthread/pthread_cond_timedwait.c
10041 (__pthread_cond_timedwait): Likewise.
10042 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10044 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10045 (__condvar_cleanup): Wake up all waiters in case we got signaled
10046 after being woken up but before disabling asynchronous
10048 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10049 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10050 (__condvar_cleanup): Likewise.
10052 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10053 Make it an error if architecture has no #if case. Add x86-64.
10055 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10056 pt-initfini.s generation.
10058 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10059 (TLS_INIT_TP): Fix typo.
10061 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10063 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10064 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10066 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10067 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10068 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10069 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10070 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10071 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10072 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10073 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10075 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10077 * sysdeps/pthread/pthread_cond_timedwait.c
10078 (__pthread_cond_timedwait): Return the result of the final
10079 locking. If it succeeds, the regular function return value.
10081 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10082 Return result of the final locking.
10083 * version.c (__nptl_main): Work around problems with the strange
10084 INTERNAL_SYSCALL macro on ppc32.
10085 * init.c (__pthread_initialize_minimal_internal): Unblock
10086 SIGCANCEL in case the parent blocked it.
10087 Reported by Paul Mackerras <paulus@samba.org>.
10089 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10090 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10091 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10093 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10095 * sysdeps/pthread/pthread_cond_timedwait.c
10096 (__pthread_cond_timedwait): Unlock and fail if
10097 __pthread_mutex_unlock_internal failed.
10099 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10100 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10102 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10103 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10104 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10105 ALLOCATE_STACK): New macros.
10106 (TLS_TPADJ): New macro.
10107 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10108 (allocate_stack): Handle TLS_DTV_AT_TP and
10109 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10110 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10111 Don't set PD->self.
10112 * init.c [__ia64__] (__NR_set_tid_address): Define.
10114 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10115 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10116 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10117 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10118 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10119 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10120 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10121 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10122 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10123 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10124 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10125 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10126 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10127 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10128 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10129 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10130 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10131 * sysdeps/ia64/bits/atomic.h: New file.
10132 * sysdeps/ia64/Makefile: New file.
10133 * sysdeps/ia64/pthread_spin_init.c: New file.
10134 * sysdeps/ia64/pthread_spin_lock.c: New file.
10135 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10136 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10137 * sysdeps/ia64/pthreaddef.h: New file.
10138 * sysdeps/ia64/tcb-offsets.sym: New file.
10139 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10140 * sysdeps/ia64/tls.h: New file.
10142 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10143 to syscall instead of no arguments.
10145 2003-03-10 Ulrich Drepper <drepper@redhat.com>
10147 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10148 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10149 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10150 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10152 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10155 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10157 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10158 lowlevelbarrier.sym.
10159 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10160 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10161 Include lowlevelbarrier.h and don't define offsets locally.
10162 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10164 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10165 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10166 (__lll_mutex_timedlock_wait): Likewise.
10167 (lll_mutex_lock): Adjust asm for that.
10168 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10169 (lll_lock): Adjust asm for operand order change.
10170 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10171 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10173 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10174 Reverse order of parameters.
10175 (__lll_timedwait_tid): Remove regparms attribute.
10176 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10177 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10179 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10180 (__lll_timedwait_tid): Remove one unnecessary instruction.
10182 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10183 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10184 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10187 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10188 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10190 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10193 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10194 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10196 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10197 define LOCK here (if UP is not defined). The actual code is in
10200 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10201 LOCK is already defined. Don't define lll_unlock_wake_cb and
10202 __lll_timedwait_tid for libc.so.
10203 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10204 define LOCK here (if UP is not defined). The actual code is in
10207 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10208 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10209 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10210 instead of lowlevelsem.h.
10211 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10212 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10213 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10215 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10216 lowlevelrwlock.sym.
10217 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10218 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10219 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10221 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10223 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10224 last changed. D'oh.
10226 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10228 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10229 of __libc_locking_needed.
10230 (lll_trylock): Initialize %eax to zero.
10232 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10233 pthread_cond_t definition.
10235 2003-03-10 Roland McGrath <roland@redhat.com>
10237 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10238 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10239 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10240 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10241 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10243 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10244 Instead of setting PD->multiple_threads, set globals
10245 __pthread_multiple_threads and __libc_multiple_threads.
10246 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10247 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10248 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10250 * descr.h (struct pthread): Conditionalize first member on
10251 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10252 containing an anonymous tcbhead_t. Move `list' member out.
10253 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10254 * allocatestack.c: Remove use of `header.data.' prefix.
10255 * pthread_create.c: Likewise.
10256 * init.c (__pthread_initialize_minimal_internal): Likewise.
10257 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10258 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10259 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10260 * sysdeps/x86_64/tls.h: Likewise.
10261 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10262 (SINGLE_THREAD_P): Likewise.
10263 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10264 (SINGLE_THREAD_P): Likewise.
10265 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10266 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10268 2003-03-09 Ulrich Drepper <drepper@redhat.com>
10270 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10272 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10273 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10275 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10276 leftovers from the ia32 code.
10278 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10280 (clear_once_control): Don't load %esi.
10282 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10285 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10287 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10288 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10290 * Makefile (tests): Add tst-cond10.
10291 * tst-cond10.c: New file.
10293 2003-03-08 Ulrich Drepper <drepper@redhat.com>
10295 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10296 * tst-signal3.c (do_test): Likewise.
10297 * tst-sem5.c (do_test): Likewise.
10298 * tst-kill6.c (do_test): Likewise.
10299 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10301 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10303 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10304 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10305 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10306 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10307 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10308 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10309 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10311 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10313 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10314 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10315 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10316 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10317 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10318 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10319 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10320 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10322 * allocatestack.c (allocate_stack): If mprotect() fails free the
10325 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10327 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10329 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10330 lll_wake_tid. This was used only to work around kernel limits in
10332 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10333 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10334 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10335 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10337 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10338 (__pthread_initialize_minimal_internal): Change initialization of
10339 __static_tls_align_m1 appropriately.
10340 * pthreadP.h (__static_tls_align_m1): Renamed from
10341 __static_tls_align.
10342 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10343 instead of __static_tls_align-1.
10345 2003-03-04 Ulrich Drepper <drepper@redhat.com>
10347 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10349 * pthread_create.c: Define __pthread_keys using nocommon
10350 attribute, not by placing it explicitly in bss.
10351 Remove DEFINE_DEALLOC definition. Not needed anymore.
10353 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10354 Use it in mmap call to allocate stacks.
10356 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10358 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10359 result of the thread function.
10361 2003-03-03 Ulrich Drepper <drepper@redhat.com>
10363 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10364 version is just fine.
10366 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10367 (__pthread_child_handler): Renamed from pthread_child_handler,
10368 exported, and marked hidden. Change all users.
10369 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10370 free __pthread_child_handler from child list.
10372 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10374 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10376 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10377 Fix handling of cancellation and failing pthread_mutex_unlock call.
10378 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10379 (__pthread_cond_wait): Likewise.
10381 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10382 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10383 lll_futex_timed_wait call.
10384 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10385 (pthread_rwlock_timedwrlock): Likewise.
10387 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10388 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10389 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10391 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10392 check of lll_futex_wake return value.
10394 2003-03-03 Roland McGrath <roland@redhat.com>
10396 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10398 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10399 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10400 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10402 2003-03-02 Ulrich Drepper <drepper@redhat.com>
10404 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10405 error for CPU clocks.
10407 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10408 _POSIX_MONOTONIC_CLOCK.
10409 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10411 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10414 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10416 * descr.h (struct pthread): Move cleanup field to the front.
10418 2003-03-01 Roland McGrath <roland@redhat.com>
10420 * sem_open.c (sem_open): Braino fix.
10422 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10424 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10425 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10426 __pthread_cleanup_pop functionality.
10427 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10429 * descr.h (struct pthread): Move tid field to the front now that
10432 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10433 (__lll_mutex_timedlock_wait): Remove.
10434 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10435 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10436 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10437 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10438 (lll_unlock_wake_cb): Don't save and restore %esi.
10439 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10441 (__lll_timedwait_tid): Add alignment.
10442 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10443 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10445 (__lll_timedwait_tid): Removed.
10446 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10447 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10448 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10449 (pthread_barrier_wait): Don't save, load, and restore %esi for
10451 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10452 (__pthread_cond_signal): Don't save, load, and restore %esi.
10453 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10454 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10455 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10456 Don't save, load, and restore %esi.
10458 2003-02-27 Ulrich Drepper <drepper@redhat.com>
10460 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10461 Release lock before waking up the waiters.
10463 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10465 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10466 (reader_thread): Likewise.
10468 * sysdeps/pthread/pthread_rwlock_unlock.c
10469 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10470 to wake up readers if there are none.
10472 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10473 Release internal lock before wake threads.
10475 2003-02-26 Ulrich Drepper <drepper@redhat.com>
10477 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10478 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10480 * tst-rwlock9.c: Likewise.
10481 * tst-rwlock10.c: New file.
10482 * tst-rwlock11.c: New file.
10484 * Makefile (tests): Add tst-dlsym1.
10485 * tst-dlsym1.c: New file.
10487 * init.c (__pthread_initialize_minimal_internal): Set
10488 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10489 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10491 2003-02-24 Ulrich Drepper <drepper@redhat.com>
10493 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10495 * tst-cond2.c: Fix sychronization with child.
10497 * tst-rwlock8.c (reader_thread): Remove unused variable.
10499 * Makefile: Add rules to build and run tst-tls3.
10500 * tst-tls3.c: New file.
10501 * tst-tls3mod.c: New file.
10503 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10504 * tst-rwlock8.c: New file.
10505 * tst-rwlock9.c: New file.
10506 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10507 complete broken rwlock implementation.
10508 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10510 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10512 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10513 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10514 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10515 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10516 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10517 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10518 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10520 2003-02-23 Roland McGrath <roland@redhat.com>
10522 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10524 2003-02-23 Ulrich Drepper <drepper@redhat.com>
10526 * Makefile (tests): Add tst-context1.
10527 * tst-context1.c: New file.
10529 * Makefile (tests): Add tst-tls1 and tst-tls2.
10530 * tst-tls1.c: New file.
10531 * tst-tls2.c: New file.
10533 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10534 for failed cmpxchg.
10536 * pthread_create.c (start_thread): Set EXITING_BIT early.
10538 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10539 (THREAD_GETMEM_NC): Likewise.
10541 2003-02-22 Ulrich Drepper <drepper@redhat.com>
10543 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10544 off 3 more bytes by using offset-less instructions when possible.
10546 * Makefile: Add dependency for $(objpfx)version.d.
10548 * eintr.c (eintr_source): Add unnecessary return but the compiler
10551 * tst-kill3.c: Include <unistd.h>.
10553 2003-02-21 Roland McGrath <roland@redhat.com>
10555 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10557 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10559 * Makefile (tests): Add tst-eintr1.
10560 (distribute): Add eintr.c.
10561 * tst-eintr1.c: New file.
10562 * eintr.c: New file.
10564 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10566 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10567 Disallow sending SIGCANCEL.
10569 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
10570 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10571 * tst-kill1.c: New file.
10572 * tst-kill2.c: New file.
10573 * tst-kill3.c: New file.
10574 * tst-kill5.c: New file.
10575 * tst-kill6.c: New file.
10576 * tst-basic7.c: Renamed to...
10577 * tst-kill4.c: ...this.
10579 2003-02-21 Roland McGrath <roland@redhat.com>
10581 * Makefile (install-lib-ldscripts): New variable.
10583 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10585 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10586 * pthread_cancel.c: Use INVALID_TD_P.
10587 * pthread_detach.c: Likewise.
10588 * pthread_getschedparam.c: Likewise.
10589 * pthread_setschedparam.c: Likewise.
10590 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10591 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10592 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10593 * pthread_timedjoin.c: Likewise.
10595 * tst-basic7.c: Include <signal.h>.
10597 * pthread_join.c (pthread_join): Limited checking for invalid
10599 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10601 2003-02-20 Ulrich Drepper <drepper@redhat.com>
10603 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10604 beginning of the loop. Clear the entire first block of TSD.
10605 * Makefile (tests): Add tst-key4.
10606 * tst-key4.c: New file.
10608 2003-02-18 Ulrich Drepper <drepper@redhat.com>
10610 * Makefile (tests): Add tst-basic7.
10611 * tst-basic7.c: New file.
10613 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10614 Add some more __builtin_expect.
10616 * pthreadP.h: Define dummy version of DEBUGGING_P.
10618 2003-02-17 Ulrich Drepper <drepper@redhat.com>
10620 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10621 _POSIX_THREAD_PRIORITY_SCHEDULING.
10622 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10623 _XOPEN_REALTIME_THREADS.
10624 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10626 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10627 kernel returns EINVAL for PID <= 0, work around it.
10629 * Makefile (tests): Add tst-signal5.
10630 * tst-signal5.c: New file.
10632 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10633 and LOGIN_NAME_MAX.
10635 * tst-cancel1.c (tf): Block all signals.
10637 * Makefile (tests): Add tst-basic6.
10638 * tst-basic6.c: New file.
10640 * tst-basic1.c: Add test for process ID.
10642 * Makefile (tests): Add tst-cancel10.
10643 * tst-cancel10.c: New file.
10645 * Makefile (tests): Add tst-signal4.
10646 * tst-signal4.c: New file.
10648 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10649 __sigismember instead of sigismember. Add __builtin_expect.
10651 2003-02-16 Ulrich Drepper <drepper@redhat.com>
10653 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10654 pthread_setcancelstate, and pthread_rwlock_setpshared.
10656 * tst-cancel7.c (do_test): Make sure the pid file exists before
10657 canceling the thread.
10659 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10660 pthread_rwlock_timedrdlock tests.
10661 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10662 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10663 Check for invalid tv_nsec field.
10664 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10667 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10668 recursive mutex of overflow.
10670 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10672 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10673 going into an endless loop.
10674 * Makefile (tests): Add tst-cancel9.
10675 * tst-cancel9.c: New file.
10677 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10679 2003-02-15 Ulrich Drepper <drepper@redhat.com>
10681 * tst-mutex5.c (do_test): Add more timedlock tests.
10683 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10684 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10686 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10687 use INLINE_SYSCALL. Error number is returned, not -1.
10689 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10690 and __deallocate_stack with internal_function.
10691 * pthread_create.c: Adjust definitions appropriately.
10692 * allocatestack.c: Likewise.
10694 * pthread_join.c: Add one more __builtin_expect.
10695 * pthread_timedjoin.c: Likewise.
10697 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10698 not data of sequence number does not match.
10699 Add one __builtin_expect.
10701 * Makefile (tests): Add tst-clock1.
10702 * tst-clock1.c: New file.
10704 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10705 negative arguments.
10706 * Makefile (tests): Add tst-basic5.
10707 * tst-basic5.c: New file.
10709 2003-02-14 Ulrich Drepper <drepper@redhat.com>
10711 * Makefile (tests): Add tst-basic4.
10712 * tst-basic4.c: New file.
10714 * pthreadP.h: Add declaraction for __nptl_nthreads.
10715 * pthread_create.c: Define __nptl_nthreads
10716 (start_thread): Increment __nptl_nthreads at beginning. Decrement
10717 after thread is done. If then zero, call exit(0).
10718 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10719 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
10720 * init.c (pthread_functions): Initialize ptr_nthreads.
10721 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10722 (__reclaim_stacks): Decrement __nptl_nthreads.
10723 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10725 * Makefile (tests): Add tst-basic3.
10726 * tst-basic3.c: New file.
10728 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
10729 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
10730 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10731 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
10732 if asynchronous canceling is enabled.
10733 * pthread_join.c (pthread_join): When recognizing circular joins,
10734 take into account the other thread might be already canceled.
10735 * Makefile (tests): Add tst-join5.
10736 * tst-join5.c: New file.
10738 * Makefile (tests): Add tst-join4.
10739 * tst-join4.c: New file.
10741 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10743 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10745 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
10747 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10748 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10749 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10751 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10753 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10754 error if lll_futex_wake failed.
10756 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10758 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10759 handling of cancellation and failung pthread_mutex_unlock call.
10760 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10761 * Makefile (tests): Add tst-cond8 and tst-cond9.
10762 * tst-cond8.c: New file.
10763 * tst-cond9.c: New file.
10765 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10767 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10768 non-standard initializers with __USE_GNU.
10770 * Makefile (tests): Add tst-cleanup3.
10771 * tst-cleanup3.c: New file.
10773 2003-02-12 Ulrich Drepper <drepper@redhat.com>
10775 * Makefile (tests): Add tst-attr1 and tst-attr2.
10776 * tst-attr1.c: New file.
10777 * tst-attr2.c: New file.
10779 * Makefile: Add rules to build and run tst-atfork2 test.
10780 * tst-atfork2.c: New file.
10781 * tst-atfork2mod.c: New file.
10783 * sysdeps/unix/sysv/linux/unregister-atfork.c
10784 (__unregister_atfork): Free the memory allocated for the handlers
10785 after removing them from the lists.
10787 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10790 * tst-atfork1.c (do_test): Wait for the child we forked.
10791 Report error in child.
10793 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10795 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10797 2003-02-10 Ulrich Drepper <drepper@redhat.com>
10799 * Makefile (tests): Add tst-cancel8.
10800 * tst-cancel8.c: New file.
10802 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10803 clearing of control variable.
10804 * Makefile (tests): Add tst-once3 and tst-once4.
10805 * tst-once3.c: New file.
10806 * tst-once4.c: New file.
10808 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10810 * sysdeps/sh/Makefile: New file.
10811 * sysdeps/sh/bits/atomic.h: New file.
10812 * sysdeps/sh/pthread_spin_init.c: New file.
10813 * sysdeps/sh/pthread_spin_lock.c: New file.
10814 * sysdeps/sh/pthread_spin_trylock.S: New file.
10815 * sysdeps/sh/pthread_spin_unlock.S: New file.
10816 * sysdeps/sh/pthreaddef.h: New file.
10817 * sysdeps/sh/tcb-offsets.sym: New file.
10818 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10819 * sysdeps/sh/tls.h: New file.
10820 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10821 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10822 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10823 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10824 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10825 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10826 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10827 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10828 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10829 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10830 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10831 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10832 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10833 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10834 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10835 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10836 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10837 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10838 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10839 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10840 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10841 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10842 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10843 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10844 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10845 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10846 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10847 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10848 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10849 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10851 2003-02-08 Ulrich Drepper <drepper@redhat.com>
10853 * tst-cond2.c: Rearrange code to not rely on behavior undefined
10854 according to POSIX.
10856 * tst-basic2.c (do_test): Lock mutex before creating the thread.
10858 2003-02-07 Ulrich Drepper <drepper@redhat.com>
10860 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10861 (TLS_GET_FS): New #define.
10862 (TLS_SET_FS): New #define.
10863 Correct value of __NR_set_thread_area.
10865 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10867 2003-02-06 Ulrich Drepper <drepper@redhat.com>
10869 * Makefile (tests): Add tst-popen1.
10870 * tst-popen1.c: New file.
10872 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10873 but inactive generalization.
10874 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10875 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10876 Minor optimization, remove one instruction.
10877 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10879 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
10881 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10883 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
10885 * init.c (__NR_set_tid_address): Add #ifdef for s390.
10886 * sysdeps/pthread/pthread_barrier_wait.c: New file.
10887 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10888 * sysdeps/pthread/pthread_cond_signal.c: New file.
10889 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10890 * sysdeps/pthread/pthread_cond_wait.c: New file.
10891 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10892 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10893 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10894 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10895 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10896 * sysdeps/s390/Makefile: New file.
10897 * sysdeps/s390/bits/atomic.h: New file.
10898 * sysdeps/s390/pthread_spin_init.c: New file.
10899 * sysdeps/s390/pthread_spin_lock.c: New file.
10900 * sysdeps/s390/pthread_spin_trylock.c: New file.
10901 * sysdeps/s390/pthread_spin_unlock.c: New file.
10902 * sysdeps/s390/pthreaddef.h: New file.
10903 * sysdeps/s390/tcb-offsets.sym: New file.
10904 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10905 * sysdeps/s390/tls.h: New file.
10906 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10907 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10908 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10909 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10910 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10911 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10912 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10913 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10914 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10915 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10916 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10917 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10918 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10919 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10920 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10921 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10922 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10923 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10924 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10925 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10926 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10927 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10928 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10930 2003-02-04 Ulrich Drepper <drepper@redhat.com>
10932 * atomic.h: Add a couple more default implementations.
10933 (atomic_compare_and_exchange_acq): Use
10934 __arch_compare_and_exchange_32_acq in return value definition. It
10936 (atomic_bit_set): Renamed from atomic_set_bit.
10937 Add missing atomic_ prefixes.
10939 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10940 thread library is available, use correct value to mark initialized
10943 2003-02-03 Ulrich Drepper <drepper@redhat.com>
10945 * allocatestack.c (allocate_stack): Use __getpagesize instead of
10946 __sysconf to determine pagesize.
10948 * pthread_create.c: Include <atomic.h>.
10949 * allocatestack.c (allocate_stack): Implement coloring of the
10950 allocated stack memory. Rename pagesize to pagesize_m1. It's the
10951 size minus one. Adjust users.
10952 * sysdeps/i386/i686/Makefile: New file.
10954 2003-02-02 Ulrich Drepper <drepper@redhat.com>
10956 * allocatestack.c: Improve comment throughout the file.
10958 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10959 (__lll_lock_wait): Add branch prediction.
10960 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10961 (__lll_lock_wait): Likewise.
10962 (lll_unlock_wake_cb): Removed.
10964 2003-01-31 Ulrich Drepper <drepper@redhat.com>
10966 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10967 _POSIX_THREAD_PRIORITY_SCHEDULING.
10969 2003-01-30 Jakub Jelinek <jakub@redhat.com>
10971 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10972 Fix return type of ptr___pthread_getspecific.
10974 2003-01-29 Ulrich Drepper <drepper@redhat.com>
10976 * Makefile (tests): Add tst-umask1.
10977 (tst-umask1-ARGS): Define.
10978 * tst-umask1.c: New file.
10980 2003-01-28 Ulrich Drepper <drepper@redhat.com>
10982 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
10983 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10984 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10985 pthread_rwlock_unlock.
10986 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10987 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10988 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10989 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10990 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10992 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10993 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10995 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10996 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10997 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10999 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11000 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11002 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11003 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11004 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11006 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11007 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11009 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11011 * Makefile (libpthread-routines): Remove lowlevelcond and
11012 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11013 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11014 and pthread_cond_broadcast.
11015 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11016 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11017 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11018 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11019 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11020 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11021 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11022 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11023 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11024 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11025 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11026 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11027 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11028 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11029 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11030 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11031 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11032 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11033 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11034 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11035 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11036 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11037 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11038 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11039 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11040 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11041 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11042 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11043 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11044 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11045 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11047 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11048 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11049 of the code is moved to ...
11050 * sysdeps/pthread/createthread.c: ...here. New file.
11052 2003-01-27 Ulrich Drepper <drepper@redhat.com>
11054 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11055 (__new_sem_post): Clear %eax before returning.
11056 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11058 * Makefile (tests): Add tst-cleanup2.
11059 * tst-cleanup2.c: New file.
11061 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11062 Interpret first parameter correctly.
11064 2003-01-17 Ulrich Drepper <drepper@redhat.com>
11066 * Makefile (headers): Add bits/semaphore.h.
11068 2003-01-16 Jakub Jelinek <jakub@redhat.com>
11070 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11073 2003-01-14 Ulrich Drepper <drepper@redhat.com>
11075 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11076 must be used and mapping failed.
11077 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11079 * Makefile (CFLAGS-pthread_self.os): Define this, not
11080 CFLAGS-pthread_self.c.
11082 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11084 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11085 lll_unlock_wake_cb.
11087 * Makefile (libpthread-routines): Add version. Add rules to build
11088 version.os and banner.h.
11089 * version.c: New file.
11091 2003-01-13 Jakub Jelinek <jakub@redhat.com>
11093 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11094 the alias unconditional.
11095 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11097 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11099 * Makefile (CFLAGS-pthread_self.c): New definition.
11101 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11103 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11104 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11105 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11106 * init.c (__pthread_initialize_minimal_internal): Likewise.
11108 2003-01-07 Jakub Jelinek <jakub@redhat.com>
11110 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11112 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11113 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11114 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11115 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11116 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11117 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11119 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11121 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11122 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11123 * tst-cancel-wrappers.sh: Remove all exceptions.
11125 2003-01-05 Ulrich Drepper <drepper@redhat.com>
11127 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11128 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11130 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11131 Use __libc_pthread_functions array if SHARED.
11133 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11134 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11136 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11137 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11138 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11139 __libc_ptf_call instead of __libc_maybe_call.
11140 (PTF): New #define.
11141 (__libc_cleanup_region_start): Wrap function name with PTF call.
11142 (__libc_cleanup_region_end): Likewise.
11143 (__libc_cleanup_end): Likewise.
11145 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11146 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11147 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11148 * pthreadP.h: Add prototypes.
11150 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11151 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11152 __pthread_rwlock_unlock aliases.
11153 * pthreadP.h: Add prototypes for new aliases.
11155 * pthreadP.h (struct pthead_functions): Moved to...
11156 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11157 * init.c (pthread_functions): Add initializers for new elements.
11159 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11160 __pthread_cleanup_pop_restore aliases.
11161 * pthreadP.h: Add prototypes.
11163 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11164 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11165 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11166 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11167 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11168 * pthreadP.h: Adjust prototypes and callers.
11170 2003-01-04 Ulrich Drepper <drepper@redhat.com>
11172 * Makefile (tests): Add tst-cancel7.
11173 (tst-cancel7-ARGS): New variable.
11174 * tst-cancel7.c: New file.
11176 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11177 around gcc defficiencies.
11178 * old_pthread_cond_signal.c: Likewise.
11179 * old_pthread_cond_timedwait.c: Likewise.
11180 * old_pthread_cond_wait.c: Likewise.
11182 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11184 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11186 * Makefile (tests): Add tst-cond7.
11187 * tst-cond7.c: New file.
11189 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11190 (condvar_cleanup): Get condvar address from the right place.
11192 * atomic.h: Correct definitions of atomic_full_barrier,
11193 atomic_read_barrier, atomic_write_barrier.
11195 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11197 * old_pthread_cond_signal.c: Likewise.
11198 * old_pthread_cond_timedwait.c: Likewise.
11199 * old_pthread_cond_wait.c: Likewise.
11201 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11203 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11205 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11207 * pthreadP.h (pthread_cond_2_0_t): New type.
11208 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11209 Use new type for the 2.0 condvar function prototypes.
11210 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11211 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11213 * old_pthread_cond_destroy.c: Likewise.
11214 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11215 * old_pthread_cond_signal.c: Likewise.
11216 * old_pthread_cond_timedwait.c: Likewise.
11217 * old_pthread_cond_wait.c: Likewise.
11219 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11220 (__pthread_cond_wait): Don't save cancellation mode and seq value
11223 * herrno.c (__h_errno_location): Don't define as weak.
11225 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11227 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11228 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11229 and pthread_cond_wait.
11230 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11232 (__pthread_cond_broadcast_2_0): ... this.
11233 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11235 (__pthread_cond_destroy_2_0): ... this.
11236 * old_pthread_cond_init.c (__old_pthread_cond_init):
11238 (__pthread_cond_init_2_0): ... this.
11239 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11241 (__pthread_cond_signal_2_0): ... this.
11242 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11244 (__pthread_cond_wait_2_0): ... this.
11245 * pthread_cond_destroy.c: Include shlib-compat.h.
11246 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11247 * pthread_cond_init.c: Include shlib-compat.h.
11248 (pthread_cond_init): Change strong_alias into versioned_symbol.
11249 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11250 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11252 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11253 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11254 __pthread_cond_wait_2_0): New prototypes.
11255 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11256 __old_pthread_cond_init, __old_pthread_cond_signal,
11257 __old_pthread_cond_wait): Removed.
11258 * init.c: Include shlib-compat.h.
11259 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11260 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11261 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11262 ptr___pthread_cond_*_2_0 fields.
11263 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11264 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11266 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11267 LIBC_SIGACTION was not yet defined.
11268 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11269 [!defined LIBC_SIGACTION] (__sigaction): New function and
11271 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11272 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11274 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11276 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11278 2003-01-02 Ulrich Drepper <drepper@redhat.com>
11280 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11281 New, larger type definition.
11282 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11284 * Versions [libpthread]: Add definitions for new pthread_cond_*
11285 interfaces for version GLIBC_2.3.2.
11286 * pthread_cond_init.c: Update initialization for new type definition.
11287 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11288 pthread_cond_timedwait, pthread_cond_signal, and
11289 pthread_cond_broadcast. Add old_pthread_cond_init,
11290 old_pthread_cond_destroy, old_pthread_cond_wait,
11291 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11292 old_pthread_cond_broadcast.
11293 * old_pthread_cond_broadcast.c: New file.
11294 * old_pthread_cond_destroy.c: New file.
11295 * old_pthread_cond_init.c: New file.
11296 * old_pthread_cond_signal.c: New file.
11297 * old_pthread_cond_timedwait.c: New file.
11298 * old_pthread_cond_wait.c: New file.
11299 * pthreadP.h: Add prototypes for the compatibility interfaces.
11301 * pthread_cond_destroy.c: Don't include <errno.h>.
11303 2003-01-01 Ulrich Drepper <drepper@redhat.com>
11305 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11306 unnecessary zero offset when addressing MUTEX.
11308 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11310 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11312 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11313 for __register_atfork.
11315 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11317 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11318 instead of ASSEMBLER test macro.
11320 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11321 __libc_current_sigrtmax): Add libc_hidden_def.
11323 * sysdeps/pthread/list.h: Remove assert.h include.
11325 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11327 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11328 __pthread_initialize_minimal_internal not
11329 __pthread_initialize_minimal.
11331 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11333 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11334 __pthread_initialize_minimal as hidden.
11336 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11339 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11341 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11342 $(common-objpfx)format.lds, include that into the output script.
11344 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11346 2002-12-28 Andreas Jaeger <aj@suse.de>
11348 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11349 nsec resolution changes.
11350 (xstat64_conv): Likewise.
11351 (xstat32_conv): Likewise.
11352 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11353 struct kernel_stat.
11354 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11355 structs stat and stat64.
11356 * time/time.h (__timespec_defined): Define for __USE_MISC.
11357 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11359 2002-12-30 Jakub Jelinek <jakub@redhat.com>
11361 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11363 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11364 (pthread_exit): Use strong_alias to avoid warnings.
11365 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11366 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11367 ptr___pthread_attr_init_2_*.
11368 * init.c (pthread_functions): Adjust.
11370 2002-12-29 Ulrich Drepper <drepper@redhat.com>
11372 * forward.c: Make all functions available by default again. It
11373 caused too much trouble.
11375 * pt-siglongjmp.c: Removed.
11377 2002-12-28 Jakub Jelinek <jakub@redhat.com>
11379 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11380 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11381 * sysdeps/i386/Makefile: New file.
11382 * sysdeps/i386/tcb-offsets.sym: New file.
11383 * sysdeps/pthread/tcb-offsets.h: New file.
11384 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11385 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11387 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11388 __register_atfork...
11389 (GLIBC_2.3.2): ...here.
11391 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11393 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11394 pthread_attr_setstackaddr with __attribute_deprecated__.
11396 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11398 * pt-system.c (system): Remove cancellation handling.
11399 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11400 cancellation routines.
11402 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11404 * descr.h: Include <dl-sysdep.h>.
11405 (struct pthread): Move header.data.list to the back of the struct.
11406 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11407 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11408 (SYSINFO_OFFSEET): Likewise.
11410 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11412 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11414 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11415 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11416 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11417 (USE_DL_SYSINFO): Undef.
11419 2002-12-22 Jakub Jelinek <jakub@redhat.com>
11421 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11422 $(common-objpfx)libc.so.
11423 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11424 it is bigger than pipe buffer size even on arches with bigger
11426 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11428 2002-12-25 Ulrich Drepper <drepper@redhat.com>
11430 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11431 correct errno access for case that USE___THREAD is not defined.
11433 2002-12-24 Ulrich Drepper <drepper@redhat.com>
11435 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11436 Patch by Marijn Ros <marijn@mad.scientist.com>.
11438 2002-12-22 Roland McGrath <roland@redhat.com>
11440 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11442 2002-12-20 Ulrich Drepper <drepper@redhat.com>
11444 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11446 2002-12-19 Ulrich Drepper <drepper@redhat.com>
11448 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11449 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11450 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11452 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11454 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11455 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11456 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11457 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11458 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11459 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11460 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11461 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11463 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11465 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11467 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11469 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11471 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11472 that sysinfo is properly initialized.
11473 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11474 to 1 only for ld.so.
11476 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11477 RTLD_CORRECT_DYNAMIC_WEAK.
11479 2002-12-19 Jakub Jelinek <jakub@redhat.com>
11481 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11482 Use return 0 as 6th argument to FORWARD4.
11483 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11485 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11487 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11488 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11489 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11490 (INIT_SYSINFO): New #define.
11491 (TLS_TP_INIT): Use INIT_SYSINFO.
11492 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11493 At test to make sure SYSINFO_OFFSET value is correct.
11494 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11496 2002-12-18 Jakub Jelinek <jakub@redhat.com>
11498 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11499 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11500 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11501 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11502 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11503 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11504 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11506 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11508 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11509 macro instead of using int $0x80 directly.
11511 * sysdeps/pthread/bits/stdio-lock.h: New file.
11512 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11513 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11514 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11515 * Makefile (routines): Add libc-lowlevelmutex.
11517 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11518 __i686.get_pc_thunk.dx.
11520 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11522 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11523 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11524 ($(objpfx)tst-cancel-wrappers.out): New rule.
11525 * tst-cancel-wrappers.sh: New test.
11526 * tst-locale1.c: Include signal.h.
11527 (uselocale): Test static linking of __libc_current_sigrt*.
11529 2002-12-17 Ulrich Drepper <drepper@redhat.com>
11531 * Makefile (tests): Add tst-cancel6.
11532 * tst-cancel6.c: New file
11534 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11536 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11537 Define meaningfully for assembler as well.
11538 * pthreadP.h (struct pthread_functions): Remove
11539 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11540 and ptr_pthread_attr_init_2_1 fields.
11541 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11542 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11543 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11544 (FORWARD3): Define using FORWARD4.
11545 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11547 * pt-system.c: Remove duplicate stdlib.h include.
11549 2002-12-16 Ulrich Drepper <drepper@redhat.com>
11551 * sem_init.c: Define sem_init@GLIBC_2.0.
11552 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11553 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11555 * flockfile.c: Moved to...
11556 * sysdeps/pthread/flockfile.c: ...here. New file.
11557 * funlockfile.c: Moved to...
11558 * sysdeps/pthread/funlockfile.c: ...here. New file.
11559 * ftrylockfile.c: Moved to...
11560 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11562 2002-12-16 Jakub Jelinek <jakub@redhat.com>
11564 * libc-cancellation.c: Guard both function with
11565 #if !defined NOT_IN_libc.
11566 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11567 automatically provided pthread wrappers.
11568 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11569 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11571 * pt-open.c: Removed.
11572 * pt-fcntl.c: Removed.
11573 * pt-fsync.c: Removed.
11574 * pt-lseek.c: Removed.
11575 * pt-msgrcv.c: Removed.
11576 * pt-msgsnd.c: Removed.
11577 * pt-msync.c: Removed.
11578 * pt-nanosleep.c: Removed.
11579 * pt-open64.c: Removed.
11580 * pt-pause.c: Removed.
11581 * pt-pread.c: Removed.
11582 * pt-pread64.c: Removed.
11583 * pt-pwrite.c: Removed.
11584 * pt-pwrite64.c: Removed.
11585 * pt-read.c: Removed.
11586 * pt-recv.c: Removed.
11587 * pt-recvfrom.c: Removed.
11588 * pt-recvmsg.c: Removed.
11589 * pt-send.c: Removed.
11590 * pt-sendto.c: Removed.
11591 * pt-sigtimedwait.c: Removed.
11592 * pt-sigwait.c: Removed.
11593 * pt-wait.c: Removed.
11594 * pt-waitpid.c: Removed.
11595 * pt-write.c: Removed.
11596 * pt-accept.c: Removed.
11597 * pt-close.c: Removed.
11598 * pt-connect.c: Removed.
11599 * pt-lseek64.c: Removed.
11600 * pt-sendmsg.c: Removed.
11601 * pt-tcdrain.c: Removed.
11603 2002-12-15 Ulrich Drepper <drepper@redhat.com>
11605 * init.c (__pthread_initialize_minimal_internal): Renamed from
11606 __pthread_initialize_minimal. Make old name an alias. This
11607 converts a normal relocation into a relative relocation.
11609 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11611 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11612 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11613 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11614 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11615 pt-sigwaitinfo, pt-waitid, and pt-writev.
11616 * pt-creat.c: Removed.
11617 * pt-poll.c: Removed.
11618 * pt-pselect.c: Removed.
11619 * pt-readv.c: Removed.
11620 * pt-select.c: Removed.
11621 * pt-sigpause.c: Removed.
11622 * pt-sigsuspend.c: Removed.
11623 * pt-sigwaitinfo.c: Removed.
11624 * pt-waitid.c: Removed.
11625 * pt-writev.c: Removed.
11627 * init.c (pthread_functions): New variable.
11628 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11629 (or NULL) to __libc_pthread_init.
11630 * forward.c: Rewrite to use __libc:pthread_functions array to get
11631 function addresses.
11632 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11634 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11635 Take new parameter. Copy content of variable pointed to by it
11636 to __libc_pthread_init.
11638 * pthreadP.h (struct pthread_functions): New type.
11639 (__libc_pthread_init): Declare.
11641 * pthread_attr_destroy.c: Add namespace protected alias.
11642 * pthread_attr_getdetachstate.c: Likewise.
11643 * pthread_attr_getinheritsched.c: Likewise.
11644 * pthread_attr_getschedparam.c: Likewise.
11645 * pthread_attr_getschedpolicy.c: Likewise.
11646 * pthread_attr_getscope.c: Likewise.
11647 * pthread_attr_setdetachstate.c: Likewise.
11648 * pthread_attr_setinheritsched.c: Likewise.
11649 * pthread_attr_setschedparam.c: Likewise.
11650 * pthread_attr_setschedpolicy.c: Likewise.
11651 * pthread_attr_setscope.c: Likewise.
11652 * pthread_cond_broadcast.c: Likewise.
11653 * pthread_cond_destroy.c: Likewise.
11654 * pthread_cond_init.c: Likewise.
11655 * pthread_cond_signal.c: Likewise.
11656 * pthread_cond_wait.c: Likewise.
11657 * pthread_condattr_destroy.c: Likewise.
11658 * pthread_condattr_init.c: Likewise.
11659 * pthread_equal.c: Likewise.
11660 * pthread_exit.c: Likewise.
11661 * pthread_getschedparam.c: Likewise.
11662 * pthread_self.c: Likewise.
11663 * pthread_setcancelstate.c: Likewise.
11664 * pthread_setschedparam.c: Likewise.
11665 * pthread_mutex_destroy.c: Likewise.
11666 * pthread_mutex_init.c: Likewise.
11667 * pthreadP.h: Add prototypes for the aliases.
11669 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11670 multiple_threads member in correct TCB to 1.
11672 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11673 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11674 member of thread decriptor, otherwise return unconditionally 1.
11676 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11678 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11679 regular Linux version. Remove file.
11680 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11681 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11682 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11683 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11684 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11685 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11686 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11687 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11688 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11689 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
11690 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
11691 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
11692 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
11693 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
11694 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
11695 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
11696 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
11697 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
11698 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
11699 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
11700 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
11701 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
11702 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
11703 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
11704 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
11705 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
11706 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
11707 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
11708 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
11709 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
11711 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11713 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11714 * sysdeps/unix/sysv/linux/open.c: Removed.
11715 * sysdeps/unix/sysv/linux/fsync.c: Removed.
11716 * sysdeps/unix/sysv/linux/lseek.c: Removed.
11717 * sysdeps/unix/sysv/linux/msync.c: Removed.
11718 * sysdeps/unix/sysv/linux/read.c: Removed.
11719 * sysdeps/unix/sysv/linux/close.c: Removed.
11720 * sysdeps/unix/sysv/linux/creat.c: Removed.
11721 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11722 * sysdeps/unix/sysv/linux/pause.c: Removed.
11723 * sysdeps/unix/sysv/linux/select.c: Removed.
11724 * sysdeps/unix/sysv/linux/write.c: Removed.
11726 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11728 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11729 element in TCB to see whether locking is needed.
11731 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11732 MULTIPLE_THREADS_OFFSET value is correct.
11734 * sysdeps/unix/sysv/linux/close.c: New file.
11735 * sysdeps/unix/sysv/linux/connect.S: New file.
11736 * sysdeps/unix/sysv/linux/creat.c: New file.
11737 * sysdeps/unix/sysv/linux/fsync.c: New file.
11738 * sysdeps/unix/sysv/linux/llseek.c: New file.
11739 * sysdeps/unix/sysv/linux/lseek.c: New file.
11740 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11741 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11742 * sysdeps/unix/sysv/linux/msync.c: New file.
11743 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11744 * sysdeps/unix/sysv/linux/open.c: New file.
11745 * sysdeps/unix/sysv/linux/open64.c: New file.
11746 * sysdeps/unix/sysv/linux/pause.c: New file.
11747 * sysdeps/unix/sysv/linux/poll.c: New file.
11748 * sysdeps/unix/sysv/linux/pread.c: New file.
11749 * sysdeps/unix/sysv/linux/pread64.c: New file.
11750 * sysdeps/unix/sysv/linux/pselect.c: New file.
11751 * sysdeps/unix/sysv/linux/pwrite.c: New file.
11752 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11753 * sysdeps/unix/sysv/linux/readv.c: New file.
11754 * sysdeps/unix/sysv/linux/recv.S: New file.
11755 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11756 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11757 * sysdeps/unix/sysv/linux/select.c: New file.
11758 * sysdeps/unix/sysv/linux/send.S: New file.
11759 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11760 * sysdeps/unix/sysv/linux/sendto.S: New file.
11761 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11762 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11763 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11764 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11765 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11766 * sysdeps/unix/sysv/linux/system.c: New file.
11767 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11768 * sysdeps/unix/sysv/linux/wait.c: New file.
11769 * sysdeps/unix/sysv/linux/waitid.c: New file.
11770 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11771 * sysdeps/unix/sysv/linux/writev.c: New file.
11772 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11774 * pt-readv.c: Fix comment.
11776 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11778 * tst-cleanup1.c: Include stdlib.h.
11780 * tst-cancel5.c: New test.
11781 * Makefile (tests): Add tst-cancel5.
11782 (tst-cancel5): Link against libc.so libpthread.so in that order.
11784 2002-12-13 Ulrich Drepper <drepper@redhat.com>
11786 * forward.c (test_loaded): Prevent recursive calls.
11788 * Makefile (routines): Add libc-cancellation.
11789 * libc-cancellation.c: New file.
11790 * descr.h (struct pthread): Add multiple_threads field.
11791 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11792 new thread descriptor to 1.
11793 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11794 Initialize multiple_thread field after successful thread creation.
11795 * cancellation.c (__do_cancel): Move to pthreadP.h.
11796 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11797 (__pthread_disable_asynccancel): Add internal_function attribute.
11798 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11799 * pthread_setcancelstate.c: Likewise.
11800 * pthread_setcanceltype.c: Likewise.
11801 * pthread_exit.c: Likewise.
11802 * pthreadP.h (CANCELLATION_P): Likewise.
11803 (__do_cancel): Define as static inline.
11804 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11805 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11807 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11808 fields. Define MULTIPLE_THREADS_OFFSET.
11809 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11811 * sysdeps/unix/sysv/linux/accept.S: New file.
11812 * sysdeps/unix/sysv/linux/read.c: New file.
11813 * sysdeps/unix/sysv/linux/write.c: New file.
11814 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11815 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11816 initialization of __libc_locking_needed.
11817 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11818 __libc_locking_needed, use multiple_threads field in TCB.
11819 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11821 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11823 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11825 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11827 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11828 access to __libc_locking_needed for PIC.
11830 2002-12-12 Jakub Jelinek <jakub@redhat.com>
11832 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11833 declare for libc.so.
11834 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11836 (__libc_lock_lock): Put into statement expression.
11837 (__libc_lock_unlock): Remove trailing semicolon.
11838 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11840 2002-12-12 Roland McGrath <roland@redhat.com>
11842 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11843 "m" constraint to refer to __libc_locking_needed. Declare it here.
11845 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11847 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11848 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11849 Initialize __libc_locking_needed.
11850 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11851 instead of __register_pthread_fork_handler.
11852 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11853 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11854 fork-gen with libc_pthread_init.
11855 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11856 of __register_pthread_fork_handler.
11857 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11858 of __register_pthread_fork_handler.
11859 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11860 __libc_locking_needed to determine whether lock prefix can be avoided.
11861 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11863 2002-12-11 Ulrich Drepper <drepper@redhat.com>
11865 * Makefile (tests): Add tst-cleanup1.
11866 * tst-cleanup1.c: New file.
11867 * cancellation.c (__cleanup_thread): Removed.
11868 (__do_cancel): Remove call to __cleanup_thread.
11869 * pthreadP.h: Remove __cleanup_thread prorotype.
11871 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11872 Remember function and argument even if cancellation handler
11873 function is not available.
11874 (__libc_cleanup_region_end): Execute registered function directly if
11875 pthread functions are not available.
11876 (__libc_cleanup_end): Likewise.
11878 * init.c (__pthread_initialize_minimal): Fix initialization in
11879 static lib by preventing gcc from being too clever.
11881 2002-12-10 Ulrich Drepper <drepper@redhat.com>
11883 * init.c (__pthread_initialize_minimal): Remove unneccesary
11886 * Makefile (tests): We can run tst-locale2 now.
11888 2002-12-09 Ulrich Drepper <drepper@redhat.com>
11890 * Versions: Remove duplicated sigwait entry.
11892 2002-12-08 Ulrich Drepper <drepper@redhat.com>
11894 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11897 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11899 * pthreadP.h: Declare __pthread_enable_asynccancel and
11900 __pthread_disable_asynccancel.
11901 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11902 (CANCEL_RESET): Use __pthread_disable_asynccancel.
11903 * cancellation.c (__pthread_enable_asynccancel): New function.
11904 (__pthread_disable_asynccancel): New function.
11905 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11906 * pt-close.c: Likewise.
11907 * pt-connect.c: Likewise.
11908 * pt-creat.c: Likewise.
11909 * pt-fcntl.c: Likewise.
11910 * pt-fsync.c: Likewise.
11911 * pt-lseek.c: Likewise.
11912 * pt-lseek64.c: Likewise.
11913 * pt-msgrcv.c: Likewise.
11914 * pt-msgsnd.c: Likewise.
11915 * pt-msync.c: Likewise.
11916 * pt-nanosleep.c: Likewise.
11917 * pt-open.c: Likewise.
11918 * pt-open64.c: Likewise.
11919 * pt-pause.c: Likewise.
11920 * pt-poll.c: Likewise.
11921 * pt-pread.c: Likewise.
11922 * pt-pread64.c: Likewise.
11923 * pt-pselect.c: Likewise.
11924 * pt-pwrite.c: Likewise.
11925 * pt-pwrite64.c: Likewise.
11926 * pt-read.c: Likewise.
11927 * pt-readv.c: Likewise.
11928 * pt-recv.c: Likewise.
11929 * pt-recvfrom.c: Likewise.
11930 * pt-recvmsg.c: Likewise.
11931 * pt-select.c: Likewise.
11932 * pt-send.c: Likewise.
11933 * pt-sendmsg.c: Likewise.
11934 * pt-sendto.c: Likewise.
11935 * pt-sigpause.c: Likewise.
11936 * pt-sigsuspend.c: Likewise.
11937 * pt-sigtimedwait.c: Likewise.
11938 * pt-sigwait.c: Likewise.
11939 * pt-sigwaitinfo.c: Likewise.
11940 * pt-system.c: Likewise.
11941 * pt-tcdrain.c: Likewise.
11942 * pt-wait.c: Likewise.
11943 * pt-waitid.c: Likewise.
11944 * pt-waitpid.c: Likewise.
11945 * pt-write.c: Likewise.
11946 * pt-writev.c: Likewise.
11947 * pthread_join.c: Likewise.
11948 * pthread_timedjoin.c: Likewise.
11950 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11951 (__xpg_sigpause): New function.
11952 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11954 2002-12-07 Ulrich Drepper <drepper@redhat.com>
11956 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11958 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11959 _GI_pthread_cleanup_pop to pthreadP.h.
11961 * ftrylockfile.c: Use _IO_lock_trylock instead of
11962 pthread_mutex_trylock.
11964 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11965 (CANCEL_RESET): Likewise.
11966 (__pthread_setcanceltype_): Declare.
11967 (__pthread_mutex_lock_internal): Declare.
11968 (__pthread_mutex_unlock_internal): Declare.
11969 (__pthread_once_internal): Declare.
11970 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11971 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11973 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11974 and pthread_mutex_unlock.
11975 * pthread_cond_wait.c: Likewise.
11976 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11977 * pthread_mutex_unlock.c: Likewise.
11979 * pthread_setcanceltype.c: Add additional alias
11980 __pthread_setcanceltype.
11982 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11983 * sem_open.c (sem_open): Likewise.
11984 Use __libc_open, __libc_write, and __libc_close instead of
11985 open, write, and close respectively.
11987 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11988 Rewrite as statement expression since it must return a value.
11990 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11991 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11994 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11995 alias __pthread_once_internal.
11997 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11999 2002-12-06 Ulrich Drepper <drepper@redhat.com>
12001 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12002 * tst-stdio1.c: New file.
12003 * tst-stdio2.c: New file.
12005 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12007 * Makefile (tests): Comment out tst-locale2 for now.
12008 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12010 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12012 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12013 Use _IO_lock_init instead of explicit assignment.
12015 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12016 Define __libc_lock_* and __libc_lock_recursive macros with
12017 lowlevellock macros, not pthread mutexes.
12019 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
12020 of pthread_mutex_lock.
12021 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
12022 instead of pthread_mutex_unlock.
12024 2002-12-06 Roland McGrath <roland@redhat.com>
12026 * allocatestack.c (__stack_user): Use uninitialized defn.
12027 * init.c (__pthread_initialize_minimal): Initialize it here.
12029 2002-12-05 Roland McGrath <roland@redhat.com>
12031 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12033 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12035 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12036 missing & here too.
12038 2002-12-05 Ulrich Drepper <drepper@redhat.com>
12040 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12042 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12043 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12044 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12045 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12046 for __libc_lock_* macros.
12047 * Makefile (routines): Add libc-lowlevellock.
12049 2002-10-09 Roland McGrath <roland@redhat.com>
12051 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12052 Under [__PIC__], call the function via the pointer fetched for
12053 comparison rather than a call by name that uses the PLT.
12054 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12055 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12056 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12057 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12058 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12060 2002-12-04 Roland McGrath <roland@redhat.com>
12062 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12064 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12065 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12067 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12069 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12071 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12072 a completely opaque, non-integer type.
12073 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12075 2002-12-05 Jakub Jelinek <jakub@redhat.com>
12077 * sysdeps/i386/tls.h: Include stdlib.h.
12078 * sysdeps/x86_64/tls.h: Likewise.
12080 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12082 * Makefile (tests): Add tst-locale2.
12083 (tests-static): Likewise.
12084 * tst-locale2.c: New file.
12086 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12087 volatile and add memory clobbers to lock operations.
12089 2002-12-03 Ulrich Drepper <drepper@redhat.com>
12091 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12092 * sysdeps/i386/i486/bits/atomic.h: New file.
12093 * sysdeps/i386/i586/bits/atomic.h: New file.
12094 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12095 include i486 version.
12096 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12097 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12098 Patch by Marijn Ros <marijn@mad.scientist.com>.
12100 * allocatestack.c (get_cached_stack): Don't crash if we first
12101 found a stack with a larger size then needed.
12102 Reported by Hui Huang <hui.huang@sun.com>.
12104 * Makefile (tests): Add tst-sysconf.
12105 * tst-sysconf.c: New file.
12107 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12108 PTHREAD_THREADS_MAX.
12110 2002-12-02 Roland McGrath <roland@redhat.com>
12112 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12113 Declare using hidden_proto instead of attribute_hidden, so there are
12114 non-.hidden static symbols for gdb to find.
12115 (__pthread_keys): Likewise.
12116 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12117 * allocatestack.c (__stack_user): Likewise.
12118 * pthread_create.c (__pthread_keys): Likewise.
12119 (__nptl_threads_events, __nptl_last_event): Make these static instead
12121 * pthread_key_create.c (__pthread_pthread_keys_max,
12122 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12124 2002-12-02 Ulrich Drepper <drepper@redhat.com>
12126 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12128 * tst-locale1.c: New file.
12130 * pthread_cond_timedwait.c: Include <stdlib.h>.
12132 * Makefile (tests): Add tst-fork2 and tst-fork3.
12133 * tst-fork2.c: New file.
12134 * tst-fork3.c: New file.
12136 2002-11-28 Ulrich Drepper <drepper@redhat.com>
12138 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12140 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12141 require it to 200112L.
12143 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12144 instruction only if HAVE_CMOV is defined.
12145 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12147 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12149 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12151 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12153 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12155 2002-11-27 Ulrich Drepper <drepper@redhat.com>
12157 * sysdeps/x86_64/bits/atomic.h: New file.
12159 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12162 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12163 possible since gettid cannot fail.
12165 * sysdeps/x86_64/pthreaddef.h: New file.
12167 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12169 * sysdeps/x86_64/pthread_spin_init.c: New file.
12170 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12171 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12172 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12174 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12175 Add missing lock prefix. Minute optimization.
12177 * tst-spin2.c (main): Also check successful trylock call.
12179 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12180 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12182 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12183 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12185 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12186 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12187 value in case of an error. Add support for INTERNAL_SYSCALL.
12189 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12190 value in case of an error.
12192 * sysdeps/x86_64/tls.h: New file.
12194 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12196 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12197 takes the array member name and the index as parameters.
12198 (THREAD_SETMEM_NC): Likewise.
12199 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12200 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12203 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12204 to decide which code to use.
12205 (THREAD_SETMEM_NC): Likewise.
12207 * allocatestack.c (queue_stack): Don't remove stack from list here.
12208 Do it in the caller. Correct condition to prematurely terminate
12209 loop to free stacks.
12210 (__deallocate_stack): Remove stack from list here.
12212 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12214 * Makefile (tests): Add tst-stack1.
12215 * tst-stack1.c: New file.
12217 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12220 * pthread_attr_getstack.c: Return bottom of the thread area.
12222 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12224 * Makefile (libpthread-routines): Add pt-allocrtsig and
12225 pthread_kill_other_threads.
12226 * pt-allocrtsig.c: New file.
12227 * pthread_kill_other_threads.c: New file.
12228 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12229 all three functions.
12230 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12232 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12233 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12234 and __libc_allocate_rtsig_private.
12235 * Versions (libpthread): Export pthread_kill_other_threads_np,
12236 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12238 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12240 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12241 the end of the stack. Adjust computations.
12242 When mprotect call fails dequeue stack and free it.
12243 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12245 * pthread_getattr_np.c: Likewise.
12247 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12250 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12252 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12253 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12255 2002-11-22 Ulrich Drepper <drepper@redhat.com>
12257 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12258 * pthread_setspecific.c: Likewise.
12260 2002-11-21 Ulrich Drepper <drepper@redhat.com>
12262 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12263 definitions. Get them from the official place.
12264 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12266 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12267 Use new CLONE_ flags in clone() calls.
12269 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12270 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12272 * Versions: Add pthread_* functions for libc.
12273 * forward.c: New file.
12275 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12277 * herrno.c: New file.
12280 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12281 sem_trywait, and sem_timedwait. Add herrno and res.
12282 * sem_init.c: Don't initialize lock and waiters members.
12283 * sem_open.c: Likewise.
12284 * sem_post.c: Removed.
12285 * sem_wait.c: Removed.
12286 * sem_trywait.c: Removed.
12287 * sem_timedwait.c: Removed.
12288 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12289 Includes full implementations of sem_post, sem_wait, sem_trywait,
12291 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12292 for new implementation.
12293 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12294 and waiters fields.
12296 * tst-sem3.c: Improve error message.
12297 * tst-signal3.c: Likewise.
12299 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12300 to tell the kernel about the termination futex and to initialize tid
12301 member. Don't initialize main_thread.
12302 * descr.h (struct pthread): Remove main_thread member.
12303 * cancelllation.c (__do_cancel): Remove code handling main thread.
12304 The main thread is not special anymore.
12306 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12307 size of the stacks to stack_cache_actsize.
12309 * pt-readv.c: Add missing "defined".
12310 * pt-sigwait.c: Likewise.
12311 * pt-writev.c: Likewise.
12313 2002-11-09 Ulrich Drepper <drepper@redhat.com>
12315 * Versions: Export __connect from libpthread.
12316 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12318 * Makefile (libpthread-routines): Add pt-raise.
12319 * sysdeps/unix/sysv/linux/raise.c: New file.
12320 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12321 * sysdeps/generic/pt-raise.c: New file.
12323 * pthread_cond_init.c: Initialize all data elements of the condvar
12324 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12326 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12327 * pthread_create.c: Likewise.
12329 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12330 * tst-key1.c: New file.
12331 * tst-key2.c: New file.
12332 * tst-key3.c: New file.
12334 * Versions: Export pthread_detach for version GLIBC_2.0.
12335 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12337 2002-11-08 Ulrich Drepper <drepper@redhat.com>
12339 * pthread_key_create.c: Terminate search after an unused key was found.
12340 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12342 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12343 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12345 2002-10-10 Ulrich Drepper <drepper@redhat.com>
12347 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12348 dynamic lookup for errno in PIC.
12350 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12351 release the stack lock as soon as possible.
12352 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12353 the static TLS block.
12354 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12356 * cancellation.c: Renamed from cancelation.c.
12357 * Makefile: Adjust accordingly.
12358 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12359 * cleanup_defer.c: Use CANCELLATION_P.
12360 * pthread_testcancel.c: Likewise.
12361 * descr.h: Fix spelling in comments.
12362 * init.c: Likewise.
12363 * pthread_getattr_np.c: Likewise.
12364 * pthread_getschedparam.c: Likewise.
12365 * pthread_setschedparam.c: Likewise.
12366 * Versions: Likewise.
12368 * pt-pselect.c: New file.
12369 * Makefile (libpthread-routines): Add pt-pselect.
12370 * Versions: Add pselect.
12372 * tst-cancel4.c: New file.
12373 * Makefile (tests): Add tst-cancel4.
12375 2002-10-09 Ulrich Drepper <drepper@redhat.com>
12377 * pthread_mutex_lock.c: Always record lock ownership.
12378 * pthread_mutex_timedlock.c: Likewise.
12379 * pthread_mutex_trylock.c: Likewise.
12381 * pt-readv.c: New file.
12382 * pt-writev.c: New file.
12383 * pt-creat.c: New file.
12384 * pt-msgrcv.c: New file.
12385 * pt-msgsnd.c: New file.
12386 * pt-poll.c: New file.
12387 * pt-select.c: New file.
12388 * pt-sigpause.c: New file.
12389 * pt-sigsuspend.c: New file.
12390 * pt-sigwait.c: New file.
12391 * pt-sigwaitinfo.c: New file.
12392 * pt-waitid.c: New file.
12393 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12394 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12395 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12396 * Versions: Add all the new functions.
12398 * tst-exit1.c: New file.
12399 * Makefile (tests): Add tst-exit1.
12401 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12403 2002-10-08 Ulrich Drepper <drepper@redhat.com>
12405 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12407 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12408 call. pthread_join is an official cancellation point.
12409 * pthread_timedjoin.c: Likewise.
12411 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12412 and the condvar's mutex are retrieved.
12413 * pthread_cond_timedwait.c: Likewise.
12414 Reported by dice@saros.East.Sun.COM.
12416 2002-10-07 Ulrich Drepper <drepper@redhat.com>
12418 * pthreadP.h: Cut out all type definitions and move them...
12419 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12420 * pthreadP.h: Include <internaltypes.h>.
12422 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12423 performance tweaks.
12425 * sem_trywait.c: Shuffle #includes around to get right order.
12426 * sem_timedwait.c: Likewise.
12427 * sem_post.c: Likewise.
12428 * sem_wait.c: Likewise.
12430 * nptl 0.3 released.
12432 * Makefile (tests): Add tst-signal3.
12433 * tst-signal3.c: New file.
12435 2002-10-05 Ulrich Drepper <drepper@redhat.com>
12437 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12438 the asms modify the sem object.
12439 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12441 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12442 the actual members.
12443 * pthreadP.h (struct sem): New type. Actual semaphore type.
12444 * semaphoreP.h: Include pthreadP.h.
12445 * sem_getvalue.c: Adjust to sem_t change.
12446 * sem_init.c: Likewise.
12447 * sem_open.c: Likewise.
12448 * sem_post.c: Likewise.
12449 * sem_timedwait.c: Likewise.
12450 * sem_trywait.c: Likewise.
12451 * sem_wait.c: Likewise.
12453 2002-10-04 Ulrich Drepper <drepper@redhat.com>
12455 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12456 * tst-basic2.c: New file.
12457 * tst-exec1.c: New file.
12458 * tst-exec2.c: New file.
12459 * tst-exec3.c: New file.
12461 * tst-fork1.c: Remove extra */.
12463 * nptl 0.2 released. The API for IA-32 is complete.