1 2012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
3 * tst-cond25.c (do_test_wait): Don't check for return value from
6 2012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
9 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10 (__condvar_tw_cleanup): Adjust the mutex data structure if it
11 was locked by FUTEX_WAIT_REQUEUE_PI.
12 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
13 (__condvar_w_cleanup): Likewise.
14 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
15 (__condvar_cleanup2): Likewise.
16 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
17 (__condvar_cleanup1): Likewise.
19 2012-10-10 Carlos O'Donell <carlos@systemhalted.org>
21 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
22 defined __EXCEPTIONS) && defined __USE_GNU]
23 (pthread_cleanup_push_defer_np): Fix formatting.
25 2012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
28 * Makefile (tests): New test case tst-cond25.
29 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
30 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
31 (__condvar_tw_cleanup): Lock mutex only if we don't already
33 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
34 (__condvar_w_cleanup): Likewise.
35 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
36 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
37 (__condvar_cleanup2): Lock mutex only if we don't already
39 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
40 (__condvar_cleanup1): Likewise.
41 * tst-cond25.c: New test case.
43 2012-10-09 Roland McGrath <roland@hack.frob.com>
45 * sysdeps/pthread/configure: Regenerated.
46 * sysdeps/x86_64/configure: Regenerated.
48 2012-10-05 David S. Miller <davem@davemloft.net>
51 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
52 (DB_THREAD_SELF): Use constants for the register offsets. Correct
53 the case of a 64-bit debugger with a 32-bit inferior.
55 2012-10-05 H.J. Lu <hongjiu.lu@intel.com>
58 * Makefile (tests-static): Add tst-cancel24-static,
59 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
60 tst-sem11-static and tst-sem12-static.
62 (LDLIBS-tst-cancel24-static): New macro.
63 * tst-cancel24-static.cc: New file.
64 * tst-cond8-static.c: Likewise.
65 * tst-mutex8-static.c: Likewise.
66 * tst-mutexpi8-static.c: Likewise.
67 * tst-sem11-static.c: Likewise.
68 * tst-sem12-static.c: Likewise.
70 2012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
73 * Makefile (tests): New test case tst-cond24.
74 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
75 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
76 (__pthread_cond_timedwait): Unlock mutex before going back to
78 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
79 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
80 return from futex_wait.
81 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
82 (__pthread_cond_timedwait): Unlock mutex before going back to
83 wait in PI case. Set requeue_pi flag only if wait returned 0.
84 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
85 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
86 return from futex_wait.
87 * tst-cond24.c: New test case.
89 2012-10-04 Roland McGrath <roland@hack.frob.com>
91 * pthread_create.c (start_thread): Use __madvise, not madvise.
93 2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
95 * sysdeps/i386/tls.h: Update copyright years.
97 2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
99 * pthread_create.c (start_thread): Fix clone flag name in
100 comment to CLONE_CHILD_CLEARTID.
101 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
102 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
103 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
104 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
105 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
106 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
108 2012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
111 * Makefile (tests): Add tst-cond-except.
112 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
113 (__pthread_cond_timedwait): Mark instructions where %ebx is
114 incremented in PI case.
115 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
116 for the marked PI case instructions.
117 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
118 (__pthread_cond_wait): Mark instructions where %ebx is
119 incremented in PI case.
120 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
121 for the marked PI case instructions.
122 * tst-cond-except.c: New test case.
124 2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
126 * tst-tls6.sh: Add "set -e".
127 * Makefile: Do not specify -e option when running testsuite
130 * tst-tls6.sh: Add copyright header.
132 2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
134 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
135 to uint64_t for 64-bit store.
136 (THREAD_SETMEM_NC): Likewise.
138 2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
140 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
142 (THREAD_SETMEM_NC): Likewise.
144 2012-09-14 Jeff Law <law@redhat.com>
147 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
149 2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
152 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
155 2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
157 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
158 (LDLIBS-tst-cancel24): This.
160 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
163 * Makefile (tests-static): Add tst-cancel21-static.
165 * tst-cancel21-static.c: New file.
167 2012-09-01 Joseph Myers <joseph@codesourcery.com>
169 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
170 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
171 [__NR_clock_getres]: Make code unconditional.
172 (pthread_getcpuclockid): Remove code left unreachable by removal
175 2012-08-31 Joseph Myers <joseph@codesourcery.com>
178 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
179 atomic_compare_and_exchange_bool_rel.
180 * tst-sem14.c: New file.
181 * Makefile (tests): Add tst-sem14.
183 2012-08-15 Roland McGrath <roland@hack.frob.com>
185 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
187 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
188 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
190 2012-08-16 Joseph Myers <joseph@codesourcery.com>
192 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
193 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
194 * pthread_condattr_setclock.c (pthread_condattr_setclock)
195 [!__ASSUME_POSIX_TIMERS]: Likewise.
196 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
197 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
198 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
199 [!__ASSUME_POSIX_TIMERS]: Likewise.
200 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
201 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
202 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
204 [!__NR-timer_create]: Remove conditional code.
205 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
206 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
208 [!__NR_timer_delete]: Remove conditional code.
209 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
210 * sysdeps/unix/sysv/linux/timer_getoverr.c
211 [__NR_timer_getoverrun]: Make code unconditional.
212 [!__NR_timer_getoverrun]: Remove conditional code.
213 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
214 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
215 Make code unconditional.
216 [!__NR_timer_gettime]: Remove conditional code.
217 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
218 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
219 Make code unconditional.
220 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
221 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
222 Make code unconditional.
223 [!__NR_timer_settime]: Remove conditional code.
224 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
225 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
226 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
229 2012-08-15 Tom de Vries <vries@codesourcery.com>
230 Maxim Kuvyrkov <maxim@codesourcery.com>
232 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
233 (__libc_lock_trylock): Allow pre-existing definitions.
235 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
237 * pthread_spin_lock.c: New file.
238 * pthread_spin_trylock.c: New file.
240 2012-08-08 Joseph Myers <joseph@codesourcery.com>
242 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
244 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
245 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
247 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
248 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
249 Make code unconditional.
250 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
251 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
252 __NR_tgkill]: Make code unconditional.
253 (raise) [__ASSUME_TGKILL]: Likewise.
254 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
255 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
256 [__ASSUME_TGKILL]: Make code unconditional.
257 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
258 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
259 __NR_tgkill]: Make code unconditional.
260 (raise) [__ASSUME_TGKILL]: Likewise.
261 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
263 2012-08-07 Joseph Myers <joseph@codesourcery.com>
265 * sysdeps/pthread/createthread.c (create_thread)
266 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
268 2012-08-03 Joseph Myers <joseph@codesourcery.com>
270 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
272 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
274 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
276 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
277 (pagesize): New static variable.
278 (allocate_and_test): Return MEM. Rename parameter to TARGET.
279 (check_stack_top): New local variables MEM and PAGEMASK. Cap
280 stack size to MAX_STACK_SIZE. Call allocate_and_test for
281 halfway up the stack top page. Verify that the top page was
283 (do_test): Get pagesize using sysconf.
285 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
287 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
289 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
290 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
293 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
295 * tst-pthread-getattr.c: Revert last change.
297 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
299 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
302 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
304 (check_stack_top): Read valued written into STACKADDR in
305 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
307 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
309 * nptl-init.c (sighandler_setxid): Fix the comment that
312 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
314 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
315 (__lll_robust_timedlock_wait): Simplify CFI directives.
317 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
320 * Makefile (tests): Add test case.
321 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
322 the __libc_stack_end page from stacksize. Truncate stacksize to
323 make it page aligned when it is computed from RLIMIT_STACK.
324 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
327 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
330 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
333 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
334 Jakub Jelinek <jakub@redhat.com>
337 * sysdeps/pthread/pthread.h
338 [!(defined __GNUC__ && defined __EXCEPTIONS)]
339 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
340 __libc_unlikely instead of __builtin_expect.
342 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
345 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
346 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
347 * sysdeps/unix/sysv/linux/i386/Implies: New file.
348 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
349 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
351 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
352 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
354 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
356 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
359 * nptl-init.c (pthread_functions): Remove use of INTUSE and
361 (__pthread_initialize_minimal_internal): Likewise.
362 * sem_open.c: Likewise.
363 * sem_unlink.c: Likewise.
364 * pthreadP.h: Replace _internal aliases by hidden_proto
366 * pthread_getspecific.c: Replace _internal alias by hidden_def.
367 * pthread_key_create.c: Likewise.
368 * pthread_mutex_destroy.c: Likewise.
369 * pthread_mutex_init.c: Likewise.
370 * pthread_mutex_lock.c: Likewise.
371 * pthread_mutex_unlock.c: Likewise.
372 * pthread_once.c: Likewise.
373 * pthread_rwlock_rdlock.c: Likewise.
374 * pthread_rwlock_unlock.c: Likewise.
375 * pthread_rwlock_wrlock.c: Likewise.
376 * pthread_setspecific.c: Likewise.
377 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
379 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
381 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
383 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
384 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
385 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
386 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
387 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
388 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
389 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
390 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
391 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
392 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
394 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
396 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
399 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
401 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
402 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
404 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
405 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
407 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
408 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
409 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
410 (pthread_barrier_wait): Likewise.
411 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
412 (__pthread_cond_broadcast): Likewise.
413 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
414 (__pthread_cond_signal): Likewise.
415 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
416 (__pthread_cond_timedwait): Likewise.
417 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
419 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
420 (__pthread_rwlock_rdlock): Likewise.
421 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
422 (pthread_rwlock_timedrdlock): Likewise.
423 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
424 (pthread_rwlock_timedwrlock): Likewise.
425 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
426 (__pthread_rwlock_unlock): Likewise.
427 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
428 (__pthread_rwlock_wrlock): Likewise.
429 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
430 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
431 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
433 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
435 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
438 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
439 __libc_stack_end rounded to the end of containing page as the
442 2012-05-25 Rayson Ho <rho@redhat.com>
444 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
446 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
447 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
448 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
449 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
450 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
451 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
452 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
453 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
455 2012-05-25 Rayson Ho <rho@redhat.com>
456 Roland McGrath <roland@hack.frob.com>
458 * DESIGN-systemtap-probes.txt: New file.
459 * pthread_cond_broadcast.c: SystemTap probes.
460 * pthread_cond_init.c: Likewise.
461 * pthread_cond_signal.c: Likewise.
462 * pthread_cond_wait.c: Likewise.
463 * pthread_cond_destroy.c: Likewise.
464 * pthread_create.c: Likewise.
465 * pthread_join.c: Likewise.
466 * pthread_mutex_destroy.c: Likewise.
467 * pthread_mutex_init.c: Likewise.
468 * pthread_mutex_lock.c: Likewise.
469 * pthread_mutex_timedlock.c: Likewise.
470 * pthread_mutex_unlock.c: Likewise.
471 * pthread_rwlock_destroy.c: Likewise.
472 * pthread_rwlock_rdlock.c: Likewise.
473 * pthread_rwlock_unlock.c: Likewise.
474 * pthread_rwlock_wrlock.c: Likewise.
475 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
476 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
477 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
478 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
479 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
480 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
481 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
482 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
484 2012-05-24 Roland McGrath <roland@hack.frob.com>
486 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
488 2012-05-17 Andreas Jaeger <aj@suse.de>
490 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
491 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
492 only for older kernels.
494 2012-05-15 Joseph Myers <joseph@codesourcery.com>
496 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
499 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
501 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
502 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
503 (lll_robust_lock): Likewise.
504 (lll_cond_lock): Likewise.
505 (lll_robust_cond_lock): Likewise.
506 (lll_timedlock): Likewise.
507 (lll_robust_timedlock): Likewise.
508 (lll_unlock): Likewise.
509 (lll_robust_unlock): Likewise.
511 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
513 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
514 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
516 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
518 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
520 (__gcc_personality_v0): Replace 8-byte data alignment with
521 LP_SIZE alignment and .quad with ASM_ADDR.
523 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
525 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
527 (__gcc_personality_v0): Replace 8-byte data alignment with
528 LP_SIZE alignment and .quad with ASM_ADDR.
530 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
532 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
533 NWAITERS, which is unsigned long int.
535 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
537 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
538 (__gcc_personality_v0): Replace 8-byte data alignment with
539 LP_SIZE alignment and .quad with ASM_ADDR.
541 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
543 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
544 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
545 __vdso_clock_gettime pointer into RAX_LP.
546 (__gcc_personality_v0): Replace 8-byte data alignment with
547 LP_SIZE alignment and .quad with ASM_ADDR.
549 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
551 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
552 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
553 __vdso_clock_gettime pointer into RAX_LP.
554 (__gcc_personality_v0): Replace 8-byte data alignment with
555 LP_SIZE alignment and .quad with ASM_ADDR.
557 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
559 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
560 LP_OP(cmp) and R8_LP on dep_mutex pointer.
562 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
564 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
565 to update pointer in memory. Load pointer into RDI_LP.
567 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
569 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
570 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
572 (LLL_STUB_UNWIND_INFO_END): Likewise.
573 (lll_timedlock): Load timeout pointer into RDX_LP.
574 (lll_robust_timedlock): Likewise.
576 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
577 Jakub Jelinek <jakub@redhat.com>
580 * Makefile (tests): Add test cases.
581 * descr.h (struct pthread): Add a comment describing multiple_threads.
582 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
584 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
585 before setting cancelstate of the thread.
586 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
587 (__libc_multiple_threads): Add explanatory comment.
588 * tst-cancel-self-cancelstate.c: New test case.
589 * tst-cancel-self-canceltype.c: Likewise.
590 * tst-cancel-self-cleanup.c: Supporting file for test cases.
591 * tst-cancel-self-testcancel.c: New test case.
592 * tst-cancel-self.c: Likewise.
593 * vars.c: Expand comment to include single-process case.
595 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
597 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
598 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
601 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
603 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
605 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
606 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
608 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
610 * shlib-versions: Move x86_64-.*-linux.* entry to ...
611 * sysdeps/x86_64/64/shlib-versions: Here. New file.
612 * sysdeps/x86_64/x32/shlib-versions: New file.
614 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
616 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
617 __SIZEOF_PTHREAD_XXX_T.
618 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
619 (pthread_mutex_t): Likewise.
620 (pthread_rwlock_t): Likewise.
621 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
624 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
626 * sysdeps/x86_64/x32/tls.h: New file.
628 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
630 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
632 (THREAD_SETMEM_NC): Likewise.
634 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
636 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
639 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
641 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
642 (__cleanup_fct_attribute): Check __x86_64__ instead of
645 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
647 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
648 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
649 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
650 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
651 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
653 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
655 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
656 instead of __WORDSIZE.
658 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
661 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
663 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
665 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
666 (__pthread_cond_timedwait): Use CFI directives.
667 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
668 (__pthread_cond_wait): Likewise.
669 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
670 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
672 2012-05-03 David S. Miller <davem@davemloft.net>
674 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
675 always have to return 0, especially for the pthread_spin_init
677 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
679 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
680 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
682 2012-05-02 David S. Miller <davem@davemloft.net>
684 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
685 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
686 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
687 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
688 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
689 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
690 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
691 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
692 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
693 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
694 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
695 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
696 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
697 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
698 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
699 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
700 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
701 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
703 2012-05-02 Allan McRae <allan@archlinux.org>
705 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
706 (LDFLAGS-tst-cancel24): Likewise.
708 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
710 * sysdeps/i386/pthread_spin_lock.S: New.
711 * sysdeps/i386/pthread_spin_lock.c: Delete.
712 * sysdeps/x86_64/pthread_spin_lock.S: New.
713 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
715 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
717 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
718 run when cross-compiling.
720 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
722 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
723 instead of libgcc_s.h.
725 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
727 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
729 2012-03-27 David S. Miller <davem@davemloft.net>
731 * tst-cond16.c (do_test): Use a thread stack size which is either
732 PTHREAD_STACK_MIN or the page size, whichever is larger.
733 * tst-cond18.c (do_test): Likewise.
735 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
737 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
738 register char * __asm__("rsp") to get stack frame.
740 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
742 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
745 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
747 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
750 2012-03-16 David S. Miller <davem@davemloft.net>
753 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
755 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
758 2012-03-15 David S. Miller <davem@davemloft.net>
761 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
763 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
766 * pt-crti.S: Replace FSF snail mail address with URL.
768 2012-03-09 Joseph Myers <joseph@codesourcery.com>
770 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
771 Do not define before including <time.h>.
773 2012-03-08 David S. Miller <davem@davemloft.net>
775 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
777 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
779 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
780 Check for timestamp before the Epoch.
782 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
785 * tst-sem13.c (do_test): Add another test case.
786 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
787 Fix updating nwaiters.
789 2012-03-07 Joseph Myers <joseph@codesourcery.com>
792 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
793 link test to a compile test.
794 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
796 * sysdeps/pthread/configure: Regenerated.
798 2012-03-07 Ulrich Drepper <drepper@gmail.com>
800 * Makefile (distribute): Remove variable.
802 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
804 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
805 superfluous assignment.
806 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
808 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
809 (sem_timedwait): Likewise.
811 2012-03-06 Ulrich Drepper <drepper@gmail.com>
813 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
814 installed headers to...
815 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
817 2012-03-06 David S. Miller <davem@davemloft.net>
819 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
820 atomic_increment and remove unused local variable.
821 (__old_sem_post): Likewise.
823 2012-02-27 David S. Miller <davem@davemloft.net>
825 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
826 non-existing __pthread_attr.
827 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
828 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
829 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
830 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
831 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
833 2012-02-26 Ulrich Drepper <drepper@gmail.com>
835 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
837 * sysdeps/pthread/pthread.h: Define __need_timespec before including
839 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
841 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
842 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
843 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
844 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
845 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
847 2012-02-21 Joseph Myers <joseph@codesourcery.com>
850 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
852 [crti.S not in sysdirs] (omit-deps): Do not append.
853 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
854 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
855 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
856 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
857 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
858 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
859 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
860 [crti.S in sysdirs] (extra-objs): Append unconditionally.
861 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
863 * sysdeps/pthread/pt-initfini.c: Remove file.
865 2012-02-16 Richard Henderson <rth@twiddle.net>
867 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
868 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
870 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
872 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
874 2012-02-16 David S. Miller <davem@davemloft.net>
876 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
878 2012-02-15 Marek Polacek <polacek@redhat.com>
880 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
882 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
884 Replace FSF snail mail address with URLs, as per GNU coding standards.
886 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
888 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
890 2012-02-08 Joseph Myers <joseph@codesourcery.com>
892 Support crti.S and crtn.S provided directly by architectures.
893 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
894 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
895 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
896 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
897 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
898 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
899 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
900 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
901 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
902 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
903 * pt-crti.S: New file.
904 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
906 2012-02-03 Joseph Myers <joseph@codesourcery.com>
908 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
909 macros for PIC register setup.
910 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
911 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
912 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
913 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
914 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
916 2012-01-11 Marek Polacek <polacek@redhat.com>
918 * forward.c (FORWARD_NORETURN): Define macro.
919 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
920 (__pthread_exit): Likewise.
922 2012-01-10 Ulrich Drepper <drepper@gmail.com>
924 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
926 * pthreadP.h: Add noreturn to __pthread_exit.
927 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
929 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
931 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
932 Call pthread_attr_setstacksize() with result of
933 __pthread_get_minstack() to account for application TLS usage.
935 2012-01-08 Marek Polacek <polacek@redhat.com>
937 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
939 2012-01-07 Ulrich Drepper <drepper@gmail.com>
942 * pthreadP.h: Use const instead of __const.
943 * semaphore.h: Likewise.
944 * sysdeps/pthread/bits/libc-lock.h: Likewise.
945 * sysdeps/pthread/bits/sigthread.h: Likewise.
946 * sysdeps/pthread/pthread.h: Likewise.
948 * Makefile: Remove elf=yes test, only ELF is supported.
950 * shlib-versions: Remove entries for ports architectures.
952 In case anyone cares, the IA-64 architecture could move to ports.
953 * sysdeps/ia64/*: Removed.
954 * sysdeps/unix/sysv/linux/ia64/*: Removed.
956 2011-12-22 Ulrich Drepper <drepper@gmail.com>
958 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
959 __pthread_get_minstack.
960 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
963 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
964 through __pthread_get_minstack.
965 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
966 directly from _rtld_global_ro.
967 (__pthread_get_minstack): New function.
968 * pthreadP.h: Declare __pthread_get_minstack.
969 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
971 2011-12-21 Ulrich Drepper <drepper@gmail.com>
974 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
975 Correct reading name from file.
977 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
979 * allocatestack.c (allocate_stack): Return errno on failure.
981 2011-12-14 Jeff Law <law@redhat.com>
984 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
986 2011-11-28 Andreas Schwab <schwab@redhat.com>
988 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
989 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
990 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
992 2011-11-15 Ulrich Drepper <drepper@gmail.com>
994 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
997 2011-10-29 Ulrich Drepper <drepper@gmail.com>
1000 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1001 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1002 path for kernels with FUTEX_CLOCK_REALTIME.
1003 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1005 2011-10-27 Andreas Schwab <schwab@redhat.com>
1008 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1009 for memory synchronization functions.
1010 * semaphore.h: Likewise.
1012 2011-10-24 Ulrich Drepper <drepper@gmail.com>
1014 * tst-cancel7.c: Avoid warning.
1015 * tst-mutex6.c: Likewise.
1016 * tst-mutex9.c: Likewise.
1017 * tst-mutexpi6.c: Likewise.
1019 2011-10-23 Ulrich Drepper <drepper@gmail.com>
1021 * sysdeps/i386/tls.h: Remove #include <list.h>.
1023 2011-10-15 Ulrich Drepper <drepper@gmail.com>
1025 * pthread_create.c (start_thread): Call __ctype_init.
1027 2011-09-15 Andreas Schwab <schwab@redhat.com>
1029 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1031 (list_add): Add atomic_write_barrier.
1032 * descr.h: Define __need_list_t before including <list.h>.
1033 * nptl-init.c: Include <list.h>
1034 * allocatestack.c: Likewise.
1036 2011-09-11 Ulrich Drepper <drepper@gmail.com>
1038 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1039 * sysdeps/ia64/tls.h: Likewise.
1040 * sysdeps/powerpc/tls.h: Likewise.
1041 * sysdeps/s390/tls.h: Likewise.
1042 * sysdeps/sh/tls.h: Likewise.
1043 * sysdeps/sparc/tls.h: Likewise.
1044 * sysdeps/x86_64/tls.h: Likewise.
1046 2011-09-10 Ulrich Drepper <drepper@gmail.com>
1048 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1050 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1052 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1053 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1054 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1055 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1056 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1057 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1058 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1059 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1060 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1061 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1062 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1063 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1065 * tst-tls1.c: Support for __thread is now mandatory.
1066 * tst-tls2.c: Likewise.
1067 * tst-tls3.c: Likewise.
1068 * tst-tls3mod.c: Likewise.
1069 * tst-tls4.c: Likewise.
1070 * tst-tls4moda.c: Likewise.
1071 * tst-tls4modb.c: Likewise.
1072 * tst-tls5.h: Likewise.
1074 2011-09-08 Ulrich Drepper <drepper@gmail.com>
1077 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1078 (pthread_rwlock_timedwrlock): Use correct macro in test.
1079 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1081 2011-09-06 Ulrich Drepper <drepper@gmail.com>
1083 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1084 use gettimeofday vsyscall, just call gettimeofday.
1085 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1086 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1087 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1089 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1091 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1092 Simplify __vdso_clock_gettime use.
1094 2011-09-05 David S. Miller <davem@davemloft.net>
1096 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1098 (sem_timedwait): Call it to force an exception region around
1099 the async cancel enable and the futex operation.
1100 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1101 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1102 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1103 (__new_sem_wait): Call it to force an exception region around
1104 the async cancel enable and the futex operation.
1105 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1106 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1108 2011-08-31 Andreas Schwab <schwab@redhat.com>
1110 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1113 2011-08-20 David S. Miller <davem@davemloft.net>
1115 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1117 2011-08-14 Roland McGrath <roland@hack.frob.com>
1119 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1120 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1122 2011-08-08 Andreas Schwab <schwab@redhat.com>
1124 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1126 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1127 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1129 2011-07-22 Ulrich Drepper <drepper@gmail.com>
1131 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1133 (__gcc_personality_v0): Likewise.
1134 (_Unwind_ForcedUnwind): Likewise.
1135 (_Unwind_GetCFA): Likewise.
1137 2011-07-14 Roland McGrath <roland@hack.frob.com>
1139 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1142 2011-06-30 Ulrich Drepper <drepper@gmail.com>
1144 * nptl-init.c (__nptl_set_robust): New function.
1145 (pthread_functions): Add reference.
1146 * npthreadP.h: Declare __nptl_set_robust.
1147 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1148 ptr_set_robust member.
1149 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1150 child if threads are used.
1152 2011-06-14 Andreas Jaeger <aj@suse.de>
1154 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1156 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1159 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1161 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1164 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1166 Patch partly by Robert Rex <robert.rex@exasol.com>.
1168 2011-01-19 Roland McGrath <roland@redhat.com>
1170 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1171 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1172 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1173 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1174 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1175 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1177 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1179 * Makefile (test-extras): Add tst-cleanup4aux.
1181 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1184 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1185 (__SETXID_2): Likewise.
1186 (__SETXID_3): Likewise.
1188 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1191 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1192 * alloca_cutoff.c: Add libc_hidden_def.
1194 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1197 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1198 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1199 of "struct pthread".
1201 2010-09-21 Andreas Schwab <schwab@redhat.com>
1203 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1204 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1205 (pthread_cleanup_push_defer_np): Likewise.
1207 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1209 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1212 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1213 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1215 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1216 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1218 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1220 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1222 2010-05-01 Alan Modra <amodra@gmail.com>
1224 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1225 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1226 to save temps. Correct cfi for possible later frame manipulation.
1227 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1228 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1229 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1230 (DOCARGS_6, UNDOCARGS_6): Likewise.
1231 (CENABLE, CDISABLE): Add nops for non-shared calls.
1233 2010-07-06 Andreas Schwab <schwab@redhat.com>
1235 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1238 2010-07-03 Ulrich Drepper <drepper@redhat.com>
1240 * tst-abstime.c (do_test): Some more cleanups
1242 2010-07-02 Ulrich Drepper <drepper@redhat.com>
1244 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1246 2010-07-01 Andreas Schwab <schwab@redhat.com>
1247 Ulrich Drepper <drepper@redhat.com>
1249 * Makefile (tests): Add tst-abstime.
1250 * tst-abstime.c: New file.
1251 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1252 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1253 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1254 (__lll_timedlock_wait): Likewise.
1255 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1256 (__lll_robust_timedlock_wait): Likewise.
1257 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1258 (__pthread_cond_timedwait): Likewise.
1259 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1260 (pthread_rwlock_timedrdlock): Likewise.
1261 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1262 (pthread_rwlock_timedwrlock): Likewise.
1263 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1266 2010-07-01 Ulrich Drepper <drepper@redhat.com>
1268 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1270 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1272 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1273 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1275 2010-04-09 Ulrich Drepper <drepper@redhat.com>
1278 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1279 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1280 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1282 * Makefile (libpthread-routines): Add pthread_getname and
1284 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1286 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1288 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1289 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1290 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1291 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1293 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1295 * pthread_cond_timedwait.c: Add check for
1296 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1297 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1300 2010-03-09 Ulrich Drepper <drepper@redhat.com>
1302 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1303 and the call fails wake eventually waiting setxid threads. Don't free
1304 stack here if we try starting a thread.
1305 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1306 if the clone call failed.
1308 2010-03-08 Andreas Schwab <schwab@redhat.com>
1310 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1311 * allocatestack.c (get_cached_stack): Set setxid_futex.
1312 (allocate_stack): Likewise.
1314 2010-03-05 Andreas Schwab <schwab@redhat.com>
1315 Ulrich Drepper <drepper@redhat.com>
1317 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1318 it is creating a thread or it is just being created.
1319 * pthread_create.c (start_thread): Wake setxid thread if it is
1321 (__pthread_create_2_1): Initialize setxid_futex.
1322 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1325 2010-01-15 Ulrich Drepper <drepper@redhat.com>
1327 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1329 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1331 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
1333 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1334 Fix pthread_cond_timedwait with requeue-PI.
1335 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1336 Fix pthread_cond_wait with requeue-PI.
1338 2010-01-14 Ulrich Drepper <drepper@redhat.com>
1340 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1341 and pthread_mutexattr_setrobust for GLIBC_2.12.
1342 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1343 * pthread_mutexattr_getrobust.c: Define alias
1344 pthread_mutexattr_getrobust.
1345 * pthread_mutexattr_setrobust.c: Define alias
1346 pthread_mutexattr_setrobust.
1348 2010-01-12 Ulrich Drepper <drepper@redhat.com>
1350 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1352 2010-01-08 Ulrich Drepper <drepper@redhat.com>
1354 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1356 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1358 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1359 call __gmon_start__.
1360 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1362 2009-12-17 Ulrich Drepper <drepper@redhat.com>
1364 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1367 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1369 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1370 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1371 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1372 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1373 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1374 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1375 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1376 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1378 2009-12-12 Ulrich Drepper <drepper@redhat.com>
1380 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1381 Don't update nwaiters after invalid timeout is recognized.
1383 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1385 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1388 2009-11-27 Andreas Schwab <schwab@redhat.com>
1390 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1391 THREAD_SELF->cancelhandling after returning from futex call.
1393 2009-11-24 Ulrich Drepper <drepper@redhat.com>
1395 * tst-sem13.c: New file.
1396 * Makefile (tests): Add tst-sem13.
1398 2009-11-22 Roland McGrath <roland@redhat.com>
1400 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1401 instead of recapitulating its contents.
1403 2009-11-18 Ulrich Drepper <drepper@redhat.com>
1405 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1406 optimizations and cleanups.
1408 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1410 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1411 Remove redundant code. Fix cfi offsets.
1412 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1415 2009-11-17 Ulrich Drepper <drepper@redhat.com>
1417 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1418 reduce size of unwind info.
1420 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1422 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1423 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1425 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1428 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1430 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1432 2009-10-30 Ulrich Drepper <drepper@redhat.com>
1434 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1437 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1438 steps to avoid races with creation and terminations.
1439 * nptl-init.c (sighandler_setxid): Adjust.
1440 Patch by Daniel Jacobowitz.
1442 2009-09-07 Andreas Schwab <schwab@redhat.com>
1444 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1446 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
1447 Joseph Myers <joseph@codesourcery.com>
1450 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1451 Initialize the sigev_notify field for newly created timer to make sure
1452 the timer gets deleted from the active timer's list upon timer_delete.
1454 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
1456 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1457 Correct a logic error.
1459 2009-08-25 Ulrich Drepper <drepper@redhat.com>
1461 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1462 of the field in local variables.
1463 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1464 variable and don't unconditionally clear it.
1466 2009-08-24 Ulrich Drepper <drepper@redhat.com>
1468 * pthread_create.c (start_thread): Hint to the kernel that memory for
1469 the stack can be reused. We do not mark all the memory. The part
1470 still in use and some reserve are kept.
1472 2009-08-23 Ulrich Drepper <drepper@redhat.com>
1474 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1476 2009-08-11 Ulrich Drepper <drepper@redhat.com>
1478 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1481 2009-08-10 Ulrich Drepper <drepper@redhat.com>
1483 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1485 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1487 2009-08-10 Andreas Schwab <schwab@redhat.com>
1489 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1490 (__pthread_cond_signal): Don't clobber register used for syscall
1493 2009-08-08 Ulrich Drepper <drepper@redhat.com>
1495 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1496 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1498 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1499 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1502 2009-08-07 Ulrich Drepper <drepper@redhat.com>
1504 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1505 enabled by the special *_asynccancel functions.
1506 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1507 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1509 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1511 2009-08-04 Ulrich Drepper <drepper@redhat.com>
1513 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1514 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1515 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1516 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1517 since we can assume the special __*_{en,dis}able_asynccancel
1519 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1520 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1521 and PTHREAD_CANCELED.
1523 2009-07-31 Ulrich Drepper <drepper@redhat.com>
1525 * descr.h: Better definition of *_BITMASK macros for cancellation.
1527 2009-07-29 Ulrich Drepper <drepper@redhat.com>
1529 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1531 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1532 dynamic linker might have to save.
1533 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1534 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1537 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1539 2009-07-28 Ulrich Drepper <drepper@redhat.com>
1541 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1543 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1544 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1545 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1546 requeue_pi for robust mutexes.
1547 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1548 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1549 Don't only skip __pthread_mutex_cond_lock. Call instead
1550 __pthread_mutex_cond_lock_adjust.
1551 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1553 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1554 optimization of PI mutex handling.
1556 2009-07-27 Ulrich Drepper <drepper@redhat.com>
1559 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1560 instead of of _acq variants of cmpxchg.
1562 2009-07-23 Ulrich Drepper <drepper@redhat.com>
1564 * sysdeps/x86_64/configure.in: New file.
1566 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1567 path when not using absolute timeout futex.
1569 2009-07-20 Ulrich Drepper <drepper@redhat.com>
1571 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1572 optimizations of last changes.
1573 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1575 2009-07-19 Ulrich Drepper <drepper@redhat.com>
1577 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1578 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1579 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1580 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1581 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1582 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1583 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1584 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1586 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1587 (__pthread_cond_timedwait): Make more robust.
1589 2009-07-18 Ulrich Drepper <drepper@redhat.com>
1591 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1592 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1593 directly use absolute timeout.
1595 * tst-sem5.c (do_test): Add test for premature timeout.
1596 * Makefile: Linu tst-sem5 with librt.
1598 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1599 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1600 directly use absolute timeout.
1601 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1602 (pthread_rwlock_timedrdlock): Likewise.
1604 * tst-cond11.c (run_test): Add test to check that the timeout is
1607 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1608 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1609 directly use absolute timeout.
1611 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1612 (__pthread_cond_wait): Convert to using exception handler instead of
1613 registered unwind buffer.
1614 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1615 (__pthread_cond_timedwait): Likewise.
1617 2009-07-17 Ulrich Drepper <drepper@redhat.com>
1619 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1620 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1621 use absolute timeout.
1623 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1624 handling of uncontested semaphore.
1626 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1627 (__condvar_cleanup): Rewrite to use cfi directives instead of
1628 hand-coded unwind tables.
1629 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1631 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1632 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1635 2009-06-12 Ulrich Drepper <drepper@redhat.com>
1637 * Makefile (libpthread-routines): Add pthread_sigqueue.
1638 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1639 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1640 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1642 2009-06-11 Ulrich Drepper <drepper@redhat.com>
1645 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1646 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1648 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1650 2009-05-16 Ulrich Drepper <drepper@redhat.com>
1652 * libc-cancellation.c: Move __libc_cleanup_routine to...
1653 * libc-cleanup.c: ...here. New file.
1654 * Makefile (routines): Add libc-cleanup.
1656 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1658 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1659 * sysdeps/pthread/librt-cancellation.c: Likewise.
1662 * nptl-init.c: Renamed from init.c.
1663 * Makefile: Change all occurences of init.c to nptl-init.c.
1665 2009-05-15 Ulrich Drepper <drepper@redhat.com>
1667 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1668 to test when deciding on the delay.
1669 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1670 * pthread_cancel.c: Close race between deciding on sending a signal
1671 and setting the CANCELING_BIT bit.
1673 * cancellation.c (__pthread_disable_asynccancel): Don't return if
1675 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1677 2009-04-27 Ulrich Drepper <drepper@redhat.com>
1679 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1681 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1682 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1683 * sysdeps/i386/tls.h: Likewise.
1684 (tcbhead_t): Add __private_tm member.
1686 2009-04-26 Ulrich Drepper <drepper@redhat.com>
1688 * sem_open.c (sem_open): Rewrite initialization of initsem to
1691 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1692 Avoid warning by using may_alias attribute on ptrhack.
1694 2009-04-22 Ulrich Drepper <drepper@redhat.com>
1697 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1698 Check policy and priority for validity.
1699 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1701 2009-03-15 Ulrich Drepper <drepper@redhat.com>
1703 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1704 (__pthread_cond_timedwait): Change to use cfi directives instead of
1705 hand-coded unwind sections.
1707 2009-03-10 Ulrich Drepper <drepper@redhat.com>
1709 * init.c (nptl_freeres): Compile only for SHARED.
1711 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1713 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1714 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1715 FUTEX_BITSET_MATCH_ANY.
1717 2009-02-27 Roland McGrath <roland@redhat.com>
1719 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1720 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1722 2009-02-26 Ulrich Drepper <drepper@redhat.com>
1724 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1725 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1726 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1729 2009-02-25 Ulrich Drepper <drepper@redhat.com>
1731 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1734 2009-02-24 Ulrich Drepper <drepper@redhat.com>
1736 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1737 Unify name of include protector macro.
1739 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1741 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1742 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1744 2009-01-29 Ulrich Drepper <drepper@redhat.com>
1746 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1749 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1750 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1751 * init.c (nptl_freeres): New function.
1752 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1753 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1754 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1756 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1757 load DSO. Assign last.
1758 (__unwind_freeres): New function.
1760 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1761 for better debugging. No need to use stack_list_add here.
1763 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1765 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1766 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1767 instead of computing relative timeout.
1768 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1769 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1771 2009-01-25 Ulrich Drepper <drepper@redhat.com>
1773 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1775 2009-01-08 Ulrich Drepper <drepper@redhat.com>
1777 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1778 (list_add_tail): Removed.
1780 2009-01-07 Ulrich Drepper <drepper@redhat.com>
1782 * (in_flight_stack): New variable.
1783 (stack_list_del): New function. Use instead of list_del.
1784 (stack_list_add): New function. Use instead of list_add when adding to
1785 stack_cache and stack_used lists.
1786 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1787 when the fork call interrupted another thread.
1789 2009-01-04 Ulrich Drepper <drepper@redhat.com>
1791 * init.c (__pthread_initialize_minimal_internal): Optimize test
1792 FUTEX_CLOCK_REALTIME a bit.
1794 2009-01-03 Ulrich Drepper <drepper@redhat.com>
1796 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1797 only passing five parameters to FUTEX_WAIT_BITSET call.
1799 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1800 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1801 instead of computing relative timeout.
1803 2009-01-02 Ulrich Drepper <drepper@redhat.com>
1805 * init.c (__pthread_initialize_minimal_internal): Check for
1806 FUTEX_CLOCK_REALTIME flag.
1807 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1808 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1811 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1812 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1813 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1814 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1815 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1816 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1818 2008-12-09 Ulrich Drepper <drepper@redhat.com>
1820 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1821 loop body instead of ; to avoid gcc warnings.
1822 (pthread_cleanup_pop_restore_np): Likewise.
1823 Patch by Caolán McNamara <caolanm@redhat.com>.
1825 2008-12-09 Jakub Jelinek <jakub@redhat.com>
1827 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1828 fast path here, for robust/PI/PP mutexes call
1829 __pthread_mutex_lock_full. Don't use switch, instead use a series
1830 of ifs according to their probability.
1831 (__pthread_mutex_lock_full): New function.
1832 * pthread_mutex_unlock.c: Include assert.h.
1833 (__pthread_mutex_unlock_usercnt): Handle only the
1834 fast path here, for robust/PI/PP mutexes call
1835 __pthread_mutex_unlock_full. Don't use switch, instead use a series
1836 of ifs according to their probability.
1837 (__pthread_mutex_unlock_full): New function.
1838 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1839 (__pthread_mutex_lock_full): Define.
1841 2008-12-08 Ulrich Drepper <drepper@redhat.com>
1843 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1844 implementation. Add necessary padding and.
1845 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1848 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1850 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1851 and FUTEX_WAKE_BITSET.
1853 2008-12-02 Ulrich Drepper <drepper@redhat.com>
1855 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1856 and FUTEX_WAKE_BITSET.
1857 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1858 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1859 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1860 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1862 2008-11-25 Roland McGrath <roland@redhat.com>
1864 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1865 Subdirectories moved to ports repository as
1866 sysdeps/.../nptl subdirectories.
1868 2008-11-12 Jakub Jelinek <jakub@redhat.com>
1871 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1873 * pthread_cond_init.c (__pthread_cond_init): Fix
1874 cond->__data.__nwaiters initialization.
1875 * Makefile (tests): Add tst-cond23.
1876 * tst-cond23.c: New test.
1878 2008-11-07 Jakub Jelinek <jakub@redhat.com>
1880 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1882 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1885 2008-11-01 Ulrich Drepper <drepper@redhat.com>
1888 * pthread_mutex_lock.c: Add support for private PI mutexes.
1889 * pthread_mutex_timedlock.c: Likewise.
1890 * pthread_mutex_trylock.c: Likewise.
1891 * pthread_mutex_unlock.c: Likewise.
1892 Patch mostly by Ben Jackson <ben@ben.com>.
1894 2008-10-31 Ulrich Drepper <drepper@redhat.com>
1897 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1898 Increase stack size for helper thread.
1900 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1902 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1903 assembly with a clobber list for access registers a0 and a1.
1905 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1907 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1908 to force runp->refcntr to be read from memory.
1910 2008-09-08 Richard Guenther <rguenther@suse.de>
1912 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1913 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1914 lll_timedlock, lll_robust_timedlock, lll_unlock,
1915 lll_robust_unlock): Promote private to int.
1917 2008-08-15 Ulrich Drepper <drepper@redhat.com>
1919 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1920 ARCH_RETRY_MMAP definitions.
1921 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1922 Define MAP_STACK when not defined.
1923 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
1924 handling of ARCH_RETRY_MMAP.
1926 2008-07-30 Ulrich Drepper <drepper@redhat.com>
1928 * tst-align2.c (f): Print message that f is reached.
1930 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
1933 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1934 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1936 2008-07-25 Ulrich Drepper <drepper@redhat.com>
1938 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1939 SOCK_CLOEXEC if possible.
1941 2008-05-29 Ulrich Drepper <drepper@redhat.com>
1943 * Makefile (tests): Add tst-rwlock2a.
1944 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1945 * tst-rwlock2a.c: New file.
1947 2008-06-12 Ulrich Drepper <drepper@redhat.com>
1949 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1951 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
1953 * sysdeps/pthread/pthread.h: Fix typo in comment.
1955 2008-05-28 Ulrich Drepper <drepper@redhat.com>
1957 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1958 of CPU set to the kernel.
1960 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
1962 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1964 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1965 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1966 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1967 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1968 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1969 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1971 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
1973 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1975 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1977 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1979 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1982 2008-05-26 Ulrich Drepper <drepper@redhat.com>
1984 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1986 2008-05-20 Jakub Jelinek <jakub@redhat.com>
1988 David S. Miller <davem@davemloft.net>
1990 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1992 2008-05-10 Ulrich Drepper <drepper@redhat.com>
1994 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1995 __pshared correctly.
1996 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1998 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2000 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2002 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2004 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2006 2008-04-14 David S. Miller <davem@davemloft.net>
2008 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2009 (__old_sem_wait): Fix argument to lll_futex_wait().
2011 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2013 * pthread_create.c: Require pthread_mutex_trylock and
2014 pthread_key_delete for libgcc.
2016 2008-04-08 Jakub Jelinek <jakub@redhat.com>
2019 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2020 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2021 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2023 2008-03-27 Ulrich Drepper <drepper@redhat.com>
2025 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2026 <linux/limits.h> has defined it.
2027 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2028 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2029 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2030 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2032 2008-03-18 Jakub Jelinek <jakub@redhat.com>
2034 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2036 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2037 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2039 2008-03-14 Ulrich Drepper <drepper@redhat.com>
2041 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2042 HAVE_DL_DISCOVER_OSVERSION.
2043 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2044 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2046 2008-03-07 Ulrich Drepper <drepper@redhat.com>
2049 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2050 _POSIX_CHOWN_RESTRICTED value to zero.
2052 2008-01-31 Roland McGrath <roland@redhat.com>
2054 * Makefile (omit-deps): Variable removed.
2056 2008-01-30 Ulrich Drepper <drepper@redhat.com>
2058 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2059 unnecessary addr32 prefix.
2061 2008-01-29 Roland McGrath <roland@redhat.com>
2063 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2065 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2067 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2069 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2071 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2073 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2074 (__lll_lock_wait_private): Fix typo.
2075 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2076 (pthread_barrier_wait): Likewise. Adjust XADD use.
2077 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2079 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2080 (pthread_rwlock_timedrdlock): Return correct return value.
2081 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2082 (pthread_rwlock_timedwrlock): Likewise.
2084 2008-01-15 Ulrich Drepper <drepper@redhat.com>
2086 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2087 thread returns the program exits with an error code.
2089 2008-01-10 Ulrich Drepper <drepper@redhat.com>
2091 * pthread-errnos.sym: Add EOVERFLOW.
2092 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2093 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2094 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2095 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2097 2007-12-14 Ulrich Drepper <drepper@redhat.com>
2099 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2100 parameter. Passed it as permission to mmap.
2101 * allocatestack.c (allocate_stack): Pass prot as second parameter
2104 2007-12-12 Ulrich Drepper <drepper@redhat.com>
2106 * tst-basic7.c: Allocate memory for the stack.
2109 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2110 (__pthread_cond_timedwait): Don't use VDSO.
2111 Patch by Michal Januszewski.
2113 2007-12-07 Ulrich Drepper <drepper@redhat.com>
2116 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2117 Allow label before pthread_cleanup_pop.
2118 (pthread_cleanup_pop_restore_np): Likewise.
2120 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2122 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2123 Store 2 before returning ETIMEDOUT.
2125 2007-11-23 Ulrich Drepper <drepper@redhat.com>
2127 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2128 Store 2 before returning ETIMEDOUT.
2129 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2130 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2131 (__lll_lock_wait_private): Optimize.
2132 (__lll_lock_wait): Likewise.
2134 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2136 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2137 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2138 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2140 2007-11-08 Ulrich Drepper <drepper@redhat.com>
2143 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2144 If we time out, try one last time to lock the futex to avoid
2145 losing a wakeup signal.
2146 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2147 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2150 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2153 2007-11-07 Ulrich Drepper <drepper@redhat.com>
2156 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2157 mmap failed to EAGAIN.
2158 * Makefile (tests): Add tst-basic7.
2159 * tst-basic7.c: New file.
2161 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2163 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2164 Use __linkin_atfork.
2166 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2168 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2169 missing line continuations.
2170 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2171 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2173 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2176 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2177 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2178 (struct timer): Add next element.
2179 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2180 enqueue timer structure into __active_timer_sigev_thread list.
2181 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2182 remove timer struct from __active_timer_sigev_thread.
2183 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2184 Before using timer structure make sure it is still on the
2185 __active_timer_sigev_thread list. Keep lock until done.
2186 Define __active_timer_sigev_thread and
2187 __active_timer_sigev_thread_lock.
2189 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2191 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2192 Redefine thread_atfork for use of ATFORK_MEM.
2193 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2194 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2196 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2197 Use atomic operation when removing first element of list.
2199 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2201 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2202 routine instead of an alias to __new_sem_post.
2204 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2206 * init.c (__pthread_initialize_minimal): Initialize word to appease
2209 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2211 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2212 libc.so just clear NAME.
2213 (__libc_rwlock_fini): Nop inside of libc.so.
2214 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2217 2007-09-02 Ulrich Drepper <drepper@redhat.com>
2219 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2220 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2222 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2224 2007-08-21 Ulrich Drepper <drepper@redhat.com>
2227 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2228 reclaimed stack if necessary.
2229 * Makefile (tests): Add tst-tsd6.
2230 * tst-tsd6.c: New file.
2232 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2234 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2235 Add private argument.
2237 2007-08-20 Ulrich Drepper <drepper@redhat.com>
2239 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2240 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2242 2007-08-16 Jakub Jelinek <jakub@redhat.com>
2244 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2245 (__lll_robust_timedlock): Pass private as last argument to
2246 __lll_robust_timedlock_wait.
2247 (__lll_unlock): Fix a pasto.
2249 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2251 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2252 sparc_old_sem): New structs.
2253 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2254 (__sem_wait_cleanup): New function.
2255 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2256 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2257 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2259 (__old_sem_wait): New function.
2260 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2261 nptl/sysdeps/unix/sysv/linux/sparc version.
2262 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2264 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2265 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2266 (__new_sem_trywait): Use sparc_old_sem structure.
2267 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2268 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2269 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2270 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2271 lll_futex_timed_wait.
2272 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2273 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2274 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2276 (__old_sem_post): New function.
2277 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2278 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2279 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2280 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2281 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2282 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2284 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2286 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2287 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2288 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2289 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2290 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2291 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2292 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2294 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2295 kernel-features.h and tcb-offsets.h.
2296 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2297 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2299 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2301 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2302 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2304 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2305 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2306 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2307 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2308 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2309 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2310 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2312 2007-08-14 Jakub Jelinek <jakub@redhat.com>
2314 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2315 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2316 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2317 lll_futex_timed_wait.
2319 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2320 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2321 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2322 __lll_robust_unlock, __lll_wait_tid): Likewise.
2324 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2326 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2328 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2329 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2330 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2331 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2332 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2333 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2334 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2335 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2337 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2338 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2339 process private. Switch DW_CFA_advance_loc1 and some
2340 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2341 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2342 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2343 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2344 process private. Switch DW_CFA_advance_loc{1,2} and some
2345 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2346 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2347 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2348 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2350 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2351 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2352 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2354 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2355 (__pthread_cond_broadcast): Compare %r8 instead of
2356 dep_mutex-cond_*(%rdi) with $-1.
2357 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2358 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2361 2007-08-13 Ulrich Drepper <drepper@redhat.com>
2363 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2365 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2367 * allocatestack.c: Include kernel-features.h.
2368 * pthread_create.c: Likewise.
2369 * pthread_mutex_init.c: Likewise.
2371 * pthread_cond_timedwait.c: Likewise.
2372 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2373 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2374 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2375 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2376 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2377 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2378 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2380 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2382 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2383 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2384 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2385 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2387 2007-08-12 Jakub Jelinek <jakub@redhat.com>
2389 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2390 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2391 byte elements. One of them is the new __shared element.
2392 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2393 adjust names of other padding elements.
2394 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2395 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2396 byte elements. One of them is the new __shared element.
2397 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2398 adjust names of other padding elements.
2399 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2400 Renamed __pad1 element to __shared, adjust names of other padding
2402 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2403 (pthread_rwlock_t): Likewise.
2404 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2407 2007-08-09 Anton Blanchard <anton@samba.org>
2409 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2411 2007-08-12 Ulrich Drepper <drepper@redhat.com>
2413 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2414 <kernel-features.h>.
2415 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2417 2007-08-11 Ulrich Drepper <drepper@redhat.com>
2419 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2420 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2421 dealing with robust mutexes.
2422 * pthread_mutex_timedlock.c: Likewise.
2423 * pthread_mutex_trylock.c: Likewise.
2424 * pthread_mutex_unlock.c: Likewise.
2425 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2427 2007-08-06 Jakub Jelinek <jakub@redhat.com>
2429 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2430 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2431 (PTHREAD_MUTEX_PSHARED): Define.
2432 * pthread_mutex_init.c (__pthread_mutex_init): Set
2433 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2435 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2436 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2437 as second argument to lll_lock.
2438 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2439 instead of its __data.__lock field.
2440 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2441 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2443 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2444 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2445 instead of mutex->__data.__kind directly, pass
2446 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2447 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2448 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2449 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2450 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2451 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2452 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2453 of mutex->__data.__kind directly.
2454 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2455 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2456 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2457 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2458 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2459 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2461 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2462 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2463 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2465 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2466 Take mutex as argument instead of its __data.__lock field, pass
2467 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2468 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2469 __data.__lock field.
2470 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2471 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2472 to lll_robust_cond_lock.
2473 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2474 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2475 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2476 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2477 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2478 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2480 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2481 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2483 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2484 pshared variable, pass it to lll_lock, lll_unlock,
2485 lll_futex_timedwait and lll_futex_wake.
2486 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2487 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2489 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2490 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2492 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2493 lll_futex_wake_unlock): Likewise.
2494 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2496 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2497 lll_futex_wake_unlock): Likewise.
2498 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2500 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2501 lll_futex_wake_unlock): Likewise.
2502 (lll_futex_wake): Fix a typo.
2503 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2504 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2505 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2506 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2507 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2508 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2509 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2510 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2511 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2512 (__pthread_cond_timedwait): Likewise.
2513 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2514 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2516 2007-08-05 Jakub Jelinek <jakub@redhat.com>
2518 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2519 Don't use CGOTSETUP and CGOTRESTORE macros.
2520 (CGOTSETUP, CGOTRESTORE): Remove.
2521 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2524 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2526 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2527 definitions for private futexes.
2528 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2529 kernel-features.h and lowlevellock.h. Use private futexes if
2531 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2532 (__lll_mutex_lock_wait): Rename to
2533 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2534 (__lll_mutex_timedlock_wait): Rename to ...
2535 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2536 Don't compile in for libc.so.
2537 (__lll_mutex_unlock_wake): Rename to ...
2538 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2539 (__lll_timedwait_tid): Use __NR_gettimeofday.
2540 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2541 the header from assembler. Renamed all lll_mutex_* resp.
2542 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2543 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2544 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2546 (__lll_lock_wait_private): Add prototype.
2547 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2548 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2549 __lll_unlock_wake): Likewise.
2550 (lll_lock): Add private argument. Call __lll_lock_wait_private
2551 if private is constant LLL_PRIVATE.
2552 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2553 lll_timedlock, lll_robust_timedlock): Add private argument.
2554 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2555 if private is constant LLL_PRIVATE.
2556 (lll_robust_unlock, lll_robust_dead): Add private argument.
2557 (lll_lock_t): Remove.
2558 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2559 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2560 lll_cond_wake, lll_cond_broadcast): Remove.
2561 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2562 kernel-features.h and lowlevellock.h.
2563 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2564 (LOAD_FUTEX_WAIT): Define.
2565 (__lll_robust_mutex_lock_wait): Rename to ...
2566 (__lll_robust_lock_wait): ... this. Add private argument.
2567 Use LOAD_FUTEX_WAIT macro.
2568 (__lll_robust_mutex_timedlock_wait): Rename to ...
2569 (__lll_robust_timedlock_wait): ... this. Add private argument.
2570 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2571 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2573 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2574 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2575 __lll_mutex_{lock,unlock}_*.
2576 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2577 lowlevellock.h and pthread-errnos.h.
2578 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2579 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2580 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2581 __lll_mutex_{lock,unlock}_*.
2582 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2583 lowlevellock.h and pthread-errnos.h.
2584 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2585 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2586 __lll_mutex_{lock,unlock}_*.
2587 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2589 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2590 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2591 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2592 (__condvar_tw_cleanup): Likewise.
2593 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2595 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2596 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2597 __lll_mutex_{lock,unlock}_*.
2598 ( __condvar_w_cleanup): Likewise.
2599 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2600 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2601 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2603 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2604 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2605 __lll_mutex_{lock,unlock}_*.
2606 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2608 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2609 FUTEX_PRIVATE_FLAG): Remove.
2610 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2611 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2612 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2614 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2615 FUTEX_PRIVATE_FLAG): Remove.
2616 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2617 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2618 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2620 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2621 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2622 __lll_mutex_{lock,unlock}_*.
2623 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2625 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2626 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2627 __lll_mutex_{lock,unlock}_*.
2628 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2629 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2630 (__new_sem_post): Use standard initial exec code sequences.
2631 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2633 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2634 FUTEX_PRIVATE_FLAG): Remove.
2635 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2636 exec code sequences.
2637 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2638 (__new_sem_trywait): Use standard initial exec code sequences.
2639 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2640 (__new_sem_wait): Use standard initial exec code sequences.
2642 2007-07-31 Anton Blanchard <anton@samba.org>
2644 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2645 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2646 atomic_full_barrier.
2648 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2650 * allocatestack.c (stack_cache_lock): Change type to int.
2651 (get_cached_stack, allocate_stack, __deallocate_stack,
2652 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2653 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2654 as second argument to lll_lock and lll_unlock macros on
2656 * pthread_create.c (__find_in_stack_list): Likewise.
2657 (start_thread): Similarly with pd->lock. Use lll_robust_dead
2658 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2660 * descr.h (struct pthread): Change lock and setxid_futex field
2662 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2663 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2664 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2665 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2667 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2668 * pthread_cond_init.c (__pthread_cond_init): Likewise.
2669 * pthreadP.h (__attr_list_lock): Change type to int.
2670 * pthread_attr_init.c (__attr_list_lock): Likewise.
2671 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2672 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2674 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2675 also for lll_futex_{wake,wait}.
2676 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2678 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2679 LLL_SHARED as second argument to lll_{,un}lock.
2680 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2681 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2682 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2683 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2685 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2686 as second argument to lll_{,un}lock macros on pd->lock.
2687 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2688 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2689 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2690 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2692 * sysdeps/pthread/createthread.c (do_clone, create_thread):
2694 * pthread_once.c (once_lock): Change type to int.
2695 (__pthread_once): Pass LLL_PRIVATE as second argument to
2696 lll_{,un}lock macros on once_lock.
2697 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2698 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2699 rwlock->__data.__shared as second argument to them and similarly
2701 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2703 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2705 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2706 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2707 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2708 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2709 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2710 to lll_{,un}lock macros on __sem_mappings_lock.
2711 * sem_open.c (check_add_mapping): Likewise.
2712 (__sem_mappings_lock): Change type to int.
2713 * semaphoreP.h (__sem_mappings_lock): Likewise.
2714 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2715 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2716 instead of lll_*mutex_*, pass LLL_SHARED as last
2718 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2719 pass LLL_SHARED as last argument.
2720 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2721 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2722 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2723 pass LLL_SHARED as last argument.
2724 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2725 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2726 LLL_SHARED as last argument.
2727 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2728 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2730 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2731 __libc_lock_lock_recursive, __libc_lock_unlock,
2732 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2733 argument to lll_{,un}lock.
2734 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2735 _IO_lock_unlock): Likewise.
2736 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2738 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2739 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2741 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2742 free_mem): Likewise.
2743 (__fork_lock): Change type to int.
2744 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2745 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2746 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2748 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2749 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2750 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2752 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2753 pass it through to lll_futex_*wait, only compile in when
2755 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2756 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2757 argument and pass it through to lll_futex_*wait.
2758 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2759 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2760 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2761 inline functions to __lll_* resp. __lll_robust_*.
2762 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2763 (lll_mutex_dead): Add private argument.
2764 (__lll_lock_wait_private): New prototype.
2765 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2766 __lll_robust_lock_timedwait): Add private argument to prototypes.
2767 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2768 call __lll_lock_wait_private, otherwise pass private to
2770 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2771 __lll_robust_timedlock): Add private argument, pass it to
2772 __lll_*wait functions.
2773 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2774 call __lll_unlock_wake_private, otherwise pass private to
2776 (__lll_robust_unlock): Add private argument, pass it to
2777 __lll_robust_unlock_wake.
2778 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2779 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2780 argument, pass it through to __lll_* inline function.
2781 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2782 (lll_lock_t): Remove.
2783 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2784 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2785 lll_cond_wake, lll_cond_broadcast): Remove.
2786 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2787 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2788 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2789 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2790 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2791 the header from assembler. Renamed all lll_mutex_* resp.
2792 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2793 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2794 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2795 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2796 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2797 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2798 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2800 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2801 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2802 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2803 (lll_trylock): Likewise, use __lll_trylock_asm, pass
2804 MULTIPLE_THREADS_OFFSET as another asm operand.
2805 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2806 MULTIPLE_THREADS_OFFSET as last asm operand, call
2807 __lll_lock_wait_private if private is constant LLL_PRIVATE,
2808 otherwise pass private as another argument to __lll_lock_wait.
2809 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2810 lll_timedlock, lll_robust_timedlock): Add private argument, pass
2811 private as another argument to __lll_*lock_wait call.
2812 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2813 MULTIPLE_THREADS_OFFSET as another asm operand, call
2814 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2815 otherwise pass private as another argument to __lll_unlock_wake.
2816 (lll_robust_unlock): Add private argument, pass private as another
2817 argument to __lll_unlock_wake.
2818 (lll_robust_dead): Add private argument, use __lll_private_flag
2820 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2821 LLL_MUTEX_LOCK_INITIALIZER.
2822 (lll_lock_t): Remove.
2823 (LLL_LOCK_INITIALIZER_WAITERS): Define.
2824 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2825 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2826 lll_cond_wake, lll_cond_broadcast): Remove.
2827 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2828 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2829 2007-05-2{3,9} changes.
2830 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2831 kernel-features.h and lowlevellock.h.
2832 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2833 (LOAD_FUTEX_WAIT): Rewritten.
2834 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2836 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2837 (__lll_mutex_lock_wait): Rename to ...
2838 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
2839 %ecx, %ecx is now private argument. Don't compile in for libc.so.
2840 (__lll_mutex_timedlock_wait): Rename to ...
2841 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
2842 contains private argument. Don't compile in for libc.so.
2843 (__lll_mutex_unlock_wake): Rename to ...
2844 (__lll_unlock_wake): ... this. %ecx contains private argument.
2845 Don't compile in for libc.so.
2846 (__lll_timedwait_tid): Use __NR_gettimeofday.
2847 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2848 kernel-features.h and lowlevellock.h.
2849 (LOAD_FUTEX_WAIT): Define.
2850 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2852 (__lll_robust_mutex_lock_wait): Rename to ...
2853 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
2854 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
2856 (__lll_robust_mutex_timedlock_wait): Rename to ...
2857 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
2858 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2859 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2861 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2862 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2863 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2864 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2865 to __lll_lock_wait in %edx.
2866 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2867 Include lowlevellock.h and pthread-errnos.h.
2868 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2869 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2870 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2871 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2872 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2874 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2875 Include lowlevellock.h and pthread-errnos.h.
2876 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2877 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2878 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2879 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2880 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2882 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2883 Include lowlevellock.h.
2884 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2886 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2887 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2888 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2889 __lll_unlock_wake. Use __NR_gettimeofday.
2890 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2891 Include lowlevellock.h.
2892 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2893 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2894 to __lll_*, pass cond_lock address in %edx rather than %ecx to
2895 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2896 and __lll_unlock_wake.
2897 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2898 Include lowlevellock.h.
2899 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2900 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2901 MUTEX(%ebx) address in %edx rather than %ecx to
2902 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2903 and __lll_unlock_wake. Move return value from %ecx to %edx
2905 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2906 Include lowlevellock.h.
2907 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2909 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2910 MUTEX(%ebp) address in %edx rather than %ecx to
2911 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2912 and __lll_unlock_wake. Move return value from %ecx to %edx
2913 register. Use __NR_gettimeofday.
2914 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2915 Include lowlevellock.h.
2916 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2918 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2919 MUTEX(%ebp) address in %edx rather than %ecx to
2920 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2921 and __lll_unlock_wake. Move return value from %ecx to %edx
2922 register. Use __NR_gettimeofday.
2923 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2924 Include lowlevellock.h.
2925 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2926 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2927 MUTEX(%edi) address in %edx rather than %ecx to
2928 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2929 and __lll_unlock_wake.
2930 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2931 Include lowlevellock.h.
2932 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2933 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2934 MUTEX(%ebx) address in %edx rather than %ecx to
2935 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2936 and __lll_unlock_wake. Move return value from %ecx to %edx
2938 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2940 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2942 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2943 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2944 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2946 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2947 (sem_timedwait): Use __NR_gettimeofday.
2948 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2950 (LOCK): Don't define.
2951 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2953 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2954 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2956 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2957 2007-05-2{3,9} changes.
2958 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2959 kernel-features.h and lowlevellock.h.
2960 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2961 (LOAD_FUTEX_WAIT): Rewritten.
2962 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2963 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2964 (__lll_mutex_lock_wait): Rename to ...
2965 (__lll_lock_wait): ... this. %esi is now private argument.
2966 Don't compile in for libc.so.
2967 (__lll_mutex_timedlock_wait): Rename to ...
2968 (__lll_timedlock_wait): ... this. %esi contains private argument.
2969 Don't compile in for libc.so.
2970 (__lll_mutex_unlock_wake): Rename to ...
2971 (__lll_unlock_wake): ... this. %esi contains private argument.
2972 Don't compile in for libc.so.
2973 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2974 kernel-features.h and lowlevellock.h.
2975 (LOAD_FUTEX_WAIT): Define.
2976 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2977 (__lll_robust_mutex_lock_wait): Rename to ...
2978 (__lll_robust_lock_wait): ... this. %esi argument contains private.
2979 Use LOAD_FUTEX_WAIT macro.
2980 (__lll_robust_mutex_timedlock_wait): Rename to ...
2981 (__lll_robust_timedlock_wait): ... this. %esi argument contains
2982 private, use LOAD_FUTEX_WAIT macro.
2983 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2985 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2986 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2987 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2988 __lll_lock_wait and __lll_unlock_wake.
2989 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2990 Include lowlevellock.h and pthread-errnos.h.
2991 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2992 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2993 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2994 pass LLL_SHARED in %esi to both __lll_lock_wait and
2996 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2997 Include lowlevellock.h and pthread-errnos.h.
2998 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2999 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3000 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3001 pass LLL_SHARED in %esi to both __lll_lock_wait and
3003 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3004 Include lowlevellock.h.
3005 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3006 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3007 pass LLL_SHARED in %esi to both __lll_lock_wait and
3009 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3010 Include lowlevellock.h.
3011 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3012 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3013 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3014 and __lll_unlock_wake.
3015 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3016 Include lowlevellock.h.
3017 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3019 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3020 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3021 and __lll_unlock_wake.
3022 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3023 Include lowlevellock.h.
3024 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3026 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3027 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3028 and __lll_unlock_wake.
3029 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3030 Include lowlevellock.h.
3031 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3033 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3034 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3035 and __lll_unlock_wake.
3036 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3037 Include lowlevellock.h.
3038 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3040 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3041 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3042 and __lll_unlock_wake.
3043 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3044 Include lowlevellock.h.
3045 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3047 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3048 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3049 and __lll_unlock_wake.
3050 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3052 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3054 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3055 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3056 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3058 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3059 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3061 (LOCK): Don't define.
3062 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3064 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3065 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3066 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3067 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3068 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3069 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3070 (__lll_lock_wait_private): New function.
3071 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3072 it to lll_futex_*wait. Don't compile in for libc.so.
3073 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3075 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3076 (struct sparc_pthread_barrier): Remove.
3077 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3078 struct sparc_pthread_barrier. Pass
3079 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3080 and lll_futex_wait macros.
3081 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3083 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3084 Include sparc pthread_barrier_wait.c instead of generic one.
3086 2007-07-30 Jakub Jelinek <jakub@redhat.com>
3088 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3090 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3091 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3093 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3094 (pthread_rwlock_timedwrlock): Likewise.
3095 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3096 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3098 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3100 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3102 2007-07-26 Jakub Jelinek <jakub@redhat.com>
3104 * tst-locale2.c (useless): Add return statement.
3106 2007-07-24 Jakub Jelinek <jakub@redhat.com>
3108 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3109 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3110 * pthread_create.c (start_thread): Likewise.
3111 * init.c (sighandler_setxid): Likewise.
3112 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3113 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3114 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3115 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3116 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3117 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3118 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3119 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3120 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3122 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3124 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3126 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3127 __rtld_notify): Likewise.
3128 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3129 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3130 __pthread_once): Likewise.
3131 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3132 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3133 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3134 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3135 (lll_futex_wait): Add private argument, define as wrapper around
3136 lll_futex_timed_wait.
3137 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3138 use __lll_private_flag macro.
3139 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3140 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3141 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3142 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3143 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3144 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3145 (lll_futex_wait): Add private argument, define as wrapper around
3146 lll_futex_timed_wait.
3147 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3148 use __lll_private_flag macro.
3149 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3150 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3151 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3153 (lll_futex_timed_wait, lll_futex_wake): Use it.
3154 (lll_private_futex_wait, lll_private_futex_timed_wait,
3155 lll_private_futex_wake): Removed.
3156 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3157 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3158 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3159 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3160 (lll_futex_wait): Add private argument, define as wrapper around
3161 lll_futex_timed_wait.
3162 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3163 use __lll_private_flag macro.
3164 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3165 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3167 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3168 (lll_private_futex_wait, lll_private_futex_timed_wait,
3169 lll_private_futex_wake): Removed.
3170 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3171 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3172 (lll_private_futex_wait, lll_private_futex_timed_wait,
3173 lll_private_futex_wake): Removed.
3174 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3175 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3176 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3177 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3178 (lll_futex_wait): Add private argument, define as wrapper around
3179 lll_futex_timed_wait.
3180 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3181 use __lll_private_flag macro.
3182 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3183 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3185 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3187 (lll_futex_timed_wait, lll_futex_wake): Use it.
3188 (lll_private_futex_wait, lll_private_futex_timed_wait,
3189 lll_private_futex_wake): Removed.
3191 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3193 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3194 of the structure for sparc32.
3196 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3198 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3200 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3202 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3203 code used when private futexes are assumed.
3204 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3207 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3209 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3210 (__lll_private_flag): Define.
3211 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3212 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3214 (lll_private_futex_wait, lll_private_futex_timedwait,
3215 lll_private_futex_wake): Define as wrapper around non-_private
3217 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3218 (__lll_private_flag): Define.
3219 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3220 (lll_private_futex_wait, lll_private_futex_timedwait,
3221 lll_private_futex_wake): Define as wrapper around non-_private
3224 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3226 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3227 parameter to lll_futex_wait call.
3228 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3230 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3231 Replace lll_futex_wait with lll_private_futex_wait.
3232 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3233 Add LLL_SHARED parameter to lll_futex_wake().
3235 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3236 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3237 lll_private_futex_wake.
3238 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3239 bit from private parm before syscall.
3240 (lll_futex_timed_wait): Likewise.
3241 (lll_futex_wake): Likewise.
3242 (lll_futex_wake_unlock): Likewise.
3243 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3244 (lll_robust_mutex_unlock): Likewise.
3245 (lll_mutex_unlock_force): Likewise.
3246 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3248 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3250 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3251 compilation when unconditionally using private futexes.
3252 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3253 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3255 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3256 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3258 2007-07-17 Jakub Jelinek <jakub@redhat.com>
3260 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3263 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3265 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3268 2007-05-16 Roland McGrath <roland@redhat.com>
3270 * init.c (__nptl_initial_report_events): New variable.
3271 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3274 2007-06-22 Jakub Jelinek <jakub@redhat.com>
3276 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3277 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3279 2007-06-19 Ulrich Drepper <drepper@redhat.com>
3281 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3284 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3286 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3287 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3288 * pthread_mutex_timedlock.c: Likewise.
3289 * pthread_mutex_trylock.c: Likewise.
3290 * pthread_mutex_unlock.c: Likewise.
3292 2007-06-17 Andreas Schwab <schwab@suse.de>
3294 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3297 2007-06-17 Ulrich Drepper <drepper@redhat.com>
3299 * allocatestack.c (allocate_stack): Make code compile if
3300 __ASSUME_PRIVATE_FUTEX is set.
3302 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3304 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3305 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3306 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3307 (__pthread_rwlock_wrlock): Likewise.
3308 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3309 (pthread_rwlock_timedrdlock): Likewise.
3310 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3311 (pthread_rwlock_timedwrlock): Likewise.
3312 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3313 (__pthread_rwlock_unlock): Likewise.
3315 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3317 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3318 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3319 Split __flags into __flags, __shared, __pad1 and __pad2.
3320 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3321 futexes if they are available.
3322 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3323 in libc-lowlevellock.S allow using private futexes.
3324 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3325 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3326 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3327 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3328 lll_private_futex_timed_wait and lll_private_futex_wake.
3329 (lll_robust_mutex_unlock): Fix typo.
3330 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3331 field in futex command setup.
3332 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3333 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3334 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3335 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3336 if they are available. Remove clear_once_control.
3337 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3338 futexes if they are available.
3339 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3340 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3341 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3342 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3343 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3344 Wake only when there are waiters.
3345 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3346 support. Indicate that there are waiters. Remove unnecessary
3347 extra cancellation test.
3348 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3349 left-over duplication of __sem_wait_cleanup.
3351 2007-06-07 Ulrich Drepper <drepper@redhat.com>
3353 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3354 parameter to lll_futex_wait, lll_futex_timed_wait, and
3355 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3356 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3357 lll_private_futex_wake.
3358 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3359 * allocatestack.c: Adjust use of lll_futex_* macros.
3361 * lowlevellock.h: Likewise.
3362 * pthread_barrier_wait.c: Likewise.
3363 * pthread_cond_broadcast.c: Likewise.
3364 * pthread_cond_destroy.c: Likewise.
3365 * pthread_cond_signal.c: Likewise.
3366 * pthread_cond_timedwait.c: Likewise.
3367 * pthread_cond_wait.c: Likewise.
3368 * pthread_create.c: Likewise.
3369 * pthread_mutex_lock.c: Likewise.
3370 * pthread_mutex_setprioceiling.c: Likewise.
3371 * pthread_mutex_timedlock.c: Likewise.
3372 * pthread_mutex_unlock.c: Likewise.
3373 * pthread_rwlock_timedrdlock.c: Likewise.
3374 * pthread_rwlock_timedwrlock.c: Likewise.
3375 * pthread_rwlock_unlock.c: Likewise.
3376 * sysdeps/alpha/tls.h: Likewise.
3377 * sysdeps/i386/tls.h: Likewise.
3378 * sysdeps/ia64/tls.h: Likewise.
3379 * sysdeps/powerpc/tls.h: Likewise.
3380 * sysdeps/pthread/aio_misc.h: Likewise.
3381 * sysdeps/pthread/gai_misc.h: Likewise.
3382 * sysdeps/s390/tls.h: Likewise.
3383 * sysdeps/sh/tls.h: Likewise.
3384 * sysdeps/sparc/tls.h: Likewise.
3385 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3386 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3387 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3388 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3389 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3390 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3391 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3392 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3393 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3394 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3396 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3397 * sysdeps/x86_64/tls.h: Likewise.
3399 2007-05-29 Ulrich Drepper <drepper@redhat.com>
3401 * pthread_getattr_np.c: No need to install a cancellation handler,
3402 this is no cancellation point.
3403 * pthread_getschedparam.c: Likewise.
3404 * pthread_setschedparam.c: Likewise.
3405 * pthread_setschedprio.c: Likewise.
3406 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3408 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3409 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3410 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3411 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3412 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3413 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3414 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3415 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3416 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3417 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3418 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3419 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3421 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3422 whether there are more than one thread makes no sense here since
3423 we only call the slow path if the locks are taken.
3424 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3426 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3427 COND_NWAITERS_SHIFT.
3428 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3430 * pthread_cond_init.c: Likewise.
3431 * pthread_cond_timedwait.c: Likewise.
3432 * pthread_cond_wait.c: Likewise.
3433 * pthread_condattr_getclock.c: Likewise.
3434 * pthread_condattr_setclock.c: Likewise.
3435 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3436 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3437 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3438 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3439 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3441 2007-05-28 Jakub Jelinek <jakub@redhat.com>
3443 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3446 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3448 (THREAD_GSCOPE_GET_FLAG): Remove.
3449 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3450 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3452 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3453 (THREAD_GSCOPE_GET_FLAG): Remove.
3454 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3455 instead of THREAD_GSCOPE_GET_FLAG.
3456 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3458 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3459 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3460 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3461 THREAD_GSCOPE_WAIT): Define.
3462 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3463 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3464 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3465 THREAD_GSCOPE_WAIT): Define.
3466 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3467 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3468 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3469 THREAD_GSCOPE_WAIT): Define.
3470 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3471 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3472 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3473 THREAD_GSCOPE_WAIT): Define.
3475 2007-05-24 Richard Henderson <rth@redhat.com>
3477 * descr.h (struct pthread): Add header.gscope_flag.
3478 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3479 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3480 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3481 THREAD_GSCOPE_WAIT): Define.
3483 2007-05-27 Ulrich Drepper <drepper@redhat.com>
3485 * init.c: Make it compile with older kernel headers.
3487 * tst-initializers1.c: Show through exit code which test failed.
3489 * pthread_rwlock_init.c: Also initialize __shared field.
3490 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3491 element in rwlock structure into four byte elements. One of them is
3492 the new __shared element.
3493 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3495 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3496 __shared, adjust names of other padding elements.
3497 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3498 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3499 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3500 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3502 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3503 futex to use private operations if possible.
3504 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3506 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3508 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3509 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3510 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3511 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3513 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3515 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3516 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3518 2007-05-26 Ulrich Drepper <drepper@redhat.com>
3520 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3521 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3522 * pthread_rwlock_timedrdlock.c: Likewise.
3523 * pthread_rwlock_tryrdlock.c: Likewise.
3525 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3528 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3529 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3530 duplication of __sem_wait_cleanup.
3532 * allocatestack.c: Revert last change.
3534 * sysdeps/i386/tls.h: Likewise.
3535 * sysdeps/x86_64/tls.h: Likewise.
3536 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3538 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3540 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3542 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3543 * pthread_barrier_init.c: Set private flag if pshared and private
3544 futexes are supported.
3545 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3546 private field in futex command setup.
3547 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3549 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3551 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3553 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3554 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3555 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3556 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3557 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3559 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3560 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3561 fields in the structure.
3562 (__old_sem_init): New function.
3563 * sem_open.c: Initialize all fields of the structure.
3564 * sem_getvalue.c: Adjust for renamed element.
3565 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3566 (gen-as-const-headers): Add structsem.sym.
3567 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3568 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3569 struct new_sem. Add struct old_sem.
3570 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3571 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3572 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3573 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3574 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3575 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3576 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3577 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3578 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3579 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3580 * tst-sem10.c: New file.
3581 * tst-sem11.c: New file.
3582 * tst-sem12.c: New file.
3583 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3586 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3587 Jakub Jelinek <jakub@redhat.com>
3589 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3590 Move __pthread_enable_asynccancel right before futex syscall.
3591 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3594 2007-05-24 Jakub Jelinek <jakub@redhat.com>
3596 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3597 THREAD_COPY_PRIVATE_FUTEX): Define.
3598 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3599 THREAD_COPY_PRIVATE_FUTEX): Define.
3600 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3601 * init.c (__pthread_initialize_minimal_internal): Use
3602 THREAD_SET_PRIVATE_FUTEX.
3604 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3605 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3606 THREAD_GSCOPE_FLAG_WAIT): Define.
3607 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3608 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3609 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3611 (THREAD_GSCOPE_GET_FLAG): Define.
3612 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3613 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3614 instead of ->header.gscope_flag directly.
3616 2007-05-23 Ulrich Drepper <drepper@redhat.com>
3618 * init.c (__pthread_initialize_minimal_internal): Check whether
3619 private futexes are available.
3620 * allocatestack.c (allocate_stack): Copy private_futex field from
3621 current thread into the new stack.
3622 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3623 futexes if they are available.
3624 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3625 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3626 in libc-lowlevellock.S allow using private futexes.
3627 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3628 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3630 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3631 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3632 if they are available.
3633 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3634 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3635 * sysdeps/i386/tcb-offsets.sym: Likewise.
3636 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3637 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3639 2007-05-21 Ulrich Drepper <drepper@redhat.com>
3641 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3642 Remove ptr_wait_lookup_done again.
3643 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3644 (__pthread_initialize_minimal_internal): Initialize
3645 _dl_wait_lookup_done pointer in _rtld_global directly.
3646 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3647 Remove code to code _dl_wait_lookup_done.
3648 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3651 2007-05-21 Jakub Jelinek <jakub@redhat.com>
3653 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3654 pthread_mutex_init failed with ENOTSUP.
3656 2007-05-19 Ulrich Drepper <drepper@redhat.com>
3658 * allocatestack.c (__wait_lookup_done): New function.
3659 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3660 Add ptr_wait_lookup_done.
3661 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3662 * pthreadP.h: Declare __wait_lookup_done.
3663 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3664 Define macros to implement reference handling of global scope.
3665 * sysdeps/x86_64/tls.h: Likewise.
3666 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3667 Initialize GL(dl_wait_lookup_done).
3669 2007-05-17 Ulrich Drepper <drepper@redhat.com>
3672 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3674 * pthread_mutex_timedlock.c: Likewise.
3675 * pthread_mutex_trylock.c: Likewise.
3676 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3678 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3679 * tst-robust9.c: New file.
3680 * tst-robustpi9.c: New file.
3682 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3683 unnecessary extra cancellation test.
3685 2007-05-14 Ulrich Drepper <drepper@redhat.com>
3687 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3688 extra cancellation test.
3689 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3691 2007-05-10 Ulrich Drepper <drepper@redhat.com>
3693 * descr.h (struct pthread): Rearrange members to fill hole in
3696 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3697 (__pthread_setaffinity_new): If syscall was successful and
3698 RESET_VGETCPU_CACHE is defined, use it before returning.
3699 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3701 2007-05-10 Jakub Jelinek <jakub@redhat.com>
3704 * tst-align2.c: Include stackinfo.h.
3705 * tst-getpid1.c: Likewise.
3707 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
3710 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3711 * tst-getpid1.c (do_test): Likewise.
3714 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3715 (allocate_stack): Likewise.
3717 2007-05-07 Ulrich Drepper <drepper@redhat.com>
3719 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3720 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3721 (__lll_robust_timedlock_wait): Likewise.
3722 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3724 2007-05-06 Mike Frysinger <vapier@gentoo.org>
3727 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3728 * tst-cancel4.c (tf_fdatasync): New test.
3730 2007-04-27 Ulrich Drepper <drepper@redhat.com>
3733 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3734 check mutexes like normal mutexes.
3737 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3738 Initialize the whole sigevent structure to appease valgrind.
3740 2007-04-25 Ulrich Drepper <drepper@redhat.com>
3742 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3743 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3745 2007-04-06 Ulrich Drepper <drepper@redhat.com>
3747 * tst-locale1.c: Avoid warnings.
3748 * tst-locale2.c: Likewise.
3750 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3752 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3753 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3755 2007-03-16 Jakub Jelinek <jakub@redhat.com>
3757 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3758 __extern_always_inline where appropriate.
3759 * sysdeps/pthread/pthread.h: Likewise.
3761 2007-03-13 Richard Henderson <rth@redhat.com>
3763 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3764 separate cfi regions for the two subsections.
3766 2007-02-25 Ulrich Drepper <drepper@redhat.com>
3768 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3769 new thread, don't just decrement it.
3770 Patch by Suzuki K P <suzuki@in.ibm.com>.
3772 2007-02-21 Ulrich Drepper <drepper@redhat.com>
3774 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3775 PTHFCT_CALL definition.
3777 2007-02-18 Ulrich Drepper <drepper@redhat.com>
3779 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3780 available, don't use it.
3782 2007-02-09 Jakub Jelinek <jakub@redhat.com>
3784 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3785 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3786 call into the kernel to delay.
3788 2007-01-18 Ulrich Drepper <drepper@redhat.com>
3790 * tst-initializers1.c: We want to test the initializers as seen
3791 outside of libc, so undefined _LIBC.
3793 * pthread_join.c (cleanup): Avoid warning.
3795 2007-01-17 Ulrich Drepper <drepper@redhat.com>
3797 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3798 (__lll_timedwait_tid): Add unwind info.
3800 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3801 function table, mangle the pointers.
3802 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3803 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3804 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3805 demangle pointers before use.
3806 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3808 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3809 * sysdeps/pthread/setxid.h: Likewise.
3811 2007-01-12 Ulrich Drepper <drepper@redhat.com>
3813 * tst-rwlock7.c: Show some more information in case of correct
3816 2007-01-11 Ulrich Drepper <drepper@redhat.com>
3818 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3819 (lll_futex_timed_wait): Undo part of last change, don't negate
3822 2007-01-10 Ulrich Drepper <drepper@redhat.com>
3824 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
3825 FUTEX_CMP_REQUEUE and lll_futex_requeue.
3827 2006-12-28 David S. Miller <davem@davemloft.net>
3829 * shlib-versions: Fix sparc64 linux target specification.
3831 2007-01-10 Jakub Jelinek <jakub@redhat.com>
3833 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3834 Adjust include path for pthread_barrier_wait.c move.
3836 2006-12-21 Jakub Jelinek <jakub@redhat.com>
3838 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3839 tid isn't reread from pd->tid in between ESRCH test and the syscall.
3841 2006-12-06 Jakub Jelinek <jakub@redhat.com>
3843 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3844 6 argument cancellable syscalls.
3845 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3846 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3847 6 argument cancellable syscalls.
3848 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3850 2006-12-09 Ulrich Drepper <drepper@redhat.com>
3852 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3853 (__rtld_mrlock_initialize): Add missing closing parenthesis.
3855 2006-10-30 Jakub Jelinek <jakub@redhat.com>
3857 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3858 __sync_lock_release instead of __sync_lock_release_si.
3860 2006-10-29 Jakub Jelinek <jakub@redhat.com>
3862 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3864 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3865 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3866 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3867 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3868 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3869 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3870 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3871 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3872 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3873 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3874 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3876 2006-10-27 Ulrich Drepper <drepper@redhat.com>
3878 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3879 * pthread_barrier_wait.c: ...here.
3880 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3881 * pthread_cond_broadcast.c: ...here.
3882 * sysdeps/pthread/pthread_cond_signal.c: Move to...
3883 * pthread_cond_signal.c: ...here.
3884 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3885 * pthread_cond_timedwait.c: ...here.
3886 * sysdeps/pthread/pthread_cond_wait.c: Move to...
3887 * pthread_cond_wait.c: ...here.
3888 * sysdeps/pthread/pthread_once.c: Move to...
3889 * pthread_once.c: ...here.
3890 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3891 * pthread_rwlock_rdlock.c: ...here.
3892 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3893 * pthread_rwlock_timedrdlock.c: ...here.
3894 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3895 * pthread_rwlock_timedwrlock.c: ...here.
3896 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3897 * pthread_rwlock_unlock.c: ...here.
3898 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3899 * pthread_rwlock_wrlock.c: ...here.
3900 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3901 * pthread_spin_destroy.c: ...here.
3902 * sysdeps/pthread/pthread_spin_init.c: Move to...
3903 * pthread_spin_init.c: ...here.
3904 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3905 * pthread_spin_unlock.c: ...here.
3906 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3907 * pthread_getcpuclockid.c: ...here.
3909 * init.c: USE_TLS support is now always enabled.
3910 * tst-tls5.h: Likewise.
3911 * sysdeps/alpha/tls.h: Likewise.
3912 * sysdeps/i386/tls.h: Likewise.
3913 * sysdeps/ia64/tls.h: Likewise.
3914 * sysdeps/powerpc/tls.h: Likewise.
3915 * sysdeps/s390/tls.h: Likewise.
3916 * sysdeps/sh/tls.h: Likewise.
3917 * sysdeps/sparc/tls.h: Likewise.
3918 * sysdeps/x86_64/tls.h: Likewise.
3920 2006-10-27 Jakub Jelinek <jakub@redhat.com>
3922 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3923 __rtld_mrlock_change): Update oldval if atomic compare and exchange
3926 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3927 Define to THREAD_SELF->header.multiple_threads.
3928 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3930 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3932 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3933 (SINGLE_THREAD_P): Likewise.
3934 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3935 (SINGLE_THREAD_P): Likewise.
3936 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3937 (SINGLE_THREAD_P): Likewise.
3938 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3939 (SINGLE_THREAD_P): Likewise.
3940 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3942 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3943 (SINGLE_THREAD_P): Likewise.
3944 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3945 (SINGLE_THREAD_P): Likewise.
3946 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3949 2006-10-26 Jakub Jelinek <jakub@redhat.com>
3951 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3952 by default rather than 2_3_3.
3954 2006-10-17 Jakub Jelinek <jakub@redhat.com>
3956 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3957 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3958 atomic_* instead of catomic_* macros.
3960 2006-10-12 Ulrich Drepper <drepper@redhat.com>
3963 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3964 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3965 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3966 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3967 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3968 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3969 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3970 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3971 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3972 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3973 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3974 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3975 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3977 2006-10-11 Ulrich Drepper <drepper@redhat.com>
3979 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3980 cancelable syscalls with six parameters.
3982 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3983 operations instead of atomic_*.
3985 2006-10-09 Ulrich Drepper <drepper@redhat.com>
3987 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
3989 2006-10-07 Ulrich Drepper <drepper@redhat.com>
3991 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3992 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3993 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3995 * pthread_attr_setstack.c: Allow overwriting the version number of the
3997 * pthread_attr_setstacksize.c: Likewise.
3998 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4000 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4001 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4003 2006-09-24 Ulrich Drepper <drepper@redhat.com>
4006 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4007 Patch by Petr Baudis.
4009 2006-09-18 Jakub Jelinek <jakub@redhat.com>
4011 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4013 * tst-cancel2.c (tf): Loop as long as something was written.
4015 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4017 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4018 mutexes wake all mutexes.
4019 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4020 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4021 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4023 2006-09-12 Ulrich Drepper <drepper@redhat.com>
4025 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4026 to guarantee the thread is always canceled.
4028 2006-09-08 Jakub Jelinek <jakub@redhat.com>
4030 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4032 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4033 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4034 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4035 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4036 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4038 2006-09-08 Ulrich Drepper <drepper@redhat.com>
4041 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4042 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4043 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4044 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4045 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4046 * Makefile (tests): Add tst-cond22.
4047 * tst-cond22.c: New file.
4049 2006-09-05 Ulrich Drepper <drepper@redhat.com>
4052 * descr.h (struct pthread): Add parent_cancelhandling.
4053 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4054 cancelhandling value to child.
4055 * pthread_create.c (start_thread): If parent thread was canceled
4056 reset the SIGCANCEL mask.
4057 * Makefile (tests): Add tst-cancel25.
4058 * tst-cancel25.c: New file.
4060 2006-09-05 Jakub Jelinek <jakub@redhat.com>
4061 Ulrich Drepper <drepper@redhat.com>
4063 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4064 counterp if it is already zero.
4065 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4067 2006-03-04 Jakub Jelinek <jakub@redhat.com>
4068 Roland McGrath <roland@redhat.com>
4070 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4071 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4072 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4073 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4074 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4075 lll_robust_mutex_timedlock, lll_mutex_unlock,
4076 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4077 Add _L_*_ symbols around the subsection.
4078 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4079 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4081 2006-03-03 Jakub Jelinek <jakub@redhat.com>
4082 Roland McGrath <roland@redhat.com>
4084 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4085 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4086 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4087 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4088 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4089 lll_robust_mutex_timedlock, lll_mutex_unlock,
4090 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4091 Add _L_*_ symbols around the subsection.
4092 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4093 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4095 2006-08-31 Ulrich Drepper <drepper@redhat.com>
4097 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4098 change because it can disturb too much existing code. If real hard
4099 reader preference is needed we'll introduce another type.
4100 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4101 (pthread_rwlock_timedwrlock): Likewise.
4102 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4105 2006-08-30 Ulrich Drepper <drepper@redhat.com>
4107 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4109 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4110 (pthread_rwlock_timedwrlock): Likewise.
4111 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4114 2006-08-25 Jakub Jelinek <jakub@redhat.com>
4116 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4117 Only define ifdef SHARED.
4119 2006-08-23 Ulrich Drepper <drepper@redhat.com>
4121 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4122 (free_stacks): ...here.
4123 (__free_stack_cache): New function.
4124 * pthreadP.h: Declare __free_stack_cache.
4125 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4127 * init.c (pthread_functions): Initialize ptr_freeres.
4128 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4129 New freeres function.
4131 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4134 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4136 2006-08-20 Ulrich Drepper <drepper@redhat.com>
4138 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4139 _XOPEN_REALTIME_THREADS.
4141 2006-08-15 Jakub Jelinek <jakub@redhat.com>
4143 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4144 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4145 HAVE_CLOCK_GETTIME_VSYSCALL.
4146 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4148 2006-08-14 Jakub Jelinek <jakub@redhat.com>
4150 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4151 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4152 * descr.h (struct priority_protection_data): New type.
4153 (struct pthread): Add tpp field.
4154 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4155 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4156 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4157 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4159 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4160 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4161 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4162 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4164 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4166 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4167 * pthread_mutexattr_getprioceiling.c
4168 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4169 in the SCHED_FIFO priority range.
4170 * pthread_mutexattr_setprioceiling.c
4171 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4172 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4173 if mutex is not TPP. Ceiling is now in __data.__lock.
4174 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4175 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4176 is now in __data.__lock. Add locking.
4177 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4178 * Makefile (libpthread-routines): Add tpp.
4179 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4180 * tst-tpp.h: New file.
4181 * tst-mutexpp1.c: New file.
4182 * tst-mutexpp6.c: New file.
4183 * tst-mutexpp10.c: New file.
4184 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4185 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4187 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4190 * pthread_join.c (pthread_join): Account for self being canceled
4191 when checking for deadlocks.
4192 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4193 (tf1): Don't print anything after pthread_join returns, this would be
4194 another cancellation point.
4196 * tst-join6.c: New file.
4197 * Makefile (tests): Add tst-join6.
4199 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4202 * pthread_setspecific.c (__pthread_setspecific): Check
4203 out-of-range index before checking for unused key.
4205 * sysdeps/pthread/gai_misc.h: New file.
4207 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4209 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4210 file. Don't use sysctl.
4211 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4212 overwrite the file if this is likely not true.
4214 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4216 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4217 * Makefile (tests): Add tst-getpid3.
4218 * tst-getpid3.c: New file.
4220 2006-07-30 Roland McGrath <roland@redhat.com>
4222 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4224 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4225 (pause_not_cancel): New macro.
4226 (nanosleep_not_cancel): New macro.
4227 (sigsuspend_not_cancel): New macro.
4228 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4229 nanosleep_not_cancel macro from <not-cancel.h>.
4230 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4231 macro from <not-cancel.h>.
4233 2006-07-28 Ulrich Drepper <drepper@redhat.com>
4234 Jakub Jelinek <jakub@redhat.com>
4236 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4237 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4238 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4239 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4240 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4241 * pthread_mutex_lock.c: Likewise.
4242 * pthread_mutex_timedlock.c: Likewise.
4243 * pthread_mutex_trylock.c: Likewise.
4244 * pthread_mutex_unlock.c: Likewise.
4245 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4247 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4248 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4249 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4250 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4251 pthread-pi-defines.sym.
4252 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4253 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4254 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4255 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4256 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4257 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4258 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4259 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4260 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4261 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4262 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4263 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4264 * tst-mutex2.c: Likewise.
4265 * tst-mutex3.c: Likewise.
4266 * tst-mutex4.c: Likewise.
4267 * tst-mutex5.c: Likewise.
4268 * tst-mutex6.c: Likewise.
4269 * tst-mutex7.c: Likewise.
4270 * tst-mutex7a.c: Likewise.
4271 * tst-mutex8.c: Likewise.
4272 * tst-mutex9.c: Likewise.
4273 * tst-robust1.c: Likewise.
4274 * tst-robust7.c: Likewise.
4275 * tst-robust8.c: Likewise.
4276 * tst-mutexpi1.c: New file.
4277 * tst-mutexpi2.c: New file.
4278 * tst-mutexpi3.c: New file.
4279 * tst-mutexpi4.c: New file.
4280 * tst-mutexpi5.c: New file.
4281 * tst-mutexpi6.c: New file.
4282 * tst-mutexpi7.c: New file.
4283 * tst-mutexpi7a.c: New file.
4284 * tst-mutexpi8.c: New file.
4285 * tst-mutexpi9.c: New file.
4286 * tst-robust1.c: New file.
4287 * tst-robust2.c: New file.
4288 * tst-robust3.c: New file.
4289 * tst-robust4.c: New file.
4290 * tst-robust5.c: New file.
4291 * tst-robust6.c: New file.
4292 * tst-robust7.c: New file.
4293 * tst-robust8.c: New file.
4294 * Makefile (tests): Add the new tests.
4296 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4297 * pthread_mutex_destroy.c: Remove unneeded label.
4299 2006-07-01 Ulrich Drepper <drepper@redhat.com>
4301 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4302 computations to compile time.
4304 2006-06-04 Ulrich Drepper <drepper@redhat.com>
4306 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4308 2006-05-15 Ulrich Drepper <drepper@redhat.com>
4310 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4312 2006-05-11 Ulrich Drepper <drepper@redhat.com>
4314 * pthread_key_create.c (__pthread_key_create): Do away with
4315 __pthread_keys_lock.
4317 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4318 (__kernel_cpumask_size): Mark as hidden.
4319 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4321 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4322 * semaphoreP.h (__sem_mappings_lock): Likewise.
4324 2006-05-10 Ulrich Drepper <drepper@redhat.com>
4326 * pthread_atfork.c: Mark __dso_handle as hidden.
4328 2006-05-09 Ulrich Drepper <drepper@redhat.com>
4331 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4332 the reload problem. Change the one path in pthread_cancel_init
4333 which causes the problem. Force gcc to reload. Simplify callers.
4334 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4335 (_Unwind_GetBSP): Undo last patch.
4337 2006-05-07 Ulrich Drepper <drepper@redhat.com>
4339 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4340 function pointer is reloaded after pthread_cancel_init calls.
4343 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4344 pointers are reloaded after pthread_cancel_init calls.
4346 2006-05-01 Ulrich Drepper <drepper@redhat.com>
4348 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4351 2006-04-27 Ulrich Drepper <drepper@redhat.com>
4353 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4354 Allocate new object which is passed to timer_sigev_thread so that
4355 the timer can be deleted before the new thread is scheduled.
4357 2006-04-26 Roland McGrath <roland@redhat.com>
4359 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4361 2006-04-08 Ulrich Drepper <drepper@redhat.com>
4363 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4364 suffix for conditional jumps.
4365 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4366 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4367 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4368 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4369 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4370 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4372 * init.c (sigcancel_handler): Compare with correct PID even if the
4373 thread is in the middle of a fork call.
4374 (sighandler_setxid): Likewise.
4375 Reported by Suzuki K P <suzuki@in.ibm.com> .
4377 2006-04-07 Jakub Jelinek <jakub@redhat.com>
4379 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4381 2006-04-06 Ulrich Drepper <drepper@redhat.com>
4383 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4384 fails [Coverity CID 105].
4386 2006-04-05 Ulrich Drepper <drepper@redhat.com>
4388 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4390 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4393 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4394 Define __lll_rel_instr using lwsync.
4396 2006-03-27 Ulrich Drepper <drepper@redhat.com>
4398 * allocatestack.c (allocate_stack): Always initialize robust_head.
4399 * descr.h: Define struct robust_list_head.
4400 (struct pthread): Use robust_list_head in robust mutex list definition.
4401 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4402 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4403 (__pthread_initialize_minimal_internal): Register robust_list with
4405 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4406 Declare __set_robust_list_avail.
4407 * pthread_create.c (start_thread): Register robust_list of new thread.
4408 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4410 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4411 number of users, it's unreliable.
4412 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4413 set_robust_list syscall is available.
4414 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4415 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4416 Set robust_head.list_op_pending before trying to lock a robust mutex.
4417 * pthread_mutex_timedlock.c: Likewise.
4418 * pthread_mutex_trylock.c: Likewise.
4419 * pthread_mutex_unlock.c: Likewise for unlocking.
4420 * Makefile (tests): Add tst-robust8.
4421 * tst-robust8.c: New file.
4423 2006-03-08 Andreas Schwab <schwab@suse.de>
4425 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4426 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4428 2006-03-05 Roland McGrath <roland@redhat.com>
4430 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4431 and $config_os doesn't match *linux*.
4433 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
4435 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4436 Use __syscall_error.
4437 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4438 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4439 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4440 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4441 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4442 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4444 2006-03-02 Ulrich Drepper <drepper@redhat.com>
4446 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4448 2006-03-01 Ulrich Drepper <drepper@redhat.com>
4450 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4451 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4453 (__lll_robust_timedlock_wait): Likewise.
4454 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4455 (__lll_robust_lock_wait): Likewise.
4456 (__lll_robust_timedlock_wait): Likewise.
4457 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4458 (__lll_robust_lock_wait): Likewise.
4459 (__lll_robust_timedlock_wait): Likewise.
4461 2006-03-01 Jakub Jelinek <jakub@redhat.com>
4463 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4464 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4465 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4466 lll_robust_mutex_unlock): Define.
4467 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4469 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4471 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4472 instead of <clone.S>.
4474 2006-02-27 Jakub Jelinek <jakub@redhat.com>
4476 * Makefile (libpthread-routines): Add
4477 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4478 and pthread_mutex_[sg]etprioceiling.
4479 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4480 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4481 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4482 pthread_mutex_setprioceiling.
4483 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4484 PTHREAD_PRIO_PROTECT): New enum values.
4485 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4486 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4487 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4489 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4490 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4491 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4493 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4494 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4495 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4496 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4497 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4498 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4499 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4501 * pthread_mutex_getprioceiling.c: New file.
4502 * pthread_mutex_setprioceiling.c: New file.
4503 * pthread_mutexattr_getprioceiling.c: New file.
4504 * pthread_mutexattr_setprioceiling.c: New file.
4505 * pthread_mutexattr_getprotocol.c: New file.
4506 * pthread_mutexattr_setprotocol.c: New file.
4508 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4510 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4512 2006-02-27 Roland McGrath <roland@redhat.com>
4514 * sysdeps/pthread/Subdirs: List nptl here too.
4515 * configure (libc_add_on_canonical): New variable.
4517 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4519 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4520 self to get main source tree's file.
4521 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4522 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4523 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4524 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4525 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4526 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4527 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4528 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4529 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4530 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4531 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4532 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4533 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4535 * Makefile: Use $(sysdirs) in vpath directive.
4537 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4538 (CPPFLAGS-timer_routines.c): Likewise.
4540 * Makeconfig (includes): Variable removed.
4542 2006-02-26 Roland McGrath <roland@redhat.com>
4544 * sysdeps/generic/pt-raise.c: Moved to ...
4545 * pt-raise.c: ... here.
4546 * sysdeps/generic/lowlevellock.h: Moved to ...
4547 * lowlevellock.h: ... here.
4549 2006-02-23 Roland McGrath <roland@redhat.com>
4551 * descr.h (struct pthread): Add final member `end_padding'.
4552 (PTHREAD_STRUCT_END_PADDING): Use it.
4554 2006-02-20 Roland McGrath <roland@redhat.com>
4556 * sysdeps/mips: Directory removed, saved in ports repository.
4557 * sysdeps/unix/sysv/linux/mips: Likewise.
4559 2006-02-18 Ulrich Drepper <drepper@redhat.com>
4561 * tst-robust1.c: Add second mutex to check that the mutex list is
4564 2006-02-17 Jakub Jelinek <jakub@redhat.com>
4566 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4567 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4568 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4569 lll_robust_mutex_unlock): New macros.
4570 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4571 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4572 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4573 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4574 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4576 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4578 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4580 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4582 2006-02-17 Ulrich Drepper <drepper@redhat.com>
4584 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4585 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4586 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4587 (lll_robust_mutex_unlock): Likewise.
4589 2006-02-13 Jakub Jelinek <jakub@redhat.com>
4591 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4592 Set robust_list.__next rather than robust_list.
4593 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4594 (__pthread_list_t): New typedef.
4595 (pthread_mutex_t): Replace __next and __prev fields with __list.
4596 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4597 (__pthread_list_t): New typedef.
4598 (pthread_mutex_t): Replace __next and __prev fields with __list.
4599 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4600 (__pthread_list_t, __pthread_slist_t): New typedefs.
4601 (pthread_mutex_t): Replace __next and __prev fields with __list.
4602 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4603 (__pthread_list_t, __pthread_slist_t): New typedefs.
4604 (pthread_mutex_t): Replace __next and __prev fields with __list.
4605 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4606 (__pthread_list_t, __pthread_slist_t): New typedefs.
4607 (pthread_mutex_t): Replace __next and __prev fields with __list.
4608 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4609 (__pthread_slist_t): New typedef.
4610 (pthread_mutex_t): Replace __next field with __list.
4612 2006-02-15 Ulrich Drepper <drepper@redhat.com>
4614 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4615 PTHREAD_MUTEX_OWNERDEAD.
4616 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4617 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4618 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4619 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4620 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4621 to PTHREAD_MUTEX_INCONSISTENT.
4622 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4623 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4624 * pthread_mutex_trylock.c: Likewise.
4625 * pthread_mutex_timedlock.c: Likewise.
4626 * pthread_mutex_unlock.c: Likewise.
4627 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4628 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4629 lowlevelrobustlock.sym.
4630 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4631 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4633 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4634 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4635 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4636 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4637 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4639 2006-02-12 Ulrich Drepper <drepper@redhat.com>
4641 * allocatestack.c (allocate_stack): Initialize robust_list.
4642 * init.c (__pthread_initialize_minimal_internal): Likewise.
4643 * descr.h (struct xid_command): Pretty printing.
4644 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4645 robust_list. Adjust macros.
4646 * pthread_create.c (start_thread): Adjust robust_list handling.
4647 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4648 but the owner for all robust mutex types.
4649 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4650 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
4651 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4652 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4654 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4655 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4657 2006-02-08 Jakub Jelinek <jakub@redhat.com>
4659 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4660 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4662 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4664 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4666 (lll_futex_timed_wait): Define.
4668 2006-01-19 Ulrich Drepper <drepper@redhat.com>
4670 * tst-cancel4.c: Test ppoll.
4672 2006-01-18 Andreas Jaeger <aj@suse.de>
4675 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4676 (pthread_mutex_t): Follow changes for other archs. Based on patch
4677 by Jim Gifford <patches@jg555.com>.
4679 2006-01-13 Richard Henderson <rth@redhat.com>
4681 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4683 2006-01-10 Roland McGrath <roland@redhat.com>
4685 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4686 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4687 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4688 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4689 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4690 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4691 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4692 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4693 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4694 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4696 2006-01-09 Roland McGrath <roland@redhat.com>
4698 * tst-initializers1-c89.c: New file.
4699 * tst-initializers1-c99.c: New file.
4700 * tst-initializers1-gnu89.c: New file.
4701 * tst-initializers1-gnu99.c: New file.
4702 * Makefile (tests): Add them.
4703 (CFLAGS-tst-initializers1-c89.c): New variable.
4704 (CFLAGS-tst-initializers1-c99.c): New variable.
4705 (CFLAGS-tst-initializers1-gnu89.c): New variable.
4706 (CFLAGS-tst-initializers1-gnu99.c): New variable.
4708 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4709 Use __extension__ on anonymous union definition.
4710 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4711 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4712 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4713 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4714 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4716 2006-01-08 Jakub Jelinek <jakub@redhat.com>
4718 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4719 Don't give the union a name because it changes the mangled name.
4720 Instead name the struct for __data.
4721 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4723 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4726 2006-01-09 Jakub Jelinek <jakub@redhat.com>
4728 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4729 stack bias to mc_ftp field.
4731 2006-01-07 Ulrich Drepper <drepper@redhat.com>
4733 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4734 being too clever and reloading the futex value where it shouldn't.
4736 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4738 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4741 2006-01-06 Jakub Jelinek <jakub@redhat.com>
4743 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4746 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4748 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4749 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4750 rename in tcbhead_t.
4752 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4753 Don't give the union a name because it changes the mangled name.
4754 Instead name the struct for __data.
4755 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4756 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4757 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4758 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4759 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4760 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4762 2006-01-05 Ulrich Drepper <drepper@redhat.com>
4764 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4766 (lll_futex_timed_wait): Define.
4767 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4768 * sysdeps/pthread/aio_misc.h: New file.
4770 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4772 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4774 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4776 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4777 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4778 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4780 2006-01-04 Ulrich Drepper <drepper@redhat.com>
4782 * tst-cancel24.cc: Use C headers instead of C++ headers.
4784 2006-01-03 Jakub Jelinek <jakub@redhat.com>
4786 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4787 sparc-linux configured glibc.
4788 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4789 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4790 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4791 atomic_compare_and_exchange_val_24_acq instead of
4792 atomic_compare_and_exchange_val_acq.
4793 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4794 instead of atomic_exchange_rel.
4795 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4796 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4798 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4800 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4801 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4802 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4803 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4804 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4805 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4807 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4809 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4810 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4811 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4813 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4815 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4817 2006-01-03 Ulrich Drepper <drepper@redhat.com>
4819 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4822 2006-01-02 Jakub Jelinek <jakub@redhat.com>
4824 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4825 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4826 THREAD_COPY_POINTER_GUARD): Define.
4827 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4828 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4830 2006-01-01 Ulrich Drepper <drepper@redhat.com>
4832 * version.c: Update copyright year.
4834 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4836 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4837 .eh_frame section, use cfi_* directives.
4838 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4840 2005-12-30 Ulrich Drepper <drepper@redhat.com>
4842 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4845 2005-12-29 Ulrich Drepper <drepper@redhat.com>
4847 * sysdeps/pthread/sigaction.c: Removed.
4848 * sigaction.c: New file.
4849 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4851 2005-12-28 Ulrich Drepper <drepper@redhat.com>
4853 * Makefile (tests): Add tst-signal7.
4854 * tst-signal7.c: New file.
4856 2005-12-27 Roland McGrath <roland@redhat.com>
4858 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4859 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4860 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4861 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4862 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4863 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4864 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4865 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4866 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4867 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4868 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4870 2005-12-27 Jakub Jelinek <jakub@redhat.com>
4872 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4873 and __prev field to pthread_mutex_t.
4874 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4875 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4876 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4877 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4878 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4881 2005-12-26 Ulrich Drepper <drepper@redhat.com>
4883 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4884 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4885 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4886 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4887 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4888 and PTHREAD_MUTEXATTR_FLAG_BITS.
4889 * descr.h (struct pthread): Add robust_list field and define
4890 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4891 * pthread_mutexattr_getrobust.c: New file.
4892 * pthread_mutexattr_setrobust.c: New file.
4893 * pthread_mutex_consistent.c: New file.
4894 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4895 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4896 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4897 Adjust pthread_mutex_t initializers.
4898 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4899 field to pthread_mutex_t.
4900 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4901 and __prev field to pthread_mutex_t.
4902 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4903 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4904 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4905 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4906 * pthread_mutexattr_gettype.c: Likewise.
4907 * pthread_mutexattr_setpshared.c: Likewise.
4908 * pthread_mutexattr_settype.c: Likewise.
4909 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4910 Initialize mutex kind according to robust flag.
4911 * pthread_mutex_lock.c: Implement local robust mutex.
4912 * pthread_mutex_timedlock.c: Likewise.
4913 * pthread_mutex_trylock.c: Likewise.
4914 * pthread_mutex_unlock.c: Likewise.
4915 * pthread_create.c (start_thread): Mark robust mutexes which remained
4917 * tst-robust1.c: New file.
4918 * tst-robust2.c: New file.
4919 * tst-robust3.c: New file.
4920 * tst-robust4.c: New file.
4921 * tst-robust5.c: New file.
4922 * tst-robust6.c: New file.
4923 * tst-robust7.c: New file.
4924 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4925 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4926 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4927 tst-robust5, tst-robust6, and tst-robust7.
4929 * tst-typesizes.c: New file.
4930 * Makefile (tests): Add tst-typesizes.
4932 * tst-once3.c: More debug output.
4934 2005-12-24 Ulrich Drepper <drepper@redhat.com>
4936 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4937 missing after last change.
4939 * version.c: Update copyright year.
4941 2005-12-23 Ulrich Drepper <drepper@redhat.com>
4943 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4944 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4945 * pthread_mutex_trylock.c: Likewise.
4946 * pthread_mutex_timedlock.c: Likewise.
4947 * pthread_mutex_unlock.c: Likewise.
4949 2005-12-22 Roland McGrath <roland@redhat.com>
4951 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4952 so that #include_next's search location is not reset to the -I..
4953 directory where <nptl/...> can be found.
4955 2005-12-22 Ulrich Drepper <drepper@redhat.com>
4958 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4959 Fix unwind info. Remove useless branch prediction prefix.
4960 * tst-cancel24.cc: New file.
4961 * Makefile: Add rules to build and run tst-cancel24.
4963 2005-12-21 Roland McGrath <roland@redhat.com>
4965 * libc-cancellation.c: Use <> rather than "" #includes.
4966 * pt-cleanup.c: Likewise.
4967 * pthread_create.c: Likewise.
4968 * pthread_join.c: Likewise.
4969 * pthread_timedjoin.c: Likewise.
4970 * pthread_tryjoin.c: Likewise.
4971 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4972 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4973 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4974 * unwind.c: Likewise.
4976 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4978 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4979 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4980 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4981 THREAD_COPY_POINTER_GUARD): Define.
4983 2005-12-19 Jakub Jelinek <jakub@redhat.com>
4985 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4987 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4988 THREAD_COPY_POINTER_GUARD): Define.
4989 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4990 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4991 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4992 THREAD_COPY_POINTER_GUARD): Define.
4993 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4994 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4995 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4996 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4997 Use PTR_DEMANGLE for B0 if defined.
4999 2005-12-17 Ulrich Drepper <drepper@redhat.com>
5001 * pthread_create.c (__pthread_create_2_1): Use
5002 THREAD_COPY_POINTER_GUARD if available.
5003 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5004 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5005 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5006 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5007 * sysdeps/x86_64/tls.h: Likewise.
5009 2005-12-15 Roland McGrath <roland@redhat.com>
5011 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5013 2005-12-13 Ulrich Drepper <drepper@redhat.com>
5015 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5017 * errno-loc.c: New file.
5019 2005-12-12 Roland McGrath <roland@redhat.com>
5021 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5022 adjustments before choosing stack size. Update minimum stack size
5023 calculation to match allocate_stack change.
5025 2005-12-12 Ulrich Drepper <drepper@redhat.com>
5027 * allocatestack.c (allocate_stack): Don't demand that there is an
5028 additional full page available on the stack beside guard, TLS, the
5031 2005-11-24 Ulrich Drepper <drepper@redhat.com>
5033 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5034 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5036 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5037 compiling 32-bit code we must define __cleanup_fct_attribute.
5039 005-11-24 Jakub Jelinek <jakub@redhat.com>
5042 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5043 __attribute__ instead of __attribute.
5044 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5045 (__cleanup_fct_attribute): Likewise.
5047 2005-11-17 Jakub Jelinek <jakub@redhat.com>
5049 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5050 a write barrier before writing libgcc_s_getcfa.
5052 2005-11-06 Ulrich Drepper <drepper@redhat.com>
5054 * sysdeps/unix/sysv/linux/configure: Removed.
5056 2005-11-05 Ulrich Drepper <drepper@redhat.com>
5058 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5059 optional init_array/fini_array support.
5061 2005-10-24 Roland McGrath <roland@redhat.com>
5063 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5064 versioned_symbol use.
5066 2005-10-16 Roland McGrath <roland@redhat.com>
5068 * init.c (__pthread_initialize_minimal_internal): Even when using a
5069 compile-time default stack size, apply the minimum that allocate_stack
5070 will require, and round up to page size.
5072 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5074 * Makefile ($(test-modules)): Remove static pattern rule.
5076 2005-10-14 Jakub Jelinek <jakub@redhat.com>
5077 Ulrich Drepper <drepper@redhat.com>
5079 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5080 alignment in callback function.
5081 * Makefile: Add rules to build and run tst-align3.
5082 * tst-align3.c: New file.
5084 2005-10-03 Jakub Jelinek <jakub@redhat.com>
5086 * allocatestack.c (setxid_signal_thread): Add
5087 INTERNAL_SYSCALL_DECL (err).
5089 2005-10-02 Jakub Jelinek <jakub@redhat.com>
5091 * allocatestack.c (setxid_signal_thread): Need to use
5092 atomic_compare_and_exchange_bool_acq.
5094 2005-10-01 Ulrich Drepper <drepper@redhat.com>
5095 Jakub Jelinek <jakub@redhat.com>
5097 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5099 (struct pthread): Move specific_used field to avoid padding.
5100 Add setxid_futex field.
5101 * init.c (sighandler_setxid): Reset setxid flag and release the
5103 * allocatestack.c (setxid_signal_thread): New function. Broken
5104 out of the bodies of the two loops in __nptl_setxid. For undetached
5105 threads check whether they are exiting and if yes, don't send a signal.
5106 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5107 * pthread_create.c (start_thread): For undetached threads, check
5108 whether setxid bit is set. If yes, wait until signal has been
5111 * allocatestack.c (STACK_VARIABLES): Initialize them.
5112 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5114 2004-09-02 Jakub Jelinek <jakub@redhat.com>
5116 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5117 waiters, awake all waiters on the associated mutex.
5119 2005-09-22 Roland McGrath <roland@redhat.com>
5121 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5122 ../sysdeps/x86_64/hp-timing.h).
5124 2005-08-29 Jakub Jelinek <jakub@redhat.com>
5126 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5127 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5128 (lll_futex_wake_unlock): Define.
5129 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5130 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5131 (lll_futex_wake_unlock): Define.
5132 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5133 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5134 (lll_futex_wake_unlock): Define.
5135 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5136 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5137 (lll_futex_wake_unlock): Define.
5138 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5139 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5140 (lll_futex_wake_unlock): Define.
5141 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5142 lll_futex_wake_unlock.
5143 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5144 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5145 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5146 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5147 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5148 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5150 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5152 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5153 Fix typo in register name.
5155 2005-08-23 Ulrich Drepper <drepper@redhat.com>
5157 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5158 Use __sigfillset. Document that sigfillset does the right thing wrt
5161 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5164 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5165 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5166 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5167 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5168 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5169 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5171 * Makefile (tests): Add tst-initializers1.
5172 (CFLAGS-tst-initializers1.c): Set.
5173 * tst-initializers1.c: New test.
5175 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5177 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5178 Make sure __flags are located at offset 48 from the start of the
5181 2005-07-02 Roland McGrath <roland@redhat.com>
5183 * Makeconfig: Comment fix.
5185 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5187 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5188 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5189 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5190 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5191 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5192 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5193 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5194 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5195 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5196 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5198 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5200 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5201 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5202 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5204 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5205 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5206 field. Put in sysinfo field unconditionally.
5207 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5208 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5209 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5210 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5212 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5213 * pthread_create.c (__pthread_create_2_1): Use
5214 THREAD_COPY_STACK_GUARD macro.
5215 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5217 * tst-stackguard1.c: New file.
5218 * tst-stackguard1-static.c: New file.
5220 2005-06-14 Alan Modra <amodra@bigpond.net.au>
5222 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5223 Invoke CGOTSETUP and CGOTRESTORE.
5224 (CGOTSETUP, CGOTRESTORE): Define.
5226 2005-05-29 Richard Henderson <rth@redhat.com>
5228 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5229 (tf_write, tf_writev): Use it.
5230 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5233 2005-05-23 Jakub Jelinek <jakub@redhat.com>
5235 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5236 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5237 __librt_*_asynccancel@local.
5239 2005-05-17 Alan Modra <amodra@bigpond.net.au>
5241 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5242 all occurrences of JUMPTARGET. Instead append @local to labels.
5244 2005-05-20 Jakub Jelinek <jakub@redhat.com>
5246 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5247 size/alignment of struct pthread rather than tcbhead_t.
5248 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5250 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5252 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5255 2005-05-19 Richard Henderson <rth@redhat.com>
5257 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5258 __sync_val_compare_and_swap, not explicit _si variant.
5259 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5261 2005-05-03 Ulrich Drepper <drepper@redhat.com>
5264 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5266 2005-05-03 Jakub Jelinek <jakub@redhat.com>
5268 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5269 .eh_frame section, use cfi_* directives.
5271 2005-04-27 Jakub Jelinek <jakub@redhat.com>
5273 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5276 2005-04-27 Ulrich Drepper <drepper@redhat.com>
5279 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5282 2005-04-27 Roland McGrath <roland@redhat.com>
5284 * Makefile (tests): Remove tst-clock2.
5286 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5287 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5288 translating to the kernel clockid_t for our own process/thread clock.
5290 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5292 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5294 * old_pthread_cond_init.c: Include <errno.h>.
5295 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5296 process shared or uses clock other than CLOCK_REALTIME.
5297 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5299 2005-04-13 David S. Miller <davem@davemloft.net>
5301 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5302 * sysdeps/sparc/sparc64/clone.S: New file.
5304 2005-04-05 Jakub Jelinek <jakub@redhat.com>
5307 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5308 __inline instead of inline.
5309 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5311 2005-03-31 Jakub Jelinek <jakub@redhat.com>
5313 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5314 functionally equivalent, but shorter instructions.
5315 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5316 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5317 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5319 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5320 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5321 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5322 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5323 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5324 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5325 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5327 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5328 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5329 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5330 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5331 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5333 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5335 * sysdeps/mips/Makefile: New file.
5336 * sysdeps/mips/nptl-sysdep.S: New file.
5337 * sysdeps/mips/tcb-offsets.sym: New file.
5338 * sysdeps/mips/pthread_spin_lock.S: New file.
5339 * sysdeps/mips/pthread_spin_trylock.S: New file.
5340 * sysdeps/mips/pthreaddef.h: New file.
5341 * sysdeps/mips/tls.h: New file.
5342 * sysdeps/mips/jmpbuf-unwind.h: New file.
5343 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5344 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5345 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5346 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5347 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5348 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5349 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5350 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5351 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5352 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5354 2005-03-23 Ulrich Drepper <drepper@redhat.com>
5357 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5360 2005-03-10 Jakub Jelinek <jakub@redhat.com>
5362 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5364 2005-02-25 Roland McGrath <roland@redhat.com>
5366 * alloca_cutoff.c: Correct license text.
5367 * tst-unload.c: Likewise.
5368 * sysdeps/pthread/allocalim.h: Likewise.
5369 * sysdeps/pthread/pt-initfini.c: Likewise.
5370 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5371 * sysdeps/pthread/bits/sigthread.h: Likewise.
5372 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5373 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5375 2005-02-16 Roland McGrath <roland@redhat.com>
5377 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5378 Use unsigned int * for ptr_nthreads.
5380 2005-02-14 Alan Modra <amodra@bigpond.net.au>
5383 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5386 2005-02-07 Richard Henderson <rth@redhat.com>
5389 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5392 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
5394 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5395 order of arguments in invocation of atomic_add_zero.
5397 2005-01-26 Jakub Jelinek <jakub@redhat.com>
5400 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5401 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5402 at least gotntpoff relocation and addition.
5403 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5405 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5407 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5410 2005-01-06 Ulrich Drepper <drepper@redhat.com>
5412 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5413 entry for static tls deallocation fix.
5414 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5415 also contains information whether the memory pointed to is static
5417 * sysdeps/i386/tls.h: Likewise.
5418 * sysdeps/ia64/tls.h: Likewise.
5419 * sysdeps/powerpc/tls.h: Likewise.
5420 * sysdeps/s390/tls.h: Likewise.
5421 * sysdeps/sh/tls.h: Likewise.
5422 * sysdeps/sparc/tls.h: Likewise.
5423 * sysdeps/x86_64/tls.h: Likewise.
5425 2004-12-27 Ulrich Drepper <drepper@redhat.com>
5427 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5429 2004-12-21 Jakub Jelinek <jakub@redhat.com>
5431 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5433 * Makefile (tests): Add tst-align2.
5434 * tst-align2.c: New test.
5435 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5436 -mpreferred-stack-boundary=4.
5438 2004-12-18 Roland McGrath <roland@redhat.com>
5440 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5441 New file removed withdrawn for the moment.
5443 2004-12-17 Richard Henderson <rth@redhat.com>
5445 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5446 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5448 2004-12-16 Ulrich Drepper <drepper@redhat.com>
5450 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5451 Increased PTHREAD_STACK_MIN.
5453 * tst-context1.c (stacks): Use bigger stack size.
5455 2004-12-16 Jakub Jelinek <jakub@redhat.com>
5457 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5458 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5460 2004-12-15 Jakub Jelinek <jakub@redhat.com>
5462 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5463 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5464 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5466 2004-12-15 Ulrich Drepper <drepper@redhat.com>
5468 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5470 2004-12-14 Ulrich Drepper <drepper@redhat.com>
5472 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5473 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5475 * tst-getpid1.c: If child crashes, report this first. Print which
5478 2004-12-09 Ulrich Drepper <drepper@redhat.com>
5480 * init.c (__pthread_initialize_minimal_internal): Also unblock
5483 2004-12-01 Jakub Jelinek <jakub@redhat.com>
5485 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5486 _POSIX_THREAD_CPUTIME): Define to 0.
5487 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5488 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5489 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5490 __timer_signal_thread_tclk): Remove.
5491 (init_module): Remove their initialization.
5492 (thread_cleanup): Remove their cleanup assertions.
5493 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5494 __timer_signal_thread_tclk): Remove.
5495 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5496 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5497 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5499 2004-12-07 Jakub Jelinek <jakub@redhat.com>
5501 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5502 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5504 * Makefile (tests): Add tst-getpid2.
5505 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5506 (do_test): Use it. Use __clone2 instead of clone on ia64.
5507 * tst-getpid2.c: New test.
5509 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5511 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5513 2004-12-04 Ulrich Drepper <drepper@redhat.com>
5515 * Makefile (tests): Add tst-getpid1.
5516 * tst-getpid1.c: New file.
5517 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5518 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5520 2004-12-02 Roland McGrath <roland@redhat.com>
5522 * Makefile (libpthread-nonshared): Variable removed.
5523 ($(objpfx)libpthread_nonshared.a): Target removed.
5524 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5525 These are now handled by generic magic from
5526 libpthread-static-only-routines being set.
5528 2004-11-27 Ulrich Drepper <drepper@redhat.com>
5530 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5531 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5532 _POSIX_THREAD_PRIO_PROTECT): Define.
5533 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5534 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5535 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5537 2004-11-26 Jakub Jelinek <jakub@redhat.com>
5539 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5540 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5541 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5542 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5543 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5544 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5545 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5547 2004-11-24 Ulrich Drepper <drepper@redhat.com>
5549 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5551 * Makefile (libpthread-routines): Add pthread_setschedprio.
5552 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5553 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5554 * pthread_setschedprio.c: New file.
5556 2004-11-20 Jakub Jelinek <jakub@redhat.com>
5558 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5559 * pthread_cancel.c (pthread_create): Likewise.
5561 * Makefile (libpthread-routines): Add vars.
5562 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5563 * init.c (__default_stacksize, __is_smp): Remove.
5565 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5566 and define a wrapper macro.
5567 (PTHREAD_STATIC_FN_REQUIRE): Define.
5568 * allocatestack.c (__find_thread_by_id): Undefine.
5569 * pthread_create (__pthread_keys): Remove.
5570 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5571 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5572 PTHREAD_STATIC_FN_REQUIRE.
5574 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5576 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5577 parameter to REGISTER macro.
5579 2004-11-17 Roland McGrath <roland@redhat.com>
5581 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5582 Make sure SIGCANCEL is blocked as well.
5584 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5586 * sysdeps/pthread/setxid.h: New file.
5587 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5588 (struct xid_command): Add forward decl.
5589 (struct pthread_functions): Change return type of __nptl_setxid hook
5591 * pthreadP.h (__nptl_setxid): Change return type to int.
5592 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5593 calling thread, return its return value and set errno on failure.
5594 * descr.h (struct xid_command): Change id type to long array.
5596 * Makefile: Add rules to build and test tst-setuid1 and
5598 * tst-setuid1.c: New test.
5599 * tst-setuid1-static.c: New test.
5601 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5603 * Makefile (tests): Add tst-exit3.
5604 * tst-exit3.c: New test.
5606 2004-11-09 Ulrich Drepper <drepper@redhat.com>
5608 * Makefile (tests): Add tst-exit2.
5609 * tst-exit2.c: New file.
5611 2004-11-09 Roland McGrath <roland@redhat.com>
5614 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5615 here, before calling clone.
5616 * pthread_create.c (start_thread): Don't do it here.
5618 2004-11-02 Jakub Jelinek <jakub@redhat.com>
5620 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5622 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5624 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5625 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5628 2004-10-28 Jakub Jelinek <jakub@redhat.com>
5630 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5631 if sched_priority is not between minprio and maxprio.
5633 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5635 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5636 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5638 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5639 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5641 2004-10-24 Ulrich Drepper <drepper@redhat.com>
5643 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5644 not-cancelable I/O functions.
5646 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5648 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5649 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5650 make sure 2 is stored in the futex and we looked at the old value.
5651 Fix a few other problems to return the correct value.
5653 2004-10-14 Richard Henderson <rth@redhat.com>
5655 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5658 2004-10-06 Jakub Jelinek <jakub@redhat.com>
5660 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5661 of pthread-functions.h and pthreaddef.h.
5662 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5664 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5665 Change __data.__nwaiters from int to unsigned int.
5667 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5668 sysconf (_SC_THREAD_CPUTIME) returns negative value.
5670 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5673 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5674 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5676 2004-10-06 Ulrich Drepper <drepper@redhat.com>
5678 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
5679 test fails, remove message queue.
5680 (tf_msgsnd): Likewise.
5682 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5684 * tst-clock1.c: Change #ifdef to #if defined.
5685 * tst-clock2.c: Likewise.
5686 * tst-cond11.c: Likewise.
5688 * sysdeps/pthread/timer_create.c (timer_create): Use
5689 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5690 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5693 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5695 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5696 _POSIX_THREAD_CPUTIME): Define to 0.
5698 2004-10-04 Ulrich Drepper <drepper@redhat.com>
5700 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5701 and _POSIX_THREAD_CPUTIME to zero.
5702 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5703 * tst-barrier2.c: Fix testing for POSIX feature.
5704 * tst-clock1.c: Likewise.
5705 * tst-clock2.c: Likewise.
5706 * tst-cond11.c: Likewise.
5707 * tst-cond4.c: Likewise.
5708 * tst-cond6.c: Likewise.
5709 * tst-flock2.c: Likewise.
5710 * tst-mutex4.c: Likewise.
5711 * tst-mutex9.c: Likewise.
5712 * tst-rwlock12.c: Likewise.
5713 * tst-rwlock4.c: Likewise.
5714 * tst-signal1.c: Likewise.
5715 * tst-spin2.c: Likewise.
5716 * sysdeps/pthread/posix-timer.h: Likewise.
5717 * sysdeps/pthread/timer_create.c: Likewise.
5718 * sysdeps/pthread/timer_routines.c: Likewise.
5720 2004-10-01 Ulrich Drepper <drepper@redhat.com>
5722 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5723 (__lll_mutex_timedlock_wait): Address futex correctly.
5725 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5726 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5727 make sure 2 is stored in the futex and we looked at the old value.
5728 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5729 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5730 which might very well made the code not working at all before.
5733 2004-09-28 Ulrich Drepper <drepper@redhat.com>
5735 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5736 allow SIGSETXID to be sent.
5737 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5738 for SIGSETXID to be defined.
5739 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5740 SIGSETXID cannot be blocked.
5742 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5743 Add __extension__ to long long types.
5744 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5745 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5746 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5747 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5748 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5749 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5750 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5752 2004-09-25 Ulrich Drepper <drepper@redhat.com>
5754 * descr.h (struct pthread): Add stopped_start field.
5755 * sysdeps/pthread/createthread.c (create_thread): Set
5756 start_stopped flag in descriptor for new thread appropriately.
5757 * pthread_create.c (start_thread): Only take lock to be stopped on
5758 startup if stopped_start flag says so.
5760 2004-09-24 Ulrich Drepper <drepper@redhat.com>
5762 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5763 is created detached and if yes, do not try to free the stack in case
5764 the thread creation failed.
5765 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5766 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5767 case there has been no error. [BZ #405]
5769 * pthread_create.c (start_thread): Don't wait for scheduler data
5770 etc to be set at the beginning of the function. The cancellation
5771 infrastructure must have been set up. And enable async
5772 cancellation before potentially going to sleep. [BZ #401]
5774 2004-09-20 Ulrich Drepper <drepper@redhat.com>
5776 * Versions: Remove exports for pthread_set*id_np functions.
5777 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5779 * Makefile: Don't build pthread_set*id code for now.
5781 2004-09-19 Ulrich Drepper <drepper@redhat.com>
5783 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5785 * allocatestack.c (__nptl_setxid): New function.
5786 * descr.h (struct xid_command): Define type.
5787 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5788 (sighandler_setxid): New function.
5789 (__pthread_initialize_minimal): Register sighandler_setxid for
5791 * pt-allocrtsig.c: Update comment.
5792 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
5793 Declare __nptl_setxid.
5794 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5795 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5796 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5797 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5798 and pthread_setresuid_np.
5799 * pthread_setgid_np.c: New file.
5800 * pthread_setuid_np.c: New file.
5801 * pthread_setegid_np.c: New file.
5802 * pthread_seteuid_np.c: New file.
5803 * pthread_setregid_np.c: New file.
5804 * pthread_setreuid_np.c: New file.
5805 * pthread_setresgid_np.c: New file.
5806 * pthread_setresuid_np.c: New file.
5807 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5808 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5809 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5810 and pthread_setresuid_np.
5811 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5812 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5813 pthread_setregid, and pthread_setresgid.
5815 2004-09-18 Ulrich Drepper <drepper@redhat.com>
5817 * allocatestack.c (allocate_stack): Return EAGAIN instead of
5818 ENOMEM when out of memory.
5820 2004-09-10 Roland McGrath <roland@redhat.com>
5823 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5824 code, since we don't try to use the broken CLONE_STOPPED any more.
5825 * pthread_create.c (start_thread): Likewise.
5827 2004-09-15 Richard Henderson <rth@redhat.com>
5829 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5831 2004-09-01 David Mosberger <davidm@hpl.hp.com>
5833 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5834 (__libc_unwind_longjmp): Delete macro and declare as function.
5835 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5836 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5838 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5839 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5840 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5842 2004-09-12 Ulrich Drepper <drepper@redhat.com>
5844 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5846 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5847 types also for __USE_XOPEN2K.
5848 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5849 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5850 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5851 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5852 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5853 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5854 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5857 2004-09-08 Ulrich Drepper <drepper@redhat.com>
5859 * sysdeps/pthread/pthread.h
5860 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5861 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5862 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5863 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5866 2004-09-07 Ulrich Drepper <drepper@redhat.com>
5868 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5869 PSEUDO to be used with . prefix.
5871 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5872 Use atomic_increment instead of atomic_exchange_and_add.
5873 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5875 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5877 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5880 * allocatestack.c (allocate_stack): Use atomic_increment_val
5881 instead of atomic_exchange_and_add.
5882 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5883 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5885 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5888 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5889 the initialization function might throw.
5891 2005-09-05 Richard Henderson <rth@redhat.com>
5893 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5894 Move definition inside libpthread, libc, librt check. Provide
5895 definition for rtld.
5897 2004-09-02 Ulrich Drepper <drepper@redhat.com>
5899 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5900 * sysdeps/i386/jmpbuf-unwind.h: Likewise
5901 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5902 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5903 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5904 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5905 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5906 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5909 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5910 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5911 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5913 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5914 Decrement __nwaiters. If pthread_cond_destroy has been called and
5915 this is the last waiter, signal pthread_cond_destroy caller and
5916 avoid using the pthread_cond_t structure after unlock.
5917 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5918 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5919 Read clock type from the least significant bits of __nwaiters instead
5921 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5922 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5924 2004-08-31 Jakub Jelinek <jakub@redhat.com>
5927 * Makefile (tests): Add tst-cond20 and tst-cond21.
5928 * tst-cond20.c: New test.
5929 * tst-cond21.c: New test.
5930 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5931 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5933 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5935 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5936 (pthread_cond_t): Likewise.
5937 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5939 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5941 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5943 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5944 (cond_nwaiters): New.
5946 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5947 if there are waiters not signalled yet.
5948 Wait until all already signalled waiters wake up.
5949 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5950 __nwaiters. If pthread_cond_destroy has been called and this is the
5951 last waiter, signal pthread_cond_destroy caller and avoid using
5952 the pthread_cond_t structure after unlock.
5953 (__pthread_cond_wait): Increment __nwaiters in the beginning,
5954 decrement it when leaving. If pthread_cond_destroy has been called
5955 and this is the last waiter, signal pthread_cond_destroy caller.
5956 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5957 Likewise. Read clock type from the least significant bits of
5958 __nwaiters instead of __clock.
5959 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5960 whether clock ID can be encoded in COND_CLOCK_BITS bits.
5961 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5962 clock type just from the last COND_CLOCK_BITS bits of value.
5963 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5964 instead of __clock, just from second bit of condattr's value.
5966 2004-08-30 Jakub Jelinek <jakub@redhat.com>
5968 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5969 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
5971 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5973 2004-08-15 Roland McGrath <roland@frob.com>
5975 * pthread_atfork.c: Update copyright terms including special exception
5976 for these trivial files, which are statically linked into executables
5977 that use dynamic linking for the significant library code.
5979 2004-08-09 Jakub Jelinek <jakub@redhat.com>
5981 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5982 pthread_rwlock_rdlock.
5983 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5984 Decrease __nr_readers_queued after reacquiring lock.
5985 * sysdeps/pthread/pthread_rwlock_timedrdlock
5986 (pthread_rwlock_timedrdlock): Likewise.
5987 Reported by Bob Cook <bobcook47@hotmail.com>.
5989 2004-08-11 Jakub Jelinek <jakub@redhat.com>
5991 * tst-rwlock14.c (tf): Read main thread handle from *ARG
5992 before pthread_barrier_wait.
5994 2004-08-07 Ulrich Drepper <drepper@redhat.com>
5996 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5997 Remove unnecessary exception handling data.
5999 2004-07-23 Jakub Jelinek <jakub@redhat.com>
6002 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6003 instead of clockid_t.
6005 2004-07-21 Roland McGrath <roland@redhat.com>
6007 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6009 2004-07-19 Roland McGrath <roland@redhat.com>
6011 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6013 2004-07-02 Roland McGrath <roland@redhat.com>
6015 * configure: Don't exit.
6017 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6019 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6020 (__pthread_cond_timedwait): Check for invalid nanosecond in
6023 2004-07-07 Ulrich Drepper <drepper@redhat.com>
6025 * Makefile: Add rules to build and run tst-fini1.
6026 * tst-fini1.c: New file.
6027 * tst-fini1mod.c: New file.
6029 2004-07-05 Ulrich Drepper <drepper@redhat.com>
6031 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6032 if no cancellation support is needed.
6033 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6034 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6035 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6036 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6037 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6038 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6039 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6040 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6041 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6043 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6044 only if not already defined.
6046 2004-07-05 Jakub Jelinek <jakub@redhat.com>
6048 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6049 constraint "m" instead of "0" for futex.
6051 * shlib-versions: Add powerpc64-.*-linux.*.
6053 2004-07-04 Jakub Jelinek <jakub@redhat.com>
6055 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6056 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6058 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6059 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6062 2004-06-29 Roland McGrath <roland@redhat.com>
6064 * Banner: NPTL no longer has its own version number.
6065 * Makefile (nptl-version): Variable removed.
6066 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6067 using $(version), the glibc version number.
6069 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6071 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6072 Fix branch offset for a PLT entry.
6073 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6075 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6077 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6079 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6082 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6084 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6087 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6089 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6090 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6092 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6093 (pthread_rwlock_timedrdlock): Likewise.
6095 2004-06-22 Jakub Jelinek <jakub@redhat.com>
6097 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6098 Set __r7 to val, not mutex.
6100 2004-06-27 Ulrich Drepper <drepper@redhat.com>
6102 * Makefile: Add rules to build tst-rwlock14.
6103 * tst-rwlock14.c: New file.
6105 2004-06-24 Boris Hu <boris.hu@intel.com>
6107 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6109 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6111 2004-06-19 Andreas Jaeger <aj@suse.de>
6113 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6114 assembler in last patch.
6116 2004-06-17 Ulrich Drepper <drepper@redhat.com>
6118 * sysdeps/pthread/pthread_cond_timedwait.c
6119 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6120 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6121 (__pthread_cond_timedwait): Check for invalid nanosecond in
6123 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6124 * tst-cond19.c: New file.
6125 * Makefile: Add rules to build and run tst-cond19.
6127 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6129 * tst-context1.c (GUARD_PATTERN): Defined.
6130 (tst_context_t): Define struct containing ucontext_t & guard words.
6131 (ctx): Declare as an array of tst_context_t.
6132 (fct): Verify uc_link & guard words are still valid.
6133 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6135 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6137 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6138 Add __data.__futex field, reshuffle __data.__clock.
6139 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6140 (__pthread_cond_signal): Increment __futex at the same time as
6141 __wakeup_seq or __total_seq. Pass address of __futex instead of
6142 address of low 32-bits of __wakeup_seq to futex syscall.
6143 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6144 (__pthread_cond_wait): Likewise. Pass __futex value from before
6145 releasing internal lock to FUTEX_WAIT.
6146 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6147 (__pthread_cond_timedwait): Likewise.
6148 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6149 (FUTEX_CMP_REQUEUE): Define.
6150 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6151 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6152 Pass __futex value from before the unlock and __futex address instead
6153 of address of low 32-bits of __wakeup_seq to futex syscall.
6154 Fallback to FUTEX_WAKE all on any errors.
6156 2004-06-08 Jakub Jelinek <jakub@redhat.com>
6158 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6160 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6161 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6162 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6163 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6164 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6166 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6168 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6169 Add memory clobber to inline assembly.
6170 (__lll_mutex_trylock): Likewise.
6171 (__lll_mutex_cond_trylock): Likewise.
6173 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6175 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6176 Pass val argument as 6th system call argument in %r7.
6178 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6180 * Makefile (tests): Add tst-cond16.
6181 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6182 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6183 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6184 Add __data.__futex field, reshuffle __data.__clock.
6185 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6186 (__pthread_cond_signal): Increment __futex at the same time as
6187 __wakeup_seq or __total_seq. Pass address of __futex instead of
6188 address of low 32-bits of __wakeup_seq to futex syscall.
6189 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6190 (__pthread_cond_wait): Likewise. Pass __futex value from before
6191 releasing internal lock to FUTEX_WAIT.
6192 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6193 (__pthread_cond_timedwait): Likewise.
6194 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6195 (FUTEX_CMP_REQUEUE): Define.
6196 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6197 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6198 Pass __futex value from before the unlock and __futex address instead
6199 of address of low 32-bits of __wakeup_seq to futex syscall.
6200 Fallback to FUTEX_WAKE all on any errors.
6201 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6203 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6204 internally. Return non-zero if error, zero if success.
6205 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6206 Add __data.__futex field, reshuffle __data.__clock.
6207 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6209 (lll_futex_requeue): Add val argument, return 1 unconditionally
6211 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6212 Add __data.__futex field, reshuffle __data.__clock.
6213 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6215 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6216 internally. Return non-zero if error, zero if success.
6217 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6218 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6219 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6221 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6222 internally. Return non-zero if error, zero if success.
6223 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6224 Add __data.__futex field, reshuffle __data.__clock.
6225 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6227 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6228 internally. Return non-zero if error, zero if success.
6229 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6230 Add __data.__futex field, reshuffle __data.__clock.
6231 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6232 Add __data.__futex field, reshuffle __data.__clock.
6233 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6234 Increment __futex at the same time as __wakeup_seq or __total_seq.
6235 Pass address of __futex instead of address of low 32-bits of
6236 __wakeup_seq to futex syscall.
6237 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6238 Pass __futex value from before releasing internal lock
6240 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6241 Likewise. Avoid unnecessary shadowing of variables.
6242 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6243 Set __futex to 2 * __total_seq. Pass __futex value from before the
6244 unlock and __futex address instead of address of low 32-bits of
6245 __wakeup_seq to futex_requeue macro, adjust for new return value
6247 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6248 (__pthread_cond_signal): Increment __futex at the same time as
6249 __wakeup_seq or __total_seq. Pass address of __futex instead of
6250 address of low 32-bits of __wakeup_seq to futex syscall.
6251 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6252 (__pthread_cond_wait): Likewise. Pass __futex value from before
6253 releasing internal lock to FUTEX_WAIT.
6254 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6255 (__pthread_cond_timedwait): Likewise.
6256 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6257 (FUTEX_CMP_REQUEUE): Define.
6258 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6259 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6260 Pass __futex value from before the unlock and __futex address instead
6261 of address of low 32-bits of __wakeup_seq to futex syscall.
6262 Fallback to FUTEX_WAKE all on any errors.
6264 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6266 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6267 Add nop to align the end of critical section.
6268 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6270 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6272 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6273 Add __broadcast_seq field.
6274 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6275 all waiters as woken with woken_seq and bump broadcast counter.
6276 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6277 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6278 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6279 Comment typo fixes. Avoid returning -ETIMEDOUT.
6281 2004-06-01 Ulrich Drepper <drepper@redhat.com>
6283 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6284 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6285 Reported by Kaz Kojima.
6287 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6289 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6291 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6293 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6294 __broadcast_seq with bc_seq after acquiring internal lock instead of
6297 2004-05-18 Jakub Jelinek <jakub@redhat.com>
6299 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6301 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6302 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6303 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6304 (pthread_cond_t): Add __data.__broadcast_seq field.
6305 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6306 (FRAME_SIZE): Define.
6307 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6309 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6311 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6313 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6314 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6317 2004-05-18 Ulrich Drepper <drepper@redhat.com>
6319 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6320 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6321 Add __broadcast_seq field.
6322 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6323 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6324 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6325 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6326 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6327 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6328 all waiters as woken with woken_seq and bump broadcast counter.
6329 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6330 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6331 __broadcast_seq field.
6332 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6333 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6334 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6335 * pthread_cond_init.c: Initialize __broadcast_seq field.
6336 * Makefile (tests): Add tst-cond17 and tst-cond18.
6337 Add .NOTPARALLEL goal.
6338 * tst-cond16.c: New file. From Jakub.
6339 * tst-cond17.c: New file. From Jakub.
6340 * tst-cond18.c: New file. From Jakub.
6342 2004-05-16 Ulrich Drepper <drepper@redhat.com>
6344 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6347 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6348 Parametrize frame size. Correct some unwind info.
6349 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6351 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6353 * tst-stack3.c: Note testing functionality beyond POSIX.
6355 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6357 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6358 Change conditional from ifdef to if.
6360 2004-04-23 Jakub Jelinek <jakub@redhat.com>
6362 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6363 SYSDEP_CANCEL_ERROR): Define.
6366 2004-05-01 Jakub Jelinek <jakub@redhat.com>
6368 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6370 2004-04-20 Jakub Jelinek <jakub@redhat.com>
6372 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6374 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6376 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6377 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6378 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6379 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6381 2004-04-19 Ulrich Drepper <drepper@redhat.com>
6383 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6384 thread has all signals blocked.
6386 2004-04-18 Andreas Jaeger <aj@suse.de>
6388 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6389 (SEM_VALUE_MAX): Add missing brace.
6391 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6393 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6395 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6396 * sysdeps/pthread/tst-mqueue8x.c: New test.
6397 * tst-cancel4.c: Update comment about message queues.
6399 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6400 return it_value { 0, 0 }.
6401 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6403 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6404 assertion for SIGEV_NONE.
6405 (thread_attr_compare): Compare all attributes, not just a partial
6408 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6410 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6412 2004-04-17 Ulrich Drepper <drepper@redhat.com>
6414 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6415 Just use a plain number.
6416 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6417 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6418 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6419 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6420 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6421 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6422 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6424 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6426 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6428 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6430 2004-04-15 Jakub Jelinek <jakub@redhat.com>
6432 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6433 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6434 of calling sigwaitinfo.
6436 2004-04-16 Ulrich Drepper <drepper@redhat.com>
6438 * allocatestack.c (allocate_stack): Set reported_guardsize
6440 * pthread_getattr_np.c (pthread_getattr_np): Use
6441 reported_guardsize instead of guardsize.
6442 * descr.h (struct pthread): Add reported_guardsize field.
6444 2004-04-13 Jakub Jelinek <jakub@redhat.com>
6446 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6448 2004-04-12 Ulrich Drepper <drepper@redhat.com>
6450 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6452 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6454 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6455 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6456 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6457 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6458 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6460 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6461 (_POSIX_MESSAGE_PASSING): Define.
6462 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6463 (_POSIX_MESSAGE_PASSING): Define.
6464 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6465 (_POSIX_MESSAGE_PASSING): Define.
6467 2004-04-04 Ulrich Drepper <drepper@redhat.com>
6469 * tst-context1.c (fct): Check whether correct stack is used.
6471 2004-04-03 Ulrich Drepper <drepper@redhat.com>
6473 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6474 matching constraints for asm mem parameters.
6476 * tst-clock2.c (tf): Don't define unless needed.
6478 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6480 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6483 2004-03-30 Ulrich Drepper <drepper@redhat.com>
6485 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6486 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6487 * pthreadP.h: Declare __nptl_deallocate_tsd.
6488 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6491 * Makefile (tests): Add tst-tsd5.
6492 * tst-tsd5.c: New file.
6494 2004-03-29 Ulrich Drepper <drepper@redhat.com>
6496 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6497 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6498 is SHLIB_COMPAT check.
6499 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6500 (__pthread_attr_getaffinity_old): Likewise.
6501 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6502 (__pthread_getaffinity_old): Likewise.
6503 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6504 (__pthread_setaffinity_old): Likewise.
6506 2004-03-26 Ulrich Drepper <drepper@redhat.com>
6508 * allocatestack.c (_make_stacks_executable): Call
6509 _dl_make_stack_executable first.
6511 2004-03-24 Roland McGrath <roland@redhat.com>
6513 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6514 constraint instead of "0".
6516 2004-03-24 Ulrich Drepper <drepper@redhat.com>
6518 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6519 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6521 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6522 code to avoid warning.
6524 2004-03-24 Andreas Jaeger <aj@suse.de>
6526 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6527 (__pthread_attr_setaffinity_old): Remove const.
6529 2004-03-23 Ulrich Drepper <drepper@redhat.com>
6531 * sysdeps/unix/sysv/linux/smp.h: New file.
6532 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6533 * init.c: Define __is_smp.
6534 (__pthread_initialize_minimal_internal): Call is_smp_system to
6535 initialize __is_smp.
6536 * pthreadP.h: Declare __is_smp.
6537 Define MAX_ADAPTIVE_COUNT is necessary.
6538 * pthread_mutex_init.c: Add comment regarding __spins field.
6539 * pthread_mutex_lock.c: Implement adaptive mutex type.
6540 * pthread_mutex_timedlock.c: Likewise.
6541 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6542 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6544 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6545 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6546 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6547 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6548 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6549 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6550 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6551 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6552 lll_mutex_cond_trylock.
6553 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6554 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6555 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6556 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6557 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6558 Define BUSY_WAIT_NOP.
6559 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6560 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6562 * tst-mutex5.c: Add support for testing adaptive mutexes.
6563 * tst-mutex7.c: Likewise.
6564 * tst-mutex5a.c: New file.
6565 * tst-mutex7a.c: New file.
6566 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6568 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6569 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6570 vgettimeofday call might destroy the content.
6572 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6575 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6576 No need to restrict type of ret. Make it int. Add comment.
6578 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6579 Remove unnecessary setne instruction.
6581 2004-03-22 Jakub Jelinek <jakub@redhat.com>
6583 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6584 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6585 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6586 If realloc fails, break out of the loop.
6588 2004-03-20 Andreas Jaeger <aj@suse.de>
6590 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6591 (__pthread_setaffinity_old): Fix interface.
6592 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6593 (__pthread_getaffinity_old): Likewise.
6595 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6596 (__pthread_setaffinity_new): Remove duplicate declaration.
6598 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6600 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6601 the return value to a safe register.
6602 (CDISABLE): Set the function argument correctly.
6604 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6606 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6607 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6608 Rewrite so that only one locked memory operation per round is needed.
6609 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6610 (pthread_barrier_wait): After wakeup, release lock only when the
6611 last thread stopped using the barrier object.
6612 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6613 (__pthread_cond_wait): Don't store mutex address if the current
6614 value is ~0l. Add correct cleanup support and unwind info.
6615 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6616 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6617 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6618 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6619 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6620 Add correct cleanup support and unwind info.
6621 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6622 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6623 information for syscall wrappers.
6625 2004-03-18 Ulrich Drepper <drepper@redhat.com>
6627 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6628 cpusetsize field, remove next.
6629 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6630 parameter for size of the CPU set.
6631 (pthread_setaffinity_np): Likewise.
6632 (pthread_attr_getaffinity_np): Likewise.
6633 (pthread_attr_setaffinity_np): Likewise.
6634 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6635 interface change, keep compatibility code.
6636 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6637 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6638 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6639 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6640 __pthread_getaffinity_np.
6641 * Versions: Add version for changed interfaces.
6642 * tst-attr3.c: Adjust test for interface change.
6643 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6644 increasing buffer sizes.
6645 * pthread_attr_destroy.c: Remove unused list handling.
6646 * pthread_attr_init.c: Likewise.
6648 2004-03-17 Roland McGrath <roland@redhat.com>
6650 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6651 first argument to clock_getres so we ever enable kernel timers.
6653 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
6655 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6657 2004-03-12 Richard Henderson <rth@redhat.com>
6659 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6660 oldvalue from CENABLE to CDISABLE.
6662 2004-03-12 Ulrich Drepper <drepper@redhat.com>
6664 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6665 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6666 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6667 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6669 2004-03-11 Richard Henderson <rth@redhat.com>
6671 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6672 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6673 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6675 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6677 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6678 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6679 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6681 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6683 * forward.c (__pthread_cond_broadcast_2_0,
6684 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6685 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6686 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6688 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6690 * sysdeps/sh/tcb-offsets.sym: Add PID.
6691 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6692 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6694 2004-03-10 Ulrich Drepper <drepper@redhat.com>
6696 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6697 include <sysdep-cancel.h>, vfork is no cancellation point.
6698 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6699 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6700 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6702 2004-03-10 Jakub Jelinek <jakub@redhat.com>
6704 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6706 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6707 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6709 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6711 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6712 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6713 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6714 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6715 of DO_CALL_VIA_BREAK. Work around a gas problem.
6717 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6718 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6719 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6720 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6721 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6722 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6724 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6725 a local register for saving old PID. Negate PID in parent upon exit.
6727 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6729 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6730 before syscall, set to the old value in the parent afterwards.
6731 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6732 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6734 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6735 before syscall, set to the old value in the parent afterwards.
6736 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6737 * sysdeps/s390/tcb-offsets.sym: Add PID.
6739 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6740 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6741 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6742 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6743 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6744 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6746 2004-03-10 Andreas Schwab <schwab@suse.de>
6748 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6749 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6750 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6752 2004-03-09 Jakub Jelinek <jakub@redhat.com>
6754 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6755 * tst-cancel21.c (do_one_test): Likewise.
6756 Reported by Gordon Jin <gordon.jin@intel.com>.
6758 2004-02-09 Jakub Jelinek <jakub@redhat.com>
6760 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6761 if non-zero and set to INT_MIN if zero.
6762 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6763 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6764 (SAVE_PID, RESTORE_PID): Define.
6766 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6767 Use relative path to avoid including NPTL i386/vfork.S.
6768 (SAVE_PID, RESTORE_PID): Define.
6769 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6770 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6771 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6773 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6774 * tst-vfork1.c: New test.
6775 * tst-vfork2.c: New test.
6776 * tst-vfork1x.c: New test.
6777 * tst-vfork2x.c: New test.
6779 2004-03-08 Ulrich Drepper <drepper@redhat.com>
6781 * sysdeps/i386/tcb-offsets.sym: Add PID.
6782 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6783 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6784 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6786 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
6788 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6790 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
6792 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6795 2004-03-07 Ulrich Drepper <drepper@redhat.com>
6797 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6800 * tst-once4.c: Remove unnecessary macro definition.
6802 * tst-mutex7.c (do_test): Limit thread stack size.
6803 * tst-once2.c (do_test): Likewise.
6804 * tst-tls3.c (do_test): Likewise.
6805 * tst-tls1.c (do_test): Likewise.
6806 * tst-signal3.c (do_test): Likewise.
6807 * tst-kill6.c (do_test): Likewise.
6808 * tst-key4.c (do_test): Likewise.
6809 * tst-join4.c (do_test): Likewise.
6810 * tst-fork1.c (do_test): Likewise.
6811 * tst-context1.c (do_test): Likewise.
6812 * tst-cond2.c (do_test): Likewise.
6813 * tst-cond10.c (do_test): Likewise.
6814 * tst-clock2.c (do_test): Likewise.
6815 * tst-cancel10.c (do_test): Likewise.
6816 * tst-basic2.c (do_test): Likewise.
6817 * tst-barrier4.c (do_test): Likewise.
6819 2004-03-05 Ulrich Drepper <drepper@redhat.com>
6821 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6823 2004-03-01 Ulrich Drepper <drepper@redhat.com>
6825 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6826 (__pthread_cond_timedwait): Optimize wakeup test.
6827 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6828 (__pthread_cond_wait): Likewise.
6829 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6830 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6833 2004-02-29 Ulrich Drepper <drepper@redhat.com>
6835 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6836 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
6837 the atomic instruction needed.
6838 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6839 (__lll_mutex_lock_wait): Likewise.
6841 2004-02-28 Ulrich Drepper <drepper@redhat.com>
6843 * Makefile (tests): Add tst-cond14 and tst-cond15.
6844 * tst-cond14.c: New file.
6845 * tst-cond15.c: New file.
6847 2004-02-27 Ulrich Drepper <drepper@redhat.com>
6849 * sysdeps/pthread/createthread.c (create_thread): Remove use of
6850 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
6851 needs to be implemented differently to be useful.
6853 2004-02-26 Ulrich Drepper <drepper@redhat.com>
6855 * pthread_attr_setschedparam.c: Don't test priority against limits
6856 here. Set ATTR_FLAG_SCHED_SET flag.
6857 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6858 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6859 from parent thread to child. If attribute is used and scheduling
6860 parameters are not inherited, copy parameters from attribute or
6861 compute them. Check priority value.
6862 * pthread_getschedparam.c: If the parameters aren't known yet get
6863 them from the kernel.
6864 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6865 ATTR_FLAG_POLICY_SET flag for thread.
6866 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6867 and ATTR_FLAG_POLICY_SET.
6869 * sysdeps/pthread/createthread.c: Use tgkill if possible.
6871 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6872 fail if stack address hasn't been set. Just return 0.
6874 2004-02-25 Ulrich Drepper <drepper@redhat.com>
6876 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
6877 libpthread for the files in this list.
6878 (CFLAGS-tst-unload): Removed.
6879 * tst-unload.c (do_test): Don't use complete path for
6882 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6885 2004-02-22 Ulrich Drepper <drepper@redhat.com>
6887 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6888 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6889 operation per round is needed.
6890 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6891 (__lll_mutex_lock_wait): Likewise.
6893 2004-02-20 Ulrich Drepper <drepper@redhat.com>
6895 * tst-cancel9.c (cleanup): Don't print to stderr.
6897 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6899 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6901 2004-02-20 Jakub Jelinek <jakub@redhat.com>
6903 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6904 (__syscall_error_handler2): Call CDISABLE.
6905 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6906 (__syscall_error_handler2): Call CDISABLE.
6908 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6909 Release lock before the loop, don't reacquire it.
6911 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6913 2004-02-19 Andreas Schwab <schwab@suse.de>
6915 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6918 2004-02-18 Ulrich Drepper <drepper@redhat.com>
6920 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6921 (pthread_barrier_wait): After wakeup, release lock only when the
6922 last thread stopped using the barrier object.
6923 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6924 (pthread_barrier_wait): Likewise.
6925 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6927 * Makefile (tests): Add tst-barrier4.
6928 * tst-barrier4.c: New file.
6930 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6931 (__pthread_cond_timedwait): Perform timeout test while holding
6932 internal lock to prevent wakeup race.
6933 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6934 * sysdeps/pthread/pthread_cond_timedwait.c
6935 (__pthread_cond_timedwait): Likewise.
6936 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6937 (__pthread_cond_timedwait): Likewise.
6939 2004-02-18 Jakub Jelinek <jakub@redhat.com>
6941 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6942 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6943 * Makefile (tests): Add tst-rwlock13.
6944 * tst-rwlock13.c: New test.
6946 2004-02-16 Ulrich Drepper <drepper@redhat.com>
6948 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6949 (__condvar_tw_cleanup): Little optimization.
6950 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6952 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
6954 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6955 libpthread as "lib" parameter to SHLIB_COMPAT.
6956 (__novmx_siglongjmp): Fix typo in function name.
6957 (__novmx_longjmp): Fix typo in function name.
6959 2004-02-13 Ulrich Drepper <drepper@redhat.com>
6961 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6964 * sysdeps/generic/pt-longjmp.c: Moved to...
6965 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
6967 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
6969 * Makefile (libpthread-routines): Add pt-cleanup.
6970 * pt-longjmp.c: Removed.
6971 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6972 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6973 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6974 Version longjmp, siglongjmp for GLIBC_2.3.4.
6975 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6977 2004-02-13 Ulrich Drepper <drepper@redhat.com>
6979 * sysdeps/pthread/pthread_cond_timedwait.c
6980 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
6981 Reuse code. Add __builtin_expects.
6983 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6984 (__pthread_cond_timedwait): Get internal lock in case timeout has
6985 passed before the futex syscall.
6986 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6988 2004-01-20 Ulrich Drepper <drepper@redhat.com>
6990 * allocatestack.c: Pretty printing.
6992 * sysdeps/pthread/createthread.c (create_thread): Don't add
6993 CLONE_DETACHED bit if it is not necessary.
6995 2004-01-16 Ulrich Drepper <drepper@redhat.com>
6997 * pthread_getattr_np.c: Include ldsodefs.h.
6999 2004-01-16 Richard Henderson <rth@redhat.com>
7001 * allocatestack.c: Don't declare __libc_stack_end.
7002 * init.c (__pthread_initialize_minimal_internal): Likewise.
7003 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7005 2004-01-15 Richard Henderson <rth@redhat.com>
7007 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7008 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7009 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7010 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7011 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7012 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7013 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7014 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7016 2004-01-14 Ulrich Drepper <drepper@redhat.com>
7018 * init.c (pthread_functions): Make array const.
7020 2004-01-13 Ulrich Drepper <drepper@redhat.com>
7022 * allocatestack.c (__make_stacks_executable): Change interface.
7023 Check parameters. Pass parameter on to libc counterpart.
7024 * pthreadP.h: Change declaration.
7026 2004-01-13 Richard Henderson <rth@redhat.com>
7028 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7030 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7033 * sysdeps/alpha/Makefile: New file.
7034 * sysdeps/alpha/tcb-offsets.sym: New file.
7035 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7036 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7038 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7041 2004-01-08 Jakub Jelinek <jakub@redhat.com>
7043 * Makefile (tests): Add tst-backtrace1.
7044 * tst-backtrace1.c: New test.
7046 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7048 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7049 register as second parameter to the REGISTER macro.
7050 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7051 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7052 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7053 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7054 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7055 of thread register as second parameter to REGISTER macro in 64 case.
7057 2004-01-03 Ulrich Drepper <drepper@redhat.com>
7059 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7060 (CFLAGS-getpid.o): Defined.
7061 (CFLAGS-getpid.os): Defined.
7063 2003-12-31 Ulrich Drepper <drepper@redhat.com>
7065 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7066 returned for main thread does not overlap with any other VMA.
7067 Patch by Jakub Jelinek.
7069 2003-12-29 Jakub Jelinek <jakub@redhat.com>
7071 * tst-raise1.c: Include stdio.h.
7073 2003-12-23 Jakub Jelinek <jakub@redhat.com>
7075 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7076 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7077 If pid is 0, set it to selftid.
7078 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7079 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7080 != 0, return self->tid without doing a syscall.
7081 * descr.h (struct pthread): Move pid field after tid.
7083 * Makefile (tests): Add tst-raise1.
7084 * tst-raise1.c: New file.
7086 2003-12-23 Roland McGrath <roland@redhat.com>
7088 * tst-oddstacklimit.c: New file.
7089 * Makefile (tests): Add it.
7090 (tst-oddstacklimit-ENV): New variable.
7092 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7093 value up to page size for __default_stacksize.
7095 2003-12-21 Ulrich Drepper <drepper@redhat.com>
7097 * Makefile (tests): Add tst-eintr5.
7098 * tst-eintr5.c: New file.
7100 * eintr.c (eintr_source): Prevent sending signal to self.
7102 * tst-eintr2.c (tf1): Improve error message.
7104 2003-12-20 Ulrich Drepper <drepper@redhat.com>
7106 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7107 * sysdeps/unix/sysv/linux/getpid.c: New file.
7108 * pthread_cancel.c: Add comment explaining use of PID field.
7109 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7110 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7111 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7112 temporarily to signal the field must not be relied on and updated
7114 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7115 temporarily negative.
7116 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7118 2003-12-19 Ulrich Drepper <drepper@redhat.com>
7120 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7121 (eintr_source): If ARG != NULL, use pthread_kill.
7122 * tst-eintr1.c: Adjust for this change.
7123 * tst-eintr2.c: Likewise.
7124 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7125 * tst-eintr3.c: New file.
7126 * tst-eintr4.c: New file.
7128 2003-12-19 Jakub Jelinek <jakub@redhat.com>
7130 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7131 if CANCELSTATE_BITMASK is set.
7132 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7135 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7136 (tests-reverse): Add tst-cancel23.
7137 * tst-cancel22.c: New test.
7138 * tst-cancel23.c: New test.
7140 2003-12-18 Ulrich Drepper <drepper@redhat.com>
7142 * tst-eintr1.c: Better error messages.
7144 * Makefile (tests): Add tst-eintr2.
7145 * tst-eintr2.c: New file.
7147 2003-12-18 Jakub Jelinek <jakub@redhat.com>
7149 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7150 (CFLAGS-tst-cancelx21.c): Set.
7151 * tst-cancel21.c: New test.
7152 * tst-cancelx21.c: New test.
7154 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7156 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7157 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7158 * pt-longjmp.c: Include jmpbuf-unwind.h.
7159 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7160 _JMPBUF_UNWINDS. Adjust compared pointers.
7161 * init.c (__pthread_initialize_minimal_internal): Initialize
7162 pd->stackblock_size.
7163 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7164 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7165 * sysdeps/i386/jmpbuf-unwind.h: New file.
7166 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7167 * sysdeps/s390/jmpbuf-unwind.h: New file.
7168 * sysdeps/sh/jmpbuf-unwind.h: New file.
7169 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7170 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7171 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7172 (_JMPBUF_CFA_UNWINDS): Remove.
7173 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7175 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7177 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7178 (CFLAGS-tst-cancelx20.c): Set.
7179 * tst-cancel20.c: New test.
7180 * tst-cancelx20.c: New test.
7182 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7184 * init.c (__pthread_initialize_minimal_internal): Don't treat
7185 architectures with separate register stack special here when
7186 computing default stack size.
7188 2003-12-17 Roland McGrath <roland@redhat.com>
7190 * Makefile (tst-cancelx7-ARGS): New variable.
7191 Reportd by Greg Schafer <gschafer@zip.com.au>.
7193 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7195 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7196 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7197 (tst-stack3-ENV): Set.
7198 ($(objpfx)tst-stack3-mem): New.
7199 * tst-stack3.c: New test.
7201 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7203 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7204 Add unwind directives. Drop unused .regstk directive.
7205 (_fini_EPILOG_BEGINS): Add unwind directives.
7207 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7209 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7210 Assume parameter is a pointer.
7211 (lll_futex_wake): Likewise.
7212 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7214 (lll_futex_wake): Likewise.
7215 Reported by Boris Hu.
7216 * sysdeps/unix/sysv/linux/unregister-atfork.c
7217 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7219 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7221 2003-12-10 Ulrich Drepper <drepper@redhat.com>
7223 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7224 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7225 __rtld_lock_initialize for ld.so lock.
7226 Patch in part by Adam Li <adam.li@intel.com>.
7228 2003-12-02 David Mosberger <davidm@hpl.hp.com>
7230 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7231 in $(gnulib). Also, remove stale comment.
7233 2003-11-12 David Mosberger <davidm@hpl.hp.com>
7235 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7236 advantage of new syscall stub and optimize accordingly.
7238 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7239 from SYS_futex, to match expectations of
7240 sysdep.h:DO_INLINE_SYSCALL.
7241 (lll_futex_clobbers): Remove.
7242 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7243 (lll_futex_wake): Likewise.
7244 (lll_futex_requeue): Likewise.
7245 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7246 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7248 (__lll_mutex_lock): Likewise.
7249 (__lll_mutex_cond_lock): Likewise.
7250 (__lll_mutex_timed_lock): Likewise.
7251 (__lll_mutex_unlock): Likewise.
7252 (__lll_mutex_unlock_force): Likewise.
7254 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7255 comes before the include of <sysdep.h>.
7256 (THREAD_SELF_SYSINFO): New macro.
7257 (THREAD_SYSINFO): Likewise.
7258 (INIT_SYSINFO): New macro.
7259 (TLS_INIT_TP): Call INIT_SYSINFO.
7261 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7263 * sysdeps/pthread/createthread.c (create_thread): Use
7264 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7265 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7266 THREAD_SELF_SYSINFO instead of open code.
7267 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7268 (THREAD_SYSINFO): Likewise.
7270 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7272 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7274 2003-12-06 Ulrich Drepper <drepper@redhat.com>
7276 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7277 instead of .init. Patch by David Mosberger.
7279 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
7281 * sysdeps/pthread/configure.in: Remove broken declaration in C
7282 cleanup handling check.
7284 2003-11-30 Andreas Jaeger <aj@suse.de>
7286 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7287 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7290 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7292 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7293 * pthread_attr_destroy.c: Include shlib-compat.h.
7294 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7295 is set in iattr->flags.
7296 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7298 2003-11-21 Jakub Jelinek <jakub@redhat.com>
7300 * Makefile (distribute): Add tst-cleanup4aux.c.
7302 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7305 2003-11-21 Ulrich Drepper <drepper@redhat.com>
7307 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7308 pthread_cond_signal.
7310 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7311 store mutex address if the current value is ~0l.
7312 * sysdeps/pthread/pthread_cond_timedwait.c
7313 (__pthread_cond_timedwait): Likewise.
7314 * sysdeps/pthread/pthread_cond_broadcast.c
7315 (__pthread_cond_broadcast): Don't use requeue for pshared
7318 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7319 (__pthread_cond_wait): Don't store mutex address if the current
7321 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7322 (__pthread_cond_timedwait): Likewise.
7323 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7324 (__pthread_cond_broadcast): Don't use requeue for pshared
7327 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7328 element with ~0l for pshared condvars, with NULL otherwise.
7330 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7331 (__pthread_cond_wait): Don't store mutex address if the current
7333 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7334 (__pthread_cond_timedwait): Likewise.
7335 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7336 (__pthread_cond_broadcast): Don't use requeue for pshared
7339 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7340 * tst-cond12.c: New file.
7341 * tst-cond13.c: New file.
7343 2003-11-17 Ulrich Drepper <drepper@redhat.com>
7345 * sysdeps/pthread/configure.in: Make missing forced unwind support
7348 2003-11-11 Ulrich Drepper <drepper@redhat.com>
7350 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7352 2003-11-06 Ulrich Drepper <drepper@redhat.com>
7354 * Makefile: Add magic to clean up correctly.
7356 2003-11-05 Jakub Jelinek <jakub@redhat.com>
7358 * unwind.c (FRAME_LEFT): Define.
7359 (unwind_stop): Handle old style cleanups here.
7360 (__pthread_unwind): Handle old style cleanups only if
7361 !HAVE_FORCED_UNWIND.
7362 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7363 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7364 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7365 ($(objpfx)tst-cleanupx4): Likewise.
7366 * tst-cleanup4.c: New test.
7367 * tst-cleanup4aux.c: New.
7368 * tst-cleanupx4.c: New test.
7370 2003-11-04 Ulrich Drepper <drepper@redhat.com>
7372 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7373 lll_mutex_*lock macros to skip atomic operations on some archs.
7375 2003-11-03 Ulrich Drepper <drepper@redhat.com>
7377 * sysdeps/pthread/tst-timer.c (main): Initialize
7378 sigev2.sigev_value as well.
7380 2003-10-15 Roland McGrath <roland@redhat.com>
7382 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7384 * sysdeps/pthread/configure: Regenerated.
7386 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7388 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7389 locking macros. No distinction between normal and mutex locking
7391 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7392 Merge bits from lowlevelmutex.S we still need.
7393 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7394 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7395 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7396 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7397 new mutex implementation.
7398 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7399 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7400 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7401 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7402 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7403 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7404 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7405 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7406 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7407 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7408 symbol for entry point to avoid cancellation.
7410 2003-10-07 Jakub Jelinek <jakub@redhat.com>
7412 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7414 (SAVE_OLDTYPE_0): Fix a typo.
7416 2003-10-03 Ulrich Drepper <drepper@redhat.com>
7418 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7419 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7421 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7423 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7426 2003-10-02 Jakub Jelinek <jakub@redhat.com>
7428 * Makefile (tests): Add tst-cancel19.
7429 * tst-cancel19.c: New test.
7431 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7433 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7434 restoring of the old cancellation type.
7436 2003-09-30 Jakub Jelinek <jakub@redhat.com>
7438 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7440 2003-09-27 Wolfram Gloger <wg@malloc.de>
7442 * sysdeps/pthread/malloc-machine.h: New file
7444 2003-09-24 Roland McGrath <roland@redhat.com>
7446 * allocatestack.c (__make_stacks_executable): Don't ignore return
7447 value from _dl_make_stack_executable.
7449 2003-09-24 Ulrich Drepper <drepper@redhat.com>
7451 * allocatestack.c (__make_stacks_executable): Also change
7452 permission of the currently unused stacks.
7454 * allocatestack.c (change_stack_perm): Split out from
7455 __make_stacks_executable.
7456 (allocate_stack): If the required permission changed between the time
7457 we started preparing the stack and queueing it, change the permission.
7458 (__make_stacks_executable): Call change_stack_perm.
7460 * Makefile: Build tst-execstack-mod locally.
7461 * tst-execstack-mod.c: New file.
7463 2003-09-23 Jakub Jelinek <jakub@redhat.com>
7465 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7467 2003-09-23 Roland McGrath <roland@redhat.com>
7469 * tst-execstack.c: New file.
7470 * Makefile (tests): Add it.
7471 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7472 (LDFLAGS-tst-execstack): New variable.
7474 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7475 whether to use PROT_EXEC for stack mmap.
7476 (__make_stacks_executable): New function.
7477 * pthreadP.h: Declare it.
7478 * init.c (__pthread_initialize_minimal_internal): Set
7479 GL(dl_make_stack_executable_hook) to that.
7481 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7483 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7484 recommendation from AMD re avoidance of lock prefix.
7486 2003-09-22 Jakub Jelinek <jakub@redhat.com>
7488 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7489 lll_futex_timed_wait instead of lll_futex_wait.
7490 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7491 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7492 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7493 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7494 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7495 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7496 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7497 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7498 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7499 Completely revamp the locking macros. No distinction between
7500 normal and mutex locking anymore.
7501 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7502 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7503 __lll_lock_timedwait): Fix prototypes.
7504 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7505 __lll_lock_timedwait): Likewise.
7506 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7507 macros, add __builtin_expect.
7508 (lll_mutex_timedlock): Likewise. Fix return value.
7509 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7510 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7511 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7512 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7513 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7514 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7515 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7516 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7518 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7520 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7521 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7522 operation if possible.
7524 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7525 like jumping over the lock prefix.
7527 2003-09-21 Ulrich Drepper <drepper@redhat.com>
7529 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7530 locking macros. No distinction between normal and mutex locking
7532 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7533 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7534 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7535 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7536 locking. Merge bits from lowlevelmutex.S we still need.
7537 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7538 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7539 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7540 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7541 * Makefile (routines): Remove libc-lowlevelmutex.
7542 (libpthread-rountines): Remove lowlevelmutex.
7543 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7544 for new mutex implementation.
7545 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7546 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7547 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7548 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7549 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7551 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7553 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7554 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7555 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7556 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7557 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7558 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7559 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7560 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7562 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7564 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7565 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7566 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7568 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7569 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7571 2003-09-20 Ulrich Drepper <drepper@redhat.com>
7573 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7574 in parameters of asm with output parameters.
7576 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7577 type of DECR parameter to int.
7578 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7580 2003-09-18 Jakub Jelinek <jakub@redhat.com>
7582 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7583 guardsize for each thread.
7585 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7587 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7588 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7589 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7591 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7592 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7594 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7595 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7596 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7597 (pthread_getaffinity_np): Add hidden_def.
7599 * Makefile (tests): Add tst-attr3.
7600 * tst-attr3.c: New test.
7602 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7604 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7606 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7607 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7609 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7611 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7612 * tst-align.c: Include tst-stack-align.h.
7613 (tf, do_test): Use TEST_STACK_ALIGN macro.
7615 2003-09-17 Ulrich Drepper <drepper@redhat.com>
7617 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7620 2003-09-16 Ulrich Drepper <drepper@redhat.com>
7622 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7623 stack-related values for the initial thread.
7625 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7627 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7629 2003-09-11 Ulrich Drepper <drepper@redhat.com>
7631 * pthread_mutex_lock.c: Minor code rearrangements.
7633 2003-09-05 Roland McGrath <roland@redhat.com>
7635 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7636 Instead, include ../nptl_db/db_info.c to do its magic.
7637 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7638 (__pthread_pthread_key_2ndlevel_size): Likewise.
7639 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7640 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7641 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7642 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7643 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7644 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7645 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7646 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7647 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7648 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7649 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7650 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7651 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7652 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7653 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7654 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7655 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7657 2003-09-08 Ulrich Drepper <drepper@redhat.com>
7659 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7660 of pthread_t to be compatible with LT.
7661 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7662 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7663 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7664 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7665 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7666 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7667 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7669 2003-09-04 Ulrich Drepper <drepper@redhat.com>
7671 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7673 2003-09-04 Jakub Jelinek <jakub@redhat.com>
7675 * unwind-forcedunwind.c: Move to...
7676 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7677 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7678 * sysdeps/pthread/jmpbuf-unwind.h: New file.
7679 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7680 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7681 * unwind.c: Include jmpbuf-unwind.h.
7682 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7684 2003-09-02 Jakub Jelinek <jakub@redhat.com>
7686 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7687 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7688 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7689 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7690 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7691 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7692 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7693 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7694 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7695 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7696 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7698 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7699 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7700 * Makefile (tests): Add tst-stack2.
7701 * tst-stack2.c: New test.
7702 * tst-stack1.c: Include limits.h and sys/param.h.
7703 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7705 * pthread_condattr_setpshared.c: Include errno.h.
7706 (pthread_condattr_setpshared): Return EINVAL if pshared
7707 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7709 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7710 defined symbol for entry point to avoid cancellation.
7711 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7713 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7715 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7717 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7719 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7721 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7722 __close_nocancel, __read_nocancel, __write_nocancel,
7723 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7724 libpthread.so or librt.so, define to corresponding function
7725 without _nocancel suffix.
7726 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7727 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7728 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7730 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7732 2003-09-02 Ulrich Drepper <drepper@redhat.com>
7734 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7735 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7737 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7738 in subsections has a symbol associated with it.
7740 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7741 defined symbol for entry point to avoid cancellation.
7742 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7744 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7746 * Makefile (tests): Add tst-tls5.
7747 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7748 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7749 ($(objpfx)tst-tls5): New.
7750 ($(objpfx)tst-tls6.out): Likewise.
7751 (tests): Depend on $(objpfx)tst-tls6.out.
7752 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7753 (do_test): Check pthread_self () return value alignment.
7754 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7755 (tf): Check pthread_self () return value alignment.
7756 * tst-tls5.c: New test.
7758 * tst-tls5mod.c: New.
7759 * tst-tls5moda.c: New.
7760 * tst-tls5modb.c: New.
7761 * tst-tls5modc.c: New.
7762 * tst-tls5modd.c: New.
7763 * tst-tls5mode.c: New.
7764 * tst-tls5modf.c: New.
7765 * tst-tls6.sh: New test.
7767 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7768 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7769 * init.c (pthread_functions): Initialize them.
7770 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7771 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7772 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7773 pthread_cond_timedwait@@GLIBC_2.3.2.
7775 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7777 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7778 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7779 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7780 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7781 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7782 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7784 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7786 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7787 _POSIX_THREAD_PRIORITY_SCHEDULING.
7788 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7790 2003-08-31 Ulrich Drepper <drepper@redhat.com>
7792 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7793 nested function, use static inline function from libio.h.
7794 Code by Richard Henderson.
7796 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7799 2003-08-30 Jakub Jelinek <jakub@redhat.com>
7801 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7802 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7803 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7804 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7805 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7806 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7807 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7808 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7809 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7810 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7811 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7812 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7813 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7814 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7815 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7816 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7817 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7818 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7819 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7820 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7821 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7822 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7823 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7824 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7825 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7826 * sysdeps/sparc/tls.h: New file.
7827 * sysdeps/sparc/tcb-offsets.sym: New file.
7828 * sysdeps/sparc/Makefile: New file.
7829 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7830 * init.c [__sparc__] (__NR_set_tid_address): Define.
7832 2003-08-29 Jakub Jelinek <jakub@redhat.com>
7834 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7835 _IO_release_lock): Define.
7837 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
7839 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7840 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
7842 2003-08-27 Ulrich Drepper <drepper@redhat.com>
7844 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7845 (__pthread_cleanup_class): Add missing return types of member
7848 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
7850 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7851 (lll_mutex_unlock_force): Add memory barrier between store and futex
7854 2003-08-25 Ulrich Drepper <drepper@redhat.com>
7856 * tst-cancel4.c (do_test): Also unlink tempfname and remove
7857 tempmsg in first loop.
7859 2003-08-18 Ulrich Drepper <drepper@redhat.com>
7861 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7862 _POSIX_THREAD_PRIORITY_SCHEDULING.
7863 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7865 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7867 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7868 (__rtld_lock_default_lock_recursive,
7869 __rtld_lock_default_unlock_recursive): Define.
7870 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7871 __rtld_lock_unlock_recursive): Define using
7872 GL(_dl_rtld_*lock_recursive).
7873 * init.c (__pthread_initialize_minimal_internal): Initialize
7874 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7875 Lock GL(_dl_load_lock) the same number of times as
7876 GL(_dl_load_lock) using non-mt implementation was nested.
7878 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7879 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7881 2003-08-06 Jakub Jelinek <jakub@redhat.com>
7883 * tst-cancel17.c (do_test): Make len2 maximum of page size and
7886 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7888 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7890 2003-08-03 Jakub Jelinek <jakub@redhat.com>
7892 * sysdeps/pthread/createthread.c (do_clone): Move error handling
7893 to first syscall error check. Move syscall error check for tkill
7894 into __ASSUME_CLONE_STOPPED #ifdef.
7896 2003-08-02 Ulrich Drepper <drepper@redhat.com>
7898 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7899 is not defined, do explicit synchronization.
7900 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
7901 is not defined also unlock pd->lock for non-debugging case in case
7903 * pthread_create.c (start_thread): Always get and release pd->lock
7904 if __ASSUME_CLONE_STOPPED is not defined.
7905 (start_thread_debug): Removed. Adjust users.
7906 * allocatestack.c (allocate_stack): Always initialize lock if
7907 __ASSUME_CLONE_STOPPED is not defined.
7908 * Makefile (tests): Add tst-sched1.
7909 * tst-sched1.c: New file.
7911 * sysdeps/pthread/createthread.c (do_clone): Only use
7912 sched_setschduler and pass correct parameters.
7914 2003-07-31 Jakub Jelinek <jakub@redhat.com>
7916 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7917 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7918 PTHREAD_STACK_MIN in comments.
7920 2003-07-31 Jakub Jelinek <jakub@redhat.com>
7922 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7923 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7925 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7926 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7927 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7928 (__pthread_cleanup_upto): Fix prototype.
7929 (_longjmp_unwind): Adjust caller.
7930 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7931 Change second argument to const struct pointer.
7932 * tst-sem8.c (main): Remove unused s2 and s3 variables.
7933 * tst-sem9.c (main): Likewise.
7934 * unwind.c: Include string.h for strlen prototype.
7936 2003-07-31 Ulrich Drepper <drepper@redhat.com>
7938 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7939 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7940 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7942 Patch by Nicholas Miell <nmiell@attbi.com>.
7944 2003-07-30 Jakub Jelinek <jakub@redhat.com>
7946 * init.c (__pthread_initialize_minimal_internal): Initialize
7947 GL(dl_init_static_tls).
7948 * pthreadP.h (__pthread_init_static_tls): New prototype.
7949 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7951 * Makefile (tests): Add tst-tls4.
7952 (modules-names): Add tst-tls4moda and tst-tls4modb.
7953 ($(objpfx)tst-tls4): Link against libdl and libpthread.
7954 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7956 * tst-tls4.c: New file.
7957 * tst-tls4moda.c: New file.
7958 * tst-tls4modb.c: New file.
7960 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
7962 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7963 before __timer_dealloc.
7964 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7965 Don't call list_unlink.
7967 2003-07-29 Roland McGrath <roland@redhat.com>
7969 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7971 2003-07-25 Jakub Jelinek <jakub@redhat.com>
7973 * tst-cancel17.c (do_test): Check if aio_cancel failed.
7974 Don't reuse struct aiocb A if it failed.
7975 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7976 not just one byte, as that does not block.
7978 2003-07-22 Jakub Jelinek <jakub@redhat.com>
7980 * sysdeps/pthread/unwind-resume.c: New file.
7981 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7982 unwind-resume in csu subdir.
7983 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7985 (librt-sysdep_routines, librt-shared-only-routines): Add
7987 * sysdeps/pthread/rt-unwind-resume.c: New file.
7988 * unwind-forcedunwind.c: New file.
7989 * Makefile (libpthread-routines): Add unwind-forcedunwind.
7990 (libpthread-shared-only-routines): Likewise.
7991 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7992 * pthreadP.h (pthread_cancel_init): New prototype.
7993 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7995 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7996 attr argument const struct pthread_attr *.
7998 * res.c (__res_state): Return __resp.
7999 * descr.h: Include resolv.h.
8000 (struct pthread): Add res field.
8001 * pthread_create.c: Include resolv.h.
8002 (start_thread): Initialize __resp.
8003 * Makefile (tests): Add tst-_res1.
8004 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8005 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8006 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8008 * tst-_res1.c: New file.
8009 * tst-_res1mod1.c: New file.
8010 * tst-_res1mod2.c: New file.
8012 2003-07-21 Ulrich Drepper <drepper@redhat.com>
8014 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8016 * Makefile: Define various *-no-z-defs variables for test DSOs
8017 which has undefined symbols.
8019 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8021 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8022 Retry if the stwcx fails to store once_control.
8024 2003-07-20 Ulrich Drepper <drepper@redhat.com>
8026 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8027 pthread_attr_setaffinity.
8028 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8029 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8030 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8031 * pthread_attr_destroy.c: Free cpuset element if allocated.
8032 * pthread_create.c: Pass iattr as additional parameter to
8034 * sysdeps/pthread/createthread.c: If attribute is provided and
8035 a new thread is created with affinity set or scheduling parameters,
8036 start thread with CLONE_STOPPED.
8037 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8038 pthread_attr_setaffinity.
8039 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8042 2003-07-15 Ulrich Drepper <drepper@redhat.com>
8044 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8046 2003-07-14 Ulrich Drepper <drepper@redhat.com>
8048 * sysdeps/pthread/configure.in: Require CFI directives also for
8051 2003-07-15 Jakub Jelinek <jakub@redhat.com>
8053 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8056 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8058 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8060 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8061 registers as variables. Call __pthread_mutex_unlock_usercnt.
8062 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8063 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8064 not self pointer in __writer. Compare with TID to determine
8066 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8067 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8069 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8071 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8072 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8073 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8074 macros also when compiling librt.
8076 2003-07-11 Jakub Jelinek <jakub@redhat.com>
8078 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8079 -fasynchronous-unwind-tables.
8080 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8081 (PSEUDO): Add cfi directives.
8082 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8084 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8087 2003-07-08 Jakub Jelinek <jakub@redhat.com>
8089 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8090 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8091 * unwind.c (__pthread_unwind_next): Add hidden_def.
8092 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8094 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8095 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8096 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8098 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8099 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8101 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8102 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8103 __pthread_unregister_cancel and __pthread_unwind_next.
8105 2003-07-04 Jakub Jelinek <jakub@redhat.com>
8107 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8108 different symbol for the cancellation syscall wrapper and
8109 non-cancellation syscall wrapper.
8110 (PSEUDO_END): Define.
8112 2003-07-05 Richard Henderson <rth@redhat.com>
8114 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8115 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8116 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8117 return actual return value from the syscall, not 0.
8119 2003-07-07 Ulrich Drepper <drepper@redhat.com>
8121 * descr.h (struct pthread): Add pid field.
8122 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8123 (__reclaim_stacks): Likewise.
8124 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8125 also check for PID of the signal source.
8126 (__pthread_initialize_minimal_internal): Also initialize pid field
8127 of initial thread's descriptor.
8128 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8129 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8130 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8131 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8132 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8134 2003-07-05 Ulrich Drepper <drepper@redhat.com>
8136 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8137 Fix use of parameter.
8138 (__libc_cleanup_pop): Likewise.
8140 2003-07-04 Ulrich Drepper <drepper@redhat.com>
8142 * init.c (sigcancel_handler): Change parameters to match handler
8143 for SA_SIGACTION. Check signal number and code to recognize
8144 invalid invocations.
8146 2003-07-03 Roland McGrath <roland@redhat.com>
8148 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8149 Apply sizeof (struct pthread) bias to r13 value.
8151 2003-07-03 Ulrich Drepper <drepper@redhat.com>
8153 * sysdeps/pthread/configure.in: Require CFI directives.
8155 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8157 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8158 libpthread compilation.
8159 * unwind.c (__pthread_unwind): Add hidden_def.
8160 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8162 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8164 * libc-cancellation.c (__libc_cleanup_routine): Define.
8165 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8166 (__pthread_cleanup_pop): Define.
8168 2003-07-01 Richard Henderson <rth@redhat.com>
8170 * sysdeps/alpha/elf/pt-initfini.c: New file.
8171 * sysdeps/alpha/pthread_spin_lock.S: New file.
8172 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8173 * sysdeps/alpha/pthreaddef.h: New file.
8174 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8175 * sysdeps/alpha/tls.h: New file.
8176 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8177 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8178 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8179 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8180 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8181 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8182 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8183 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8184 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8185 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8187 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8189 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8190 cleanup support and unwind info.
8192 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8194 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8195 Use correct cleanup handler registration. Add unwind info.
8196 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8197 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8198 * tst-once3.c: Add cleanup handler and check it is called.
8199 * tst-once4.c: Likewise.
8200 * tst-oncex3.c: New file.
8201 * tst-oncex4.c: New file.
8202 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8204 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8206 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8208 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8210 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8211 (tf_msgsnd): Likewise.
8213 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8214 premature returns a bit more.
8216 2003-06-26 Ulrich Drepper <drepper@redhat.com>
8218 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8219 definition to the front.
8221 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8222 the cleanup functions to make the names unique. Fix dwarf opcode
8224 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8225 functions to make the names unique. Fix CFA offset for two blocks.
8227 2003-06-25 Ulrich Drepper <drepper@redhat.com>
8229 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8230 missing closing braces.
8231 Patch by Christophe Saout <christophe@saout.de>.
8233 2003-06-24 Roland McGrath <roland@redhat.com>
8235 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8237 2003-06-24 Ulrich Drepper <drepper@redhat.com>
8239 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8240 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8242 * pthreadP.h: Declare __find_thread_by_id.
8243 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8244 * pthread_clock_gettime.c: Allow using other thread's clock.
8245 * pthread_clock_settime.c: Likewise.
8246 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8247 * Makefile: Add rules to build and run tst-clock2.
8248 * tst-clock2.c: New file.
8250 2003-06-23 Ulrich Drepper <drepper@redhat.com>
8252 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8253 to use exception-based cleanup handler.
8254 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8256 * tst-cond8.c (ch): Announce that we are done.
8258 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8260 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8261 Also test aio_suspend with timeout value.
8263 2003-06-22 Ulrich Drepper <drepper@redhat.com>
8265 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8266 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8269 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8270 (__pthread_mutex_lock_internal): Likewise.
8271 (__pthread_mutex_unlock_internal): Likewise.
8272 (__pthread_mutex_unlock_usercnt): Declare.
8273 * pthread_mutex_destroy.c: Always fail if used in any way.
8274 * pthread_mutex_init.c: Update comment.
8275 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8276 * pthread_mutex_timedlock.c: Adjust __nusers.
8277 * pthread_mutex_trylock.c: Adjust __nusers.
8278 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8279 and public interfaces are wrapper with pass additional parameter.
8280 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8282 * tst-mutex8.c: New file.
8283 * Makefile (tests): Add tst-mutex8.
8284 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8285 __pthread_mutex_unlock_usercnt.
8286 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8287 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8288 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8289 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8290 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8291 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8292 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8294 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8295 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8296 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8297 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8298 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8300 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8301 * pthread_mutex_timedlock.c: Likewise.
8302 * pthread_mutex_trylock.c: Adjust __nusers.
8303 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8304 * tst-mutex9.c: New file.
8305 * Makefile (tests): Add tst-mutex9.
8306 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8307 * sysdeps/ia64/tls.h: Likewise.
8308 * sysdeps/powerpc/tls.h: Likewise.
8309 * sysdeps/s390/tls.h: Likewise.
8310 * sysdeps/sh/tls.h: Likewise.
8311 * sysdeps/x86_64/tls.h: Likewise.
8312 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8313 Change type of __owner.
8314 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8315 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8316 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8317 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8318 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8320 2003-06-19 Jakub Jelinek <jakub@redhat.com>
8322 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8323 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8325 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8326 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8327 instead of nr to lll_futex_wake. Only set errno and return -1
8330 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8331 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8332 return actual return value from the syscall, not 0.
8334 2003-06-18 Ulrich Drepper <drepper@redhat.com>
8336 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8337 find a random value.
8338 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8341 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8342 compat_timer_settime.
8343 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8344 compat_timer_gettime.
8345 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8346 compat_timer_getoverrun.
8347 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8348 compat_timer_delete.
8350 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8351 error-checking mutex detect busy mutexes.
8353 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8355 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8356 Add ax to clobber list.
8357 (lll_mutex_cond_lock): Likewise.
8358 (lll_mutex_unlock): Likewise.
8359 (lll_lock): Likewise.
8360 (lll_unlock): Likewise.
8362 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8363 * tst-cancel18.c: New file.
8364 * tst-cancelx18.c: New file.
8366 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8369 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8370 * tst-cancel17.c: New file.
8371 * tst-cancelx17.c: New file.
8373 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8374 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8375 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8377 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8379 2003-06-16 Jakub Jelinek <jakub@redhat.com>
8381 * sysdeps/pthread/createthread.c (create_thread): Set
8382 header.multiple_threads unconditionally.
8383 * allocatestack.c (allocate_stack): Likewise.
8384 * descr.h (struct pthread): Add header.multiple_threads
8386 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8387 Define for librt. #error if neither libpthread, libc nor librt.
8388 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8390 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8391 CDISABLE): Likewise.
8392 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8393 CDISABLE): Likewise.
8394 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8395 CDISABLE): Likewise.
8396 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8397 CDISABLE): Likewise. Access header.multiple_threads outside of
8398 libc and libpthread.
8399 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8401 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8402 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8404 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8406 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8407 Also test early cancellation before the thread reaches the cancellation
8410 * Makefile: Compile forward.c with exceptions.
8412 * sysdeps/unix/sysv/linux/sleep.c: New file.
8414 2003-06-16 Ulrich Drepper <drepper@redhat.com>
8416 * Makefile: Add CFLAGS definition to compile function wrappers
8417 duplicated from libc with exceptions.
8418 * tst-cancel4.c: Also check cancellation handlers.
8420 * Makefile: Add rules to build and run tst-cancel16 and
8421 tst-cancelx16. Add missing CFLAGS definitions.
8422 * tst-cancel16.c: New file.
8423 * tst-cancelx16.c: New file.
8425 2003-06-15 Ulrich Drepper <drepper@redhat.com>
8427 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8428 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8429 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8430 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8432 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8433 (LIBC_CANCEL_RESET): Likewise.
8434 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8435 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8437 (CFLAGS-libcrt-cancellation.c): Define.
8438 * sysdeps/pthread/librt-cancellation.c: New file.
8439 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8440 macros also when compiling librt.
8441 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8442 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8443 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8444 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8445 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8446 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8447 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8449 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8450 compat_timer_create.
8452 2003-06-14 Ulrich Drepper <drepper@redhat.com>
8454 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8456 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8458 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8459 Add libc_hidden_def.
8461 2003-06-13 Roland McGrath <roland@redhat.com>
8463 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8464 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8466 2003-06-11 Ulrich Drepper <drepper@redhat.com>
8468 * allocatestack.c (queue_stack): Always inline.
8469 * ptreadhP.h (__do_cancel): Likewise.
8471 2003-06-10 Jakub Jelinek <jakub@redhat.com>
8473 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8476 2003-06-10 Ulrich Drepper <drepper@redhat.com>
8478 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8479 (__pthread_cond_signal): Remove incorrect second addition for
8482 2003-06-09 Ulrich Drepper <drepper@redhat.com>
8484 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8485 (__pthread_cond_signal): Use correct futex pointer in
8486 __lll_mutex_lock_wait call.
8488 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8489 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8491 2003-06-08 Ulrich Drepper <drepper@redhat.com>
8493 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8495 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8498 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8499 hand-written CFI generation code. Since ENTRY/END also initiated
8500 CFI frames this caused two CFI sets to be generated.
8502 2003-06-07 Ulrich Drepper <drepper@redhat.com>
8504 * cleanup_routine.c: New file.
8505 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8506 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8508 * Makefile (libpthread-routines): Add cleanup_routine.
8509 Add more CFLAGS variables to compile with exceptions. Add comments
8510 why which file needs unwind tables.
8511 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8513 * tst-cancelx1.c: New file.
8514 * tst-cancelx2.c: New file.
8515 * tst-cancelx3.c: New file.
8516 * tst-cancelx4.c: New file.
8517 * tst-cancelx5.c: New file.
8518 * tst-cancelx6.c: New file.
8519 * tst-cancelx7.c: New file.
8520 * tst-cancelx8.c: New file.
8521 * tst-cancelx9.c: New file.
8522 * tst-cancelx10.c: New file.
8523 * tst-cancelx11.c: New file.
8524 * tst-cancelx12.c: New file.
8525 * tst-cancelx13.c: New file.
8526 * tst-cancelx14.c: New file.
8527 * tst-cancelx15.c: New file.
8528 * tst-cleanupx0.c: New file.
8529 * tst-cleanupx0.expect: New file.
8530 * tst-cleanupx1.c: New file.
8531 * tst-cleanupx2.c: New file.
8532 * tst-cleanupx3.c: New file.
8534 * tst-cleanup0.c: Make standard compliant.
8535 * tst-cleanup1.c: Likewise.
8537 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8538 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8539 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8540 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8541 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8542 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8543 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8545 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8546 * tst-cancel12.c: New file.
8547 * tst-cancel13.c: New file.
8548 * tst-cancel14.c: New file.
8549 * tst-cancel15.c: New file.
8550 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8553 * tst-cancel1.c: Add some comments.
8555 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8558 2003-06-06 Ulrich Drepper <drepper@redhat.com>
8560 * Makefile (CFLAGS-pthread_cancel.c): Define.
8562 2003-06-05 Ulrich Drepper <drepper@redhat.com>
8564 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8565 Change type of __writer element to int.
8566 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8567 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8568 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8569 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8570 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8571 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8572 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8573 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8574 Compare with TID to determine deadlocks.
8575 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8576 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8577 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8578 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8579 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8580 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8582 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8584 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8585 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8586 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8588 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8590 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8591 * Makefile (tests): Add tst-rwlock12.
8592 * tst-rwlock12.c: New file.
8594 2003-06-05 Jakub Jelinek <jakub@redhat.com>
8596 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8597 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8598 Remove bogus hidden_proto.
8599 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8601 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8602 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8603 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8604 ___lll_mutex_timedlock): Likewise.
8606 2003-06-04 Ulrich Drepper <drepper@redhat.com>
8608 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8609 (__pthread_cond_signal): Add some code to eventually handle
8612 2003-06-01 Ulrich Drepper <drepper@redhat.com>
8614 * Makefile (tests): Add tst-exec4.
8615 (tst-exec4-ARGS): Define.
8616 * tst-exec4.c: New file.
8618 2003-05-31 Ulrich Drepper <drepper@redhat.com>
8620 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8621 Also fail if tv_nsec < 0.
8622 (__lll_timedwait_tid): Likewise.
8623 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8624 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8626 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8628 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8630 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8632 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8634 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8637 * Makefile (tests): Add tst-sem8 and tst-sem9.
8638 * tst-sem8.c: New file.
8639 * tst-sem9.c: New file.
8640 * sem_open.c: Fix creation of in_use record if the file exists but
8643 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8646 * sysdeps/pthread/timer_create.c (timer_create): In case
8647 evp==NULL, assign timer ID to sival_ptr.
8649 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8650 struct pthread_unwind_buf *.
8651 (struct pthread): Likewise for cleanup_jmp_buf element.
8653 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8654 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8655 * unwind.c (__pthread_unwind_next): Likewise.
8657 2003-05-30 Ulrich Drepper <drepper@redhat.com>
8659 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8660 (lll_futex_timed_wait): Use int for futex value parameter.
8661 (lll_futex_wake): Likewise.
8662 (lll_futex_requeue): Likewise.
8664 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8665 Replace one memory operation with one register operation.
8667 * tst-join4.c (do_test): Fix error message.
8669 * tst-rwlock6.c (do_test): Use correct format specifier.
8671 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8672 (__lll_mutex_lock_wait): Replace one memory operation with one
8674 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8675 (__lll_mutex_lock_wait): Likewise.
8677 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8678 (__lll_mutex_cond_lock): Add one to value parameter of
8679 __lll_lock_wait to reflect reality in the futex syscall.
8680 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8681 (lll_mutex_cond_lock): Likewise.
8683 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8685 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8687 (lll_mutex_cond_lock): Define.
8689 2003-05-29 Ulrich Drepper <drepper@redhat.com>
8691 * Makefile (tests): Add tst-signal6.
8692 * tst-signal6.c: New file.
8694 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8695 (__lll_mutex_unlock_force): New function
8696 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8698 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8699 (__lll_mutex_unlock_force): New function.
8700 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8702 * tst-rwlock7.c (do_test): Use correct format specifier.
8704 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8705 Find break parameter in correct asm argument.
8707 2003-05-27 Jakub Jelinek <jakub@redhat.com>
8709 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8711 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8713 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8715 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8716 lll_futex_requeue, lll_mutex_unlock_force): Define.
8718 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8720 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8721 (pthread_cond_t): Add __mutex.
8722 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8723 lll_futex_requeue, lll_mutex_unlock_force): Define.
8725 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8727 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8728 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8730 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8732 (lll_futex_wait, lll_futex_wake): Define.
8733 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8734 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8735 FUTEX_REQUEUE instead of FUTEX_WAIT.
8736 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8737 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8738 mutex which was used in condvar structure. Call
8739 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8740 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8742 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8743 include tcb-offsets.h. Read wakeup value in locked region.
8744 Use the value of gbr register as THREAD_ID.
8745 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8746 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8747 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8749 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8752 2003-05-28 Ulrich Drepper <drepper@redhat.com>
8754 * sysdeps/pthread/pthread_cond_broadcast.c
8755 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8757 2003-05-26 Ulrich Drepper <drepper@redhat.com>
8759 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8760 typo in register name.
8761 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8762 correctly. Actually use requeue. Little optimization.
8763 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8764 mutex address early. Handle cancellation state as 32-bit value.
8765 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8766 Remove unnecessary label.
8768 2003-05-25 Ulrich Drepper <drepper@redhat.com>
8770 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8771 instead of FUTEX_WAIT.
8772 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8773 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8774 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8775 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8776 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8777 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8778 used in condvar structure. Call __pthread_mutex_cond_lock instead
8779 of __pthread_mutex_lock_internal.
8780 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8781 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8782 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8783 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8784 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8785 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8786 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8787 Add pthread_mutex_cond_lock.
8788 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8789 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8790 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8791 lll_mutex_cond_lock.
8792 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8793 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8794 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8796 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8797 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8799 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8800 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8802 * pthreadP.h: Declare __pthread_mutex_cond_lock.
8803 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8804 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
8805 macro don't define aliases.
8807 * cancellation.c: Remove __pthread_enable_asynccancel_2.
8808 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8809 * sysdeps/pthread/pthread_cond_timedwait.c: Use
8810 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8811 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8812 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8813 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8814 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8815 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8817 2003-05-17 Ulrich Drepper <drepper@redhat.com>
8819 * sem_open.c: Fix one endless loop. Implement correct semantics
8820 wrt opening the same semaphore more then once.
8821 * sem_close.c: Adjust for sem_open change.
8822 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
8823 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8824 * Makefile (tests): Add tst-sem7.
8825 * tst-sem7.c: New file.
8827 2003-05-16 Roland McGrath <roland@redhat.com>
8829 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8830 uninitialized variable braino.
8832 2003-05-16 Ulrich Drepper <drepper@redhat.com>
8834 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8835 test for syscall availability.
8837 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8838 __no_posix_timers to -1 if the syscalls don't exist.
8840 * pthread_join.c (pthread_join): Set tid field of the joined
8841 thread to -1. This isn't necessary but helps to recognize some
8842 error conditions with almost no cost.
8844 * allocatestack.c (FREE_P): Also negative values indicate an
8847 * unwind.c: Include <unistd.h>.
8849 2003-05-14 Ulrich Drepper <drepper@redhat.com>
8851 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8853 2003-05-14 Jakub Jelinek <jakub@redhat.com>
8855 * Makefile (crti-objs, crtn-objs): New variables.
8856 (omit-deps, extra-objs): Add crtn.
8857 ($(objpfx)libpthread.so): Depend on both crti and crtn
8858 and links to them in multidir.
8859 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8861 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
8863 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8864 (lll_mutex_unlock): Use atomic_exchange_rel.
8866 2003-05-11 Ulrich Drepper <drepper@redhat.com>
8868 * cond-perf.c (cons): Add missing locking around setting of alldone.
8870 2003-05-10 Ulrich Drepper <drepper@redhat.com>
8872 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8874 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8876 2003-05-09 Ulrich Drepper <drepper@redhat.com>
8878 * tst-sem6.c: New file.
8879 * Makefile (tests): Add tst-sem6.
8881 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8882 Use atomic_exchange_rel instead of atomic_exchange.
8883 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8886 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8887 code for lll_futex_wait and lll_futex_wake in static apps. Use
8888 vsyscall is possible.
8890 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8891 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8892 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8893 pthread_setaffinity_np.
8894 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8895 and pthread_setaffinity_np.
8896 * Makefile (libpthread-routines): Add pthread_getaffinity and
8897 pthread_setaffinity.
8899 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8900 use it in case mmap to allocate the stack fails.
8901 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8902 ARCH_MAP_FLAGS here.
8903 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8906 2003-05-08 Ulrich Drepper <drepper@redhat.com>
8908 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8909 handler implementation. It is now lockless in fork().
8910 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8911 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8912 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
8913 declare the __fork_*_lists.
8914 (struct fork_handler): Include pointers to all three functions.
8915 Add next, refcntr and need_signal elements.
8916 (__fork_handlers): New declaration.
8917 (__register_atfork_malloc): Remove declaration.
8918 (HAVE_register_atfork_malloc): Remove definition.
8919 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8920 __pthread_child_handler variable.
8921 (__libc_pthread_init): Use __register_atfork instead of explicitly
8923 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8925 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8927 * unwind.c (unwind_cleanup): Print error message and then abort. This
8928 function must never be reached.
8930 * cond-perf.c: New file.
8932 2003-05-05 Ulrich Drepper <drepper@redhat.com>
8934 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8936 2003-05-04 Roland McGrath <roland@redhat.com>
8938 * Makefile ($(objpfx)../libc.so): New target.
8940 2003-05-02 Ulrich Drepper <drepper@redhat.com>
8942 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8943 (pthread_condattr_t): Size is only an int, don't use long for
8945 (pthread_mutexattr_t): Likewise.
8946 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8947 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8948 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8950 2003-05-01 Ulrich Drepper <drepper@redhat.com>
8952 * sysdeps/i386/tls.h: Define THREAD_ID.
8953 * sysdeps/ia64/tls.h: Likewise.
8954 * sysdeps/powerpc/tls.h: Likewise.
8955 * sysdeps/s390/tls.h: Likewise.
8956 * sysdeps/sh/tls.h: Likewise.
8957 * sysdeps/x86_64/tls.h: Likewise.
8958 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8960 * pthread_mutex_timedlock.c: Likewise.
8961 * pthread_mutex_trylock.c: Likewise.
8962 * pthread_mutex_unlock.c: Likewise.
8963 * pthread_rwlock_trywrlock.c: Likewise.
8964 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8965 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8966 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8967 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8969 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8972 2003-04-29 Jakub Jelinek <jakub@redhat.com>
8974 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8975 (__SIZEOF_PTHREAD_COND_T): Define to 48.
8976 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8977 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8978 Make __align long long instead of long.
8979 (pthread_rwlock_t): Formatting.
8980 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8981 (pthread_rwlock_t): Formatting.
8982 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8983 (pthread_cond_t): Make __align long long instead of long.
8984 (pthread_rwlock_t): Move __flags field to the same position as in
8987 2003-04-30 Ulrich Drepper <drepper@redhat.com>
8989 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8990 * tst-rwlock7.c (do_test): Likewise.
8992 2003-04-26 Roland McGrath <roland@redhat.com>
8994 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8996 2003-04-22 Jakub Jelinek <jakub@redhat.com>
8998 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8999 sizeof (struct pthread).
9000 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9002 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9004 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9006 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9008 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9010 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9012 (NO_TLS_OFFSET): Define.
9013 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9014 add TLS_TCB_SIZE unnecessarily.
9016 2003-04-22 Roland McGrath <roland@redhat.com>
9018 * Makeconfig (shared-thread-library): Reverse link order to work
9021 2003-04-22 Ulrich Drepper <drepper@redhat.com>
9023 * semaphore.h: Fix typo in comment.
9025 2003-04-21 Ulrich Drepper <drepper@redhat.com>
9027 * sysdeps/pthread/sigfillset.c: New file.
9029 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9030 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9031 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9032 * sysdeps/pthread/sigaction.c: Likewise.
9033 * sysdeps/pthread/sigprocmask.c: New file.
9034 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9036 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9037 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9040 2003-04-19 Ulrich Drepper <drepper@redhat.com>
9042 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9043 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9045 * sysdeps/unix/sysv/linux/unregister-atfork.c
9046 (__unregister_atfork): Don't free memory not allocated dynamically.
9048 * semaphore.h: Remove __THROW marker from cancellation points.
9049 * nptl/sysdeps/pthread/pthread.h: Likewise.
9051 2003-04-18 Ulrich Drepper <drepper@redhat.com>
9053 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9054 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9057 2003-04-16 Jakub Jelinek <jakub@redhat.com>
9059 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9061 2003-04-15 Roland McGrath <roland@redhat.com>
9063 * forward.c (__pthread_unwind): Tweak to avoid warning.
9065 2003-04-15 Ulrich Drepper <drepper@redhat.com>
9067 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9069 2003-04-14 Ulrich Drepper <drepper@redhat.com>
9071 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9072 overflow CFA advance instructions.
9073 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9075 2003-04-14 Jakub Jelinek <jakub@redhat.com>
9077 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9078 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9079 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9082 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9083 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9084 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9085 DW_CFA_advance_loc for .Laddl-.Lsubl.
9087 2003-04-13 Ulrich Drepper <drepper@redhat.com>
9089 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9090 position-independent unwind data for static libraries.
9091 Add missing unwind info. Add comments.
9093 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9094 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9095 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9096 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9098 2003-04-12 Ulrich Drepper <drepper@redhat.com>
9100 * Makefile: Make sure all cancellation points are compiled with
9101 exception and asynchronous unwind tables.
9103 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9104 which mishandles loading of global object addresses in PIC.
9105 (THREAD_SETMEM_NC): Likewise.
9107 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9109 * pthread.h: Define new data structure for cleanup buffer. Declare
9110 new cleanup handler interfaces.
9111 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9112 (struct pthread): Add cleanup_jmp_buf pointer. Define
9113 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9114 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9115 it. Declare old cleanup handler installation functions.
9116 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9118 * cleanup_defer.c: Likewise.
9119 * cleanup_compat.c: New file. Old cleanup code.
9120 * cleanup_def_compat.c: New file. Old cleanup code.
9121 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9122 if own thread descriptor.
9123 * unwind.c: New file.
9124 * forward.c: Add __pthread_unwind.
9125 * init.c (pthread_functions): Add __pthread_unwind.
9126 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9127 Add ptr___pthread_unwind.
9128 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9129 and unwind function.
9130 * Makefile (libpthread-routines): Add cleanup_compat,
9131 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9132 table generation if necessary.
9133 * version.c: Record whether unwind support is compiled in.
9134 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9135 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9137 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9138 complication to generate unwind information for syscall wrappers.
9139 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9140 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9141 __cleanup_fct_attribute.
9143 * Makefile: Add rules to build and run tst-cleanup0.
9144 * tst-cleanup0.c: New file.
9145 * tst-cleanup0.expect: New file.
9147 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9148 caller. Optimize to avoid often unecessary local variable.
9150 2003-04-11 Roland McGrath <roland@redhat.com>
9152 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9153 sets variable `multidir'; include that.
9154 (generated): Add it.
9155 ($(objpfx)$(multidir)/crti.o): New target.
9156 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9158 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9160 * tst-attr2.c (do_test): Add cast to avoid warning.
9161 * tst-mutex4.c (do_test): Likewise.
9163 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9165 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9168 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9170 * Makefile (tests): Add tst-detach1.
9171 * tst-detach1.c: New file.
9173 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9175 * sysdeps/pthread/pthread.h: Remove duplicate
9176 pthread_cleanup_{push,pop} definitions.
9178 * tst-barrier2.c: Eliminate warnings.
9179 * tst-cancel4.c: Likewise.
9180 * tst-cond4.c: Likewise.
9181 * tst-cond6.c: Likewise.
9182 * tst-detach1.c: Likewise.
9183 * tst-rwlock4.c: Likewise.
9184 * tst-rwlock6.c: Likewise.
9185 * tst-rwlock7.c: Likewise.
9186 * tst-sem3.c: Likewise.
9187 * tst-spin2.c: Likewise.
9188 * tst-umask1.c: Likewise.
9190 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9192 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9194 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9196 * descr.h (struct pthread): Move cancelhandling member to the front.
9198 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9200 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9201 malloc_parent, and malloc_child statically.
9202 (__register_atfork_malloc): New function.
9203 (free_mem): Don't free any of the malloc_* variables on the list.
9204 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9205 Define HAVE_register_atfork_malloc.
9207 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9209 * sysdeps/pthread/createthread.c (create_thread): Add some more
9210 comments explaining when to set multiple_threads and when not.
9212 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9213 THREAD_ATOMIC_BIT_SET if not already defined.
9214 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9215 THREAD_ATOMIC_BIT_SET:
9216 * sysdeps/x86_64/tls.h: Likewise.
9217 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9218 THREAD_ATOMIC_CMPXCHG_VAL.
9219 (_pthread_cleanup_pop_restore): Likewise.
9220 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9221 (__pthread_enable_asynccancel_2): Likewise.
9222 (__pthread_disable_asynccancel): Likewise.
9223 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9224 (__libc_disable_asynccancel): Likewise.
9225 * init.c (sigcancel_handler): Likewise.
9226 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9227 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9229 2003-04-03 Ulrich Drepper <drepper@redhat.com>
9231 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9232 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9233 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9234 * Makefile (tests): Add tst-cancel11.
9235 * tst-cancel11.c: New file.
9237 2003-04-01 Ulrich Drepper <drepper@redhat.com>
9239 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9240 round, not the first. Use specific_used flag instead of local
9241 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9242 (__free_tcb): Don't call deallocate_tsd here.
9243 (start_thread): Call deallocate_tsd here.
9244 * pthread_setspecific.c: Set specific_used flag really only when
9246 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9247 * tst-tsd3.c: New file.
9248 * tst-tsd4.c: New file.
9250 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9252 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9253 Use atomic_exchange_and_add instead of __lll_add.
9254 (__lll_mutex_timedlock): Likewise.
9255 Patch by Ian Wienand.
9257 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9259 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9260 (SINGLE_THREAD_P): Fix typo.
9261 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9263 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9265 * Makefile (tests): Add tst-align.
9266 * tst-align.c: New file.
9267 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9269 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9272 * tst-tsd2.c: Add casts to avoid warnings.
9274 2003-03-30 Ulrich Drepper <drepper@redhat.com>
9276 * descr.h (struct pthread): Move most often used elements to the front.
9278 2003-03-29 Ulrich Drepper <drepper@redhat.com>
9280 * Makefile (libpthread-routines): Add pthread_atfork.
9281 (libpthread-static-only-routines): Add pthread_atfork.
9283 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9285 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9287 (INSTALL_DTV): Add parens.
9288 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9289 Use passed descr instead of THREAD_SELF.
9290 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9291 (__lll_mutex_timedlock_wait): Correct expected value after
9293 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9294 Release lock before waking up the waiters.
9295 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9296 criteria. Reorderstruct passed to cleanup handler. Fix
9297 handling of cancellation and failung pthread_mutex_unlock call.
9298 Use __pthread_enable_asynccancel_2 instead of
9299 __pthread_enable_asynccancel.
9300 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9301 Return result of lock re-get if it fails.
9302 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9303 for __pthread_cleanup_push.
9304 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9305 completely broken rwlock implementation.
9306 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9307 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9308 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9309 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9310 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9311 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9312 versioned_symbol macro.
9313 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9314 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9316 2003-03-27 Ulrich Drepper <drepper@redhat.com>
9318 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9319 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9321 (struct timer): Remove th and bar field.
9322 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9323 debugging code. Create only one helper thread.
9324 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9326 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9327 Renamed. Define statically. Use thread info from siginfo.
9328 (__helper_once): New variable.
9329 (__helper_tid): New variable.
9330 (__reset_helper_control): New function.
9331 (__start_helper_thread): New function.
9333 * pthread_create.c (start_thread): Don't use setjmp inside
9334 __builtin_expect to work around gcc bug.
9336 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9337 timer_delete syscall fails, but not with ENOSYS, set
9340 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9341 (timer_settime): Fix typo.
9342 * sysdeps/unix/sysv/linux/timer_getoverr.c
9343 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9345 2003-03-27 Jakub Jelinek <jakub@redhat.com>
9347 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9348 offset of cleanupbuf.__prev.
9350 2003-03-26 Jakub Jelinek <jakub@redhat.com>
9352 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9355 2003-03-26 Ulrich Drepper <drepper@redhat.com>
9357 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9358 NULL provide default definition to syscall.
9360 2003-03-25 Roland McGrath <roland@redhat.com>
9362 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9363 (timer_id2ptr): Fix typo.
9365 2003-03-25 Ulrich Drepper <drepper@redhat.com>
9367 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9368 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9369 * sysdeps/ia64/pthreaddef.h: Likewise.
9370 * sysdeps/powerpc/pthreaddef.h: Likewise.
9371 * sysdeps/s390/pthreaddef.h: Likewise.
9372 * sysdeps/sh/pthreaddef.h: Likewise.
9373 * sysdeps/x86_64/pthreaddef.h: Likewise.
9374 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9375 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9377 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9378 SIGTIMER is not unblocked.
9379 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9381 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9383 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9384 pass pointer through as ID.
9385 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9386 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9387 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9388 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9389 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9390 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9391 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9392 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9393 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9394 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9395 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9396 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9397 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9398 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9399 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9400 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9401 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9402 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9403 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9404 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9405 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9406 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9407 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9408 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9409 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9410 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9411 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9412 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9413 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9414 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9415 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9416 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9417 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9419 * pthreadP.h: Remove FRAME_LEFT definition.
9420 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9421 already left frame. Programs which have this problem are not POSIX
9423 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9425 2003-03-24 Ulrich Drepper <drepper@redhat.com>
9427 * sysdeps/pthread/tst-timer.c: Check return values of the
9430 2003-03-23 Roland McGrath <roland@redhat.com>
9432 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9433 * tst-tls3mod.c: Likewise.
9434 * tst-tls1.c: Likewise.
9435 * tst-tls2.c: Likewise.
9437 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9440 * tst-join5.c (tf1, tf2): Add a cast.
9442 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9444 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9445 Don't test anything.
9446 * tst-cond4.c: Likewise.
9447 * tst-cond6.c: Likewise.
9448 * tst-flock2.c: Likewise.
9449 * tst-mutex4.c: Likewise.
9450 * tst-rwlock4.c: Likewise.
9451 * tst-signal1.c: Likewise.
9452 * tst-spin2.c: Likewise.
9453 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9455 * tst-mutex4.c: Use test-skeleton.c.
9456 * tst-spin2.c: Likewise.
9457 * tst-sysconf.c: Likewise.
9458 * tst-barrier2.c: Likewise.
9459 * tst-cond4.c: Likewise.
9460 * tst-cond6.c: Likewise.
9461 * tst-rwlock4.c: Likewise.
9462 * tst-unload.c: Likewise.
9463 * tst-flock2.c (do_test): Use return instead of exit.
9465 2003-03-22 Jakub Jelinek <jakub@redhat.com>
9467 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9469 2003-03-21 Ulrich Drepper <drepper@redhat.com>
9471 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9472 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9473 instead of __lll_compare_and_swap.
9474 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9476 Removed definition if __lll_compare_and_swap.
9478 * cancellation.c: Adjust for new form of compare&exchange macros.
9479 * cleanup_defer.c: Likewise.
9481 * libc-cancellation.c: Likewise.
9482 * old_pthread_cond_broadcast.c: Likewise.
9483 * old_pthread_cond_signal.c: Likewise.
9484 * old_pthread_cond_timedwait.c: Likewise.
9485 * old_pthread_cond_wait.c: Likewise.
9486 * pthread_cancel.c: Likewise.
9487 * pthread_create.c: Likewise.
9488 * pthread_detach.c: Likewise.
9489 * pthread_join.c: Likewise.
9490 * pthread_key_delete.c: Likewise.
9491 * pthread_setcancelstate.c: Likewise.
9492 * pthread_setcanceltype.c: Likewise.
9493 * pthread_timedjoin.c: Likewise.
9494 * pthread_tryjoin.c: Likewise.
9495 * sysdeps/pthread/createthread.c: Likewise.
9497 2003-03-20 Ulrich Drepper <drepper@redhat.com>
9499 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9500 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9501 definitions. Replace uses with calls to atomic_* functions.
9502 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9503 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9504 __lll_test_and_set calls with atomic_exchange_and_add and
9505 atomic_exchange calls respectively.
9506 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9507 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9508 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9509 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9510 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9511 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9512 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9514 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9515 returns the old value.
9517 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9519 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9520 int for variable OLDVAL and correct inline assembler contraint.
9521 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9522 type int for variable OLD.
9524 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9526 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9527 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9528 instead of multiple_threads field in the TCB.
9530 2003-03-19 Ulrich Drepper <drepper@redhat.com>
9532 * sysdeps/i386/i686/bits/atomic.h: Removed.
9533 * sysdeps/i386/i586/bits/atomic.h: Removed.
9534 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9535 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9536 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9537 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9538 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9539 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9540 * atomic.h: Removed. Moved to glibc.
9542 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9543 support for clock selection.
9545 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9548 2003-03-18 Roland McGrath <roland@redhat.com>
9550 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9551 Add __lll_rel_instr first. Add memory clobber.
9552 (lll_mutex_unlock): Use __lll_test_and_set.
9553 From Paul Mackerras <paulus@samba.org>.
9555 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9557 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9558 (SINGLE_THREAD_P): Add `header.' prefix.
9559 From Paul Mackerras <paulus@samba.org>.
9561 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9562 pthread_timedjoin_np to ...
9563 (libpthread: GLIBC_2.3.3): ... here.
9564 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9566 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9567 Avoid shadowing VAL variable.
9569 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9572 2003-03-18 Ulrich Drepper <drepper@redhat.com>
9574 * Makefile (tests): Add tst-cond11.
9575 * tst-cond11.c: New file.
9577 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9578 struct passed to cleanup handler to eliminate one more
9580 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9582 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9583 (pthrad_cond_t): Replace __unused field with __clock.
9585 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9586 waken all waiters in cleanup handler.
9587 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9588 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9590 * pthread_condattr_getclock.c: New file.
9591 * pthread_condattr_setclock.c: New file.
9592 * sysdeps/pthread/pthread.h: Declare these new functions.
9593 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9594 * Makefile (libpthread-routines): Add the new functions.
9595 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9596 Renamed field to value. Document use of the bits.
9597 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9599 * pthread_condattr_setpshared.c: Likewise.
9600 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9601 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9602 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9604 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9605 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9606 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9607 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9608 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9609 Implement clock selection.
9610 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9611 * pthread-errnos.sym: Add ENOSYS.
9612 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9613 _POSIX_CLOCK_SELECTION.
9614 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9616 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9617 invalid .size directive.
9619 2003-03-17 Roland McGrath <roland@redhat.com>
9621 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9624 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9626 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9627 Use __lll_add instead of spelling it out. Use protected symbol names.
9628 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9630 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9631 Renamed from lll_compare_and_swap. Use new name where necessary.
9632 (__lll_add): Defined.
9633 (__lll_dec_if_positive): Defined.
9634 (__lll_test_and_set): Defined.
9635 * sysdeps/ia64/pthread_spin_init.c: Removed.
9636 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9637 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9638 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9639 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9640 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9641 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9642 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9643 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9644 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9645 __sync_lock_release_si.
9646 Patch by Jakub Jelinek.
9648 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9649 Fix timeout handling.
9650 (__lll_timedwait_tid): Likewise.
9651 (lll_unlock_wake_cb): Wake up other waiters if necessary.
9652 Patch by Jakub Jelinek.
9654 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9656 2003-03-17 Roland McGrath <roland@redhat.com>
9658 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9659 * sysdeps/pthread/pthread_spin_init.c: New file.
9660 * sysdeps/pthread/pthread_spin_unlock.c: New file.
9661 * sysdeps/powerpc/Makefile: New file.
9662 * sysdeps/powerpc/pthread_spin_lock.c: New file.
9663 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9664 * sysdeps/powerpc/pthreaddef.h: New file.
9665 * sysdeps/powerpc/tcb-offsets.sym: New file.
9666 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9667 * sysdeps/powerpc/tls.h: New file.
9668 * sysdeps/powerpc/bits/atomic.h: New file.
9669 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9670 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9671 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9673 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9674 * sysdeps/unix/sysv/linux/sem_post.c: New file.
9675 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9676 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9677 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9678 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9679 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9680 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9681 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9682 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9683 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9684 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9685 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9686 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9687 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9689 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9691 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9692 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9693 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9694 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9695 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9697 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9699 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9700 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9701 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9702 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9703 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9705 2003-03-16 Roland McGrath <roland@redhat.com>
9707 * tst-fork4.c: Include <string.h>.
9708 * tst-signal2.c: Likewise.
9709 * tst-mutex5.c (do_test): exit -> return.
9710 * tst-mutex2.c: Include <stdlib.h>.
9712 2003-03-16 Ulrich Drepper <drepper@redhat.com>
9714 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9715 (__lll_mutex_timedlock_wait): Correct expected value after
9716 spurious wakeup. Otherwise we would never wait again.
9718 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9719 zone versus inline asm stupidity. Use correct instructions.
9721 * tst-rwlock6.c: Add some more status output.
9723 2003-03-15 Roland McGrath <roland@redhat.com>
9725 * sysdeps/pthread/configure.in: New file.
9726 * sysdeps/pthread/configure: New file (generated).
9728 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9730 * allocatestack.c (allocate_stack): Store the exact stack size of
9731 user allocated stacks.
9733 2003-03-15 Jakub Jelinek <jakub@redhat.com>
9735 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9736 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9737 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9738 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9739 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9740 Use `header.' prefix.
9741 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9743 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9745 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9746 __builtin_frame_address, use stack pointer.
9748 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9749 instead of __builtin_frame_pointer.
9751 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9753 * tst-basic1.c (do_test): Add cast to avoid warning.
9754 * tst-basic2.c (do_test): Likewise.
9756 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9757 amount of stack correction.
9759 * tst-fork4.c: Use test-skeleton.c.
9761 2003-03-14 Roland McGrath <roland@redhat.com>
9763 * init.c: Fix typo "#eli" for "#else".
9765 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9767 * allocatestack.c (__stack_user): Use hidden_data_def.
9768 * pthread_create.c (__pthread_keys): Likewise.
9770 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9772 2003-03-14 Roland McGrath <roland@redhat.com>
9774 * tst-fork4.c: New file.
9775 * Makefile (tests): Add it.
9777 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9778 we always define the padding space.
9779 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9780 stopped supporting its own extensions fully.
9781 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9782 struct also called `header', so `header.multiple_threads' is the field
9783 name to use on all machines.
9784 * allocatestack.c (allocate_stack): Use `header.' prefix.
9785 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9786 * pthread_create.c (__pthread_create_2_1): Likewise.
9787 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9788 (THREAD_SELF): Likewise.
9789 * sysdeps/x86_64/tls.h: Likewise.
9790 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9791 (SINGLE_THREAD_P): Likewise.
9792 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9793 (SINGLE_THREAD_P): Likewise.
9794 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9795 (SINGLE_THREAD_P): Likewise.
9797 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9800 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9802 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9803 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9805 * pthread_create.c (start_thread): setjmp is expected to return 0.
9807 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9808 (THREAD_GETMEM_NC): Likewise.
9810 2003-03-13 Ulrich Drepper <drepper@redhat.com>
9812 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9813 and the size of the stack which must be allocated is a multiple,
9814 allocate one more page.
9815 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9816 MULTI_PAGE_ALIASING.
9818 2003-03-13 Roland McGrath <roland@redhat.com>
9820 * pthread_create.c (start_thread): Set EXITING_BIT after the
9821 event-reporting (and destructors), not before.
9823 2003-03-13 Jakub Jelinek <jakub@redhat.com>
9825 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9826 lll_futex_wake): Declare register variables as long int instead of
9827 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9828 Make syscall arguments clobbered by the syscall.
9829 (lll_futex_wait): Define using lll_futex_timed_wait.
9831 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9834 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9837 * allocatestack.c (nptl_ncreated): Only declare if
9838 COLORING_INCREMENT != 0.
9840 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9841 (__libc_enable_asynccancel_2): Remove prototype.
9843 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9844 ctid to match kernel.
9846 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9848 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9849 libc_multiple_threads.
9850 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9851 __libc_multiple_threads to...
9852 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
9854 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9856 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9857 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9859 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9860 (__pthread_once_internal): Define.
9862 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9863 macros instead of .symver directly.
9864 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9865 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9867 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9868 * sysdeps/x86_64/tcb-offsets.sym: New file.
9869 * sysdeps/x86_64/Makefile: New file.
9871 * sysdeps/i386/tcb-offsets.sym: Add SELF.
9872 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9873 to access own pthread_t in TCB.
9874 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9876 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9878 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9880 2003-03-12 Roland McGrath <roland@redhat.com>
9882 * pthread-errnos.sym: New file.
9883 * Makefile (gen-as-const-headers): New variable, list that file.
9884 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9885 header <pthread-errnos.h> instead of defining errno values here.
9886 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9887 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9888 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9889 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9890 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9892 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9894 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9895 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9896 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9897 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9898 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9899 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9900 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9901 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9902 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9903 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9904 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9905 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9906 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9907 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9908 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9909 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9910 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9911 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9912 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9913 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9914 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9915 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9916 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9917 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9918 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9919 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9920 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9922 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9923 CLONE_CHILD_SETTID worked.
9925 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9927 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9929 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9932 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9933 (pthread_cond_t): Add padding.
9935 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9936 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9937 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9939 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9940 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9941 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9942 (__pthread_rwlock_timedrdlock): Likewise.
9943 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9944 (__pthread_rwlock_wrlock): Likewise.
9945 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9946 (__pthread_rwlock_rdlock): Likewise.
9948 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9950 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9951 result of lock re-get if it fails.
9953 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9955 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9956 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9957 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9958 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9959 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9960 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9961 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9962 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9963 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9964 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9966 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9967 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9969 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9970 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9971 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9972 (create_thread): Likewise.
9973 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9974 * init.c (__pthread_initialize_minimal_internal): Initialize
9975 __libc_multiple_threads_ptr if necessary.
9976 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
9977 __pthread_multiple_threads and __libc_multiple_threads_ptr.
9978 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9979 __libc_multiple_threads.
9980 (__libc_pthread_init): Return pointer to __libc_pthread_init if
9983 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9984 (THREAD_SETMEM_NC): Likewise.
9986 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9987 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9988 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9989 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9991 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9992 Eliminate one entire instruction.
9994 * cancellation.c (__pthread_enable_asynccancel_2): New function.
9995 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9996 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9997 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9998 instead of __pthread_enable_asynccancel.
9999 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10000 (__pthread_cond_wait): Likewise.
10001 * sysdeps/pthread/pthread_cond_timedwait.c
10002 (__pthread_cond_timedwait): Likewise.
10003 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10005 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10006 (__condvar_cleanup): Wake up all waiters in case we got signaled
10007 after being woken up but before disabling asynchronous
10009 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10010 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10011 (__condvar_cleanup): Likewise.
10013 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10014 Make it an error if architecture has no #if case. Add x86-64.
10016 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10017 pt-initfini.s generation.
10019 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10020 (TLS_INIT_TP): Fix typo.
10022 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10024 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10025 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10027 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10028 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10029 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10030 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10031 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10032 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10033 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10034 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10036 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10038 * sysdeps/pthread/pthread_cond_timedwait.c
10039 (__pthread_cond_timedwait): Return the result of the final
10040 locking. If it succeeds, the regular function return value.
10042 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10043 Return result of the final locking.
10044 * version.c (__nptl_main): Work around problems with the strange
10045 INTERNAL_SYSCALL macro on ppc32.
10046 * init.c (__pthread_initialize_minimal_internal): Unblock
10047 SIGCANCEL in case the parent blocked it.
10048 Reported by Paul Mackerras <paulus@samba.org>.
10050 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10051 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10052 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10054 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10056 * sysdeps/pthread/pthread_cond_timedwait.c
10057 (__pthread_cond_timedwait): Unlock and fail if
10058 __pthread_mutex_unlock_internal failed.
10060 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10061 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10063 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10064 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10065 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10066 ALLOCATE_STACK): New macros.
10067 (TLS_TPADJ): New macro.
10068 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10069 (allocate_stack): Handle TLS_DTV_AT_TP and
10070 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10071 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10072 Don't set PD->self.
10073 * init.c [__ia64__] (__NR_set_tid_address): Define.
10075 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10076 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10077 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10078 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10079 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10080 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10081 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10082 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10083 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10084 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10085 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10086 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10087 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10088 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10089 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10090 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10091 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10092 * sysdeps/ia64/bits/atomic.h: New file.
10093 * sysdeps/ia64/Makefile: New file.
10094 * sysdeps/ia64/pthread_spin_init.c: New file.
10095 * sysdeps/ia64/pthread_spin_lock.c: New file.
10096 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10097 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10098 * sysdeps/ia64/pthreaddef.h: New file.
10099 * sysdeps/ia64/tcb-offsets.sym: New file.
10100 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10101 * sysdeps/ia64/tls.h: New file.
10103 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10104 to syscall instead of no arguments.
10106 2003-03-10 Ulrich Drepper <drepper@redhat.com>
10108 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10109 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10110 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10111 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10113 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10116 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10118 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10119 lowlevelbarrier.sym.
10120 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10121 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10122 Include lowlevelbarrier.h and don't define offsets locally.
10123 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10125 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10126 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10127 (__lll_mutex_timedlock_wait): Likewise.
10128 (lll_mutex_lock): Adjust asm for that.
10129 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10130 (lll_lock): Adjust asm for operand order change.
10131 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10132 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10134 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10135 Reverse order of parameters.
10136 (__lll_timedwait_tid): Remove regparms attribute.
10137 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10138 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10140 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10141 (__lll_timedwait_tid): Remove one unnecessary instruction.
10143 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10144 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10145 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10148 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10149 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10151 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10154 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10155 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10157 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10158 define LOCK here (if UP is not defined). The actual code is in
10161 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10162 LOCK is already defined. Don't define lll_unlock_wake_cb and
10163 __lll_timedwait_tid for libc.so.
10164 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10165 define LOCK here (if UP is not defined). The actual code is in
10168 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10169 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10170 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10171 instead of lowlevelsem.h.
10172 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10173 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10174 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10176 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10177 lowlevelrwlock.sym.
10178 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10179 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10180 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10182 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10184 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10185 last changed. D'oh.
10187 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10189 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10190 of __libc_locking_needed.
10191 (lll_trylock): Initialize %eax to zero.
10193 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10194 pthread_cond_t definition.
10196 2003-03-10 Roland McGrath <roland@redhat.com>
10198 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10199 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10200 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10201 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10202 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10204 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10205 Instead of setting PD->multiple_threads, set globals
10206 __pthread_multiple_threads and __libc_multiple_threads.
10207 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10208 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10209 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10211 * descr.h (struct pthread): Conditionalize first member on
10212 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10213 containing an anonymous tcbhead_t. Move `list' member out.
10214 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10215 * allocatestack.c: Remove use of `header.data.' prefix.
10216 * pthread_create.c: Likewise.
10217 * init.c (__pthread_initialize_minimal_internal): Likewise.
10218 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10219 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10220 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10221 * sysdeps/x86_64/tls.h: Likewise.
10222 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10223 (SINGLE_THREAD_P): Likewise.
10224 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10225 (SINGLE_THREAD_P): Likewise.
10226 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10227 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10229 2003-03-09 Ulrich Drepper <drepper@redhat.com>
10231 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10233 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10234 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10236 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10237 leftovers from the ia32 code.
10239 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10241 (clear_once_control): Don't load %esi.
10243 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10246 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10248 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10249 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10251 * Makefile (tests): Add tst-cond10.
10252 * tst-cond10.c: New file.
10254 2003-03-08 Ulrich Drepper <drepper@redhat.com>
10256 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10257 * tst-signal3.c (do_test): Likewise.
10258 * tst-sem5.c (do_test): Likewise.
10259 * tst-kill6.c (do_test): Likewise.
10260 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10262 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10264 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10265 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10266 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10267 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10268 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10269 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10270 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10272 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10274 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10275 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10276 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10277 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10278 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10279 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10280 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10281 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10283 * allocatestack.c (allocate_stack): If mprotect() fails free the
10286 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10288 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10290 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10291 lll_wake_tid. This was used only to work around kernel limits in
10293 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10294 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10295 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10296 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10298 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10299 (__pthread_initialize_minimal_internal): Change initialization of
10300 __static_tls_align_m1 appropriately.
10301 * pthreadP.h (__static_tls_align_m1): Renamed from
10302 __static_tls_align.
10303 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10304 instead of __static_tls_align-1.
10306 2003-03-04 Ulrich Drepper <drepper@redhat.com>
10308 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10310 * pthread_create.c: Define __pthread_keys using nocommon
10311 attribute, not by placing it explicitly in bss.
10312 Remove DEFINE_DEALLOC definition. Not needed anymore.
10314 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10315 Use it in mmap call to allocate stacks.
10317 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10319 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10320 result of the thread function.
10322 2003-03-03 Ulrich Drepper <drepper@redhat.com>
10324 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10325 version is just fine.
10327 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10328 (__pthread_child_handler): Renamed from pthread_child_handler,
10329 exported, and marked hidden. Change all users.
10330 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10331 free __pthread_child_handler from child list.
10333 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10335 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10337 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10338 Fix handling of cancellation and failing pthread_mutex_unlock call.
10339 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10340 (__pthread_cond_wait): Likewise.
10342 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10343 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10344 lll_futex_timed_wait call.
10345 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10346 (pthread_rwlock_timedwrlock): Likewise.
10348 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10349 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10350 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10352 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10353 check of lll_futex_wake return value.
10355 2003-03-03 Roland McGrath <roland@redhat.com>
10357 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10359 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10360 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10361 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10363 2003-03-02 Ulrich Drepper <drepper@redhat.com>
10365 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10366 error for CPU clocks.
10368 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10369 _POSIX_MONOTONIC_CLOCK.
10370 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10372 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10375 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10377 * descr.h (struct pthread): Move cleanup field to the front.
10379 2003-03-01 Roland McGrath <roland@redhat.com>
10381 * sem_open.c (sem_open): Braino fix.
10383 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10385 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10386 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10387 __pthread_cleanup_pop functionality.
10388 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10390 * descr.h (struct pthread): Move tid field to the front now that
10393 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10394 (__lll_mutex_timedlock_wait): Remove.
10395 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10396 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10397 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10398 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10399 (lll_unlock_wake_cb): Don't save and restore %esi.
10400 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10402 (__lll_timedwait_tid): Add alignment.
10403 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10404 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10406 (__lll_timedwait_tid): Removed.
10407 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10408 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10409 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10410 (pthread_barrier_wait): Don't save, load, and restore %esi for
10412 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10413 (__pthread_cond_signal): Don't save, load, and restore %esi.
10414 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10415 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10416 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10417 Don't save, load, and restore %esi.
10419 2003-02-27 Ulrich Drepper <drepper@redhat.com>
10421 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10422 Release lock before waking up the waiters.
10424 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10426 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10427 (reader_thread): Likewise.
10429 * sysdeps/pthread/pthread_rwlock_unlock.c
10430 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10431 to wake up readers if there are none.
10433 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10434 Release internal lock before wake threads.
10436 2003-02-26 Ulrich Drepper <drepper@redhat.com>
10438 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10439 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10441 * tst-rwlock9.c: Likewise.
10442 * tst-rwlock10.c: New file.
10443 * tst-rwlock11.c: New file.
10445 * Makefile (tests): Add tst-dlsym1.
10446 * tst-dlsym1.c: New file.
10448 * init.c (__pthread_initialize_minimal_internal): Set
10449 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10450 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10452 2003-02-24 Ulrich Drepper <drepper@redhat.com>
10454 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10456 * tst-cond2.c: Fix sychronization with child.
10458 * tst-rwlock8.c (reader_thread): Remove unused variable.
10460 * Makefile: Add rules to build and run tst-tls3.
10461 * tst-tls3.c: New file.
10462 * tst-tls3mod.c: New file.
10464 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10465 * tst-rwlock8.c: New file.
10466 * tst-rwlock9.c: New file.
10467 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10468 complete broken rwlock implementation.
10469 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10471 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10473 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10474 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10475 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10476 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10477 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10478 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10479 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10481 2003-02-23 Roland McGrath <roland@redhat.com>
10483 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10485 2003-02-23 Ulrich Drepper <drepper@redhat.com>
10487 * Makefile (tests): Add tst-context1.
10488 * tst-context1.c: New file.
10490 * Makefile (tests): Add tst-tls1 and tst-tls2.
10491 * tst-tls1.c: New file.
10492 * tst-tls2.c: New file.
10494 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10495 for failed cmpxchg.
10497 * pthread_create.c (start_thread): Set EXITING_BIT early.
10499 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10500 (THREAD_GETMEM_NC): Likewise.
10502 2003-02-22 Ulrich Drepper <drepper@redhat.com>
10504 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10505 off 3 more bytes by using offset-less instructions when possible.
10507 * Makefile: Add dependency for $(objpfx)version.d.
10509 * eintr.c (eintr_source): Add unnecessary return but the compiler
10512 * tst-kill3.c: Include <unistd.h>.
10514 2003-02-21 Roland McGrath <roland@redhat.com>
10516 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10518 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10520 * Makefile (tests): Add tst-eintr1.
10521 (distribute): Add eintr.c.
10522 * tst-eintr1.c: New file.
10523 * eintr.c: New file.
10525 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10527 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10528 Disallow sending SIGCANCEL.
10530 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
10531 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10532 * tst-kill1.c: New file.
10533 * tst-kill2.c: New file.
10534 * tst-kill3.c: New file.
10535 * tst-kill5.c: New file.
10536 * tst-kill6.c: New file.
10537 * tst-basic7.c: Renamed to...
10538 * tst-kill4.c: ...this.
10540 2003-02-21 Roland McGrath <roland@redhat.com>
10542 * Makefile (install-lib-ldscripts): New variable.
10544 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10546 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10547 * pthread_cancel.c: Use INVALID_TD_P.
10548 * pthread_detach.c: Likewise.
10549 * pthread_getschedparam.c: Likewise.
10550 * pthread_setschedparam.c: Likewise.
10551 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10552 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10553 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10554 * pthread_timedjoin.c: Likewise.
10556 * tst-basic7.c: Include <signal.h>.
10558 * pthread_join.c (pthread_join): Limited checking for invalid
10560 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10562 2003-02-20 Ulrich Drepper <drepper@redhat.com>
10564 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10565 beginning of the loop. Clear the entire first block of TSD.
10566 * Makefile (tests): Add tst-key4.
10567 * tst-key4.c: New file.
10569 2003-02-18 Ulrich Drepper <drepper@redhat.com>
10571 * Makefile (tests): Add tst-basic7.
10572 * tst-basic7.c: New file.
10574 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10575 Add some more __builtin_expect.
10577 * pthreadP.h: Define dummy version of DEBUGGING_P.
10579 2003-02-17 Ulrich Drepper <drepper@redhat.com>
10581 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10582 _POSIX_THREAD_PRIORITY_SCHEDULING.
10583 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10584 _XOPEN_REALTIME_THREADS.
10585 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10587 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10588 kernel returns EINVAL for PID <= 0, work around it.
10590 * Makefile (tests): Add tst-signal5.
10591 * tst-signal5.c: New file.
10593 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10594 and LOGIN_NAME_MAX.
10596 * tst-cancel1.c (tf): Block all signals.
10598 * Makefile (tests): Add tst-basic6.
10599 * tst-basic6.c: New file.
10601 * tst-basic1.c: Add test for process ID.
10603 * Makefile (tests): Add tst-cancel10.
10604 * tst-cancel10.c: New file.
10606 * Makefile (tests): Add tst-signal4.
10607 * tst-signal4.c: New file.
10609 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10610 __sigismember instead of sigismember. Add __builtin_expect.
10612 2003-02-16 Ulrich Drepper <drepper@redhat.com>
10614 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10615 pthread_setcancelstate, and pthread_rwlock_setpshared.
10617 * tst-cancel7.c (do_test): Make sure the pid file exists before
10618 canceling the thread.
10620 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10621 pthread_rwlock_timedrdlock tests.
10622 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10623 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10624 Check for invalid tv_nsec field.
10625 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10628 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10629 recursive mutex of overflow.
10631 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10633 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10634 going into an endless loop.
10635 * Makefile (tests): Add tst-cancel9.
10636 * tst-cancel9.c: New file.
10638 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10640 2003-02-15 Ulrich Drepper <drepper@redhat.com>
10642 * tst-mutex5.c (do_test): Add more timedlock tests.
10644 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10645 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10647 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10648 use INLINE_SYSCALL. Error number is returned, not -1.
10650 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10651 and __deallocate_stack with internal_function.
10652 * pthread_create.c: Adjust definitions appropriately.
10653 * allocatestack.c: Likewise.
10655 * pthread_join.c: Add one more __builtin_expect.
10656 * pthread_timedjoin.c: Likewise.
10658 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10659 not data of sequence number does not match.
10660 Add one __builtin_expect.
10662 * Makefile (tests): Add tst-clock1.
10663 * tst-clock1.c: New file.
10665 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10666 negative arguments.
10667 * Makefile (tests): Add tst-basic5.
10668 * tst-basic5.c: New file.
10670 2003-02-14 Ulrich Drepper <drepper@redhat.com>
10672 * Makefile (tests): Add tst-basic4.
10673 * tst-basic4.c: New file.
10675 * pthreadP.h: Add declaraction for __nptl_nthreads.
10676 * pthread_create.c: Define __nptl_nthreads
10677 (start_thread): Increment __nptl_nthreads at beginning. Decrement
10678 after thread is done. If then zero, call exit(0).
10679 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10680 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
10681 * init.c (pthread_functions): Initialize ptr_nthreads.
10682 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10683 (__reclaim_stacks): Decrement __nptl_nthreads.
10684 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10686 * Makefile (tests): Add tst-basic3.
10687 * tst-basic3.c: New file.
10689 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
10690 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
10691 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10692 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
10693 if asynchronous canceling is enabled.
10694 * pthread_join.c (pthread_join): When recognizing circular joins,
10695 take into account the other thread might be already canceled.
10696 * Makefile (tests): Add tst-join5.
10697 * tst-join5.c: New file.
10699 * Makefile (tests): Add tst-join4.
10700 * tst-join4.c: New file.
10702 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10704 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10706 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
10708 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10709 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10710 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10712 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10714 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10715 error if lll_futex_wake failed.
10717 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10719 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10720 handling of cancellation and failung pthread_mutex_unlock call.
10721 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10722 * Makefile (tests): Add tst-cond8 and tst-cond9.
10723 * tst-cond8.c: New file.
10724 * tst-cond9.c: New file.
10726 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10728 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10729 non-standard initializers with __USE_GNU.
10731 * Makefile (tests): Add tst-cleanup3.
10732 * tst-cleanup3.c: New file.
10734 2003-02-12 Ulrich Drepper <drepper@redhat.com>
10736 * Makefile (tests): Add tst-attr1 and tst-attr2.
10737 * tst-attr1.c: New file.
10738 * tst-attr2.c: New file.
10740 * Makefile: Add rules to build and run tst-atfork2 test.
10741 * tst-atfork2.c: New file.
10742 * tst-atfork2mod.c: New file.
10744 * sysdeps/unix/sysv/linux/unregister-atfork.c
10745 (__unregister_atfork): Free the memory allocated for the handlers
10746 after removing them from the lists.
10748 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10751 * tst-atfork1.c (do_test): Wait for the child we forked.
10752 Report error in child.
10754 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10756 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10758 2003-02-10 Ulrich Drepper <drepper@redhat.com>
10760 * Makefile (tests): Add tst-cancel8.
10761 * tst-cancel8.c: New file.
10763 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10764 clearing of control variable.
10765 * Makefile (tests): Add tst-once3 and tst-once4.
10766 * tst-once3.c: New file.
10767 * tst-once4.c: New file.
10769 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10771 * sysdeps/sh/Makefile: New file.
10772 * sysdeps/sh/bits/atomic.h: New file.
10773 * sysdeps/sh/pthread_spin_init.c: New file.
10774 * sysdeps/sh/pthread_spin_lock.c: New file.
10775 * sysdeps/sh/pthread_spin_trylock.S: New file.
10776 * sysdeps/sh/pthread_spin_unlock.S: New file.
10777 * sysdeps/sh/pthreaddef.h: New file.
10778 * sysdeps/sh/tcb-offsets.sym: New file.
10779 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10780 * sysdeps/sh/tls.h: New file.
10781 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10782 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10783 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10784 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10785 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10786 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10787 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10788 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10789 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10790 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10791 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10792 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10793 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10794 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10795 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10796 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10797 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10798 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10799 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10800 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10801 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10802 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10803 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10804 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10805 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10806 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10807 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10808 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10809 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10810 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10812 2003-02-08 Ulrich Drepper <drepper@redhat.com>
10814 * tst-cond2.c: Rearrange code to not rely on behavior undefined
10815 according to POSIX.
10817 * tst-basic2.c (do_test): Lock mutex before creating the thread.
10819 2003-02-07 Ulrich Drepper <drepper@redhat.com>
10821 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10822 (TLS_GET_FS): New #define.
10823 (TLS_SET_FS): New #define.
10824 Correct value of __NR_set_thread_area.
10826 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10828 2003-02-06 Ulrich Drepper <drepper@redhat.com>
10830 * Makefile (tests): Add tst-popen1.
10831 * tst-popen1.c: New file.
10833 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10834 but inactive generalization.
10835 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10836 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10837 Minor optimization, remove one instruction.
10838 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10840 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
10842 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10844 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
10846 * init.c (__NR_set_tid_address): Add #ifdef for s390.
10847 * sysdeps/pthread/pthread_barrier_wait.c: New file.
10848 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10849 * sysdeps/pthread/pthread_cond_signal.c: New file.
10850 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10851 * sysdeps/pthread/pthread_cond_wait.c: New file.
10852 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10853 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10854 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10855 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10856 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10857 * sysdeps/s390/Makefile: New file.
10858 * sysdeps/s390/bits/atomic.h: New file.
10859 * sysdeps/s390/pthread_spin_init.c: New file.
10860 * sysdeps/s390/pthread_spin_lock.c: New file.
10861 * sysdeps/s390/pthread_spin_trylock.c: New file.
10862 * sysdeps/s390/pthread_spin_unlock.c: New file.
10863 * sysdeps/s390/pthreaddef.h: New file.
10864 * sysdeps/s390/tcb-offsets.sym: New file.
10865 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10866 * sysdeps/s390/tls.h: New file.
10867 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10868 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10869 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10870 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10871 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10872 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10873 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10874 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10875 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10876 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10877 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10878 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10879 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10880 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10881 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10882 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10883 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10884 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10885 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10886 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10887 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10888 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10889 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10891 2003-02-04 Ulrich Drepper <drepper@redhat.com>
10893 * atomic.h: Add a couple more default implementations.
10894 (atomic_compare_and_exchange_acq): Use
10895 __arch_compare_and_exchange_32_acq in return value definition. It
10897 (atomic_bit_set): Renamed from atomic_set_bit.
10898 Add missing atomic_ prefixes.
10900 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10901 thread library is available, use correct value to mark initialized
10904 2003-02-03 Ulrich Drepper <drepper@redhat.com>
10906 * allocatestack.c (allocate_stack): Use __getpagesize instead of
10907 __sysconf to determine pagesize.
10909 * pthread_create.c: Include <atomic.h>.
10910 * allocatestack.c (allocate_stack): Implement coloring of the
10911 allocated stack memory. Rename pagesize to pagesize_m1. It's the
10912 size minus one. Adjust users.
10913 * sysdeps/i386/i686/Makefile: New file.
10915 2003-02-02 Ulrich Drepper <drepper@redhat.com>
10917 * allocatestack.c: Improve comment throughout the file.
10919 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10920 (__lll_lock_wait): Add branch prediction.
10921 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10922 (__lll_lock_wait): Likewise.
10923 (lll_unlock_wake_cb): Removed.
10925 2003-01-31 Ulrich Drepper <drepper@redhat.com>
10927 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10928 _POSIX_THREAD_PRIORITY_SCHEDULING.
10930 2003-01-30 Jakub Jelinek <jakub@redhat.com>
10932 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10933 Fix return type of ptr___pthread_getspecific.
10935 2003-01-29 Ulrich Drepper <drepper@redhat.com>
10937 * Makefile (tests): Add tst-umask1.
10938 (tst-umask1-ARGS): Define.
10939 * tst-umask1.c: New file.
10941 2003-01-28 Ulrich Drepper <drepper@redhat.com>
10943 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
10944 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10945 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10946 pthread_rwlock_unlock.
10947 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10948 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10949 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10950 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10951 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10953 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10954 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10956 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10957 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10958 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10960 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10961 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10963 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10964 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10965 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10967 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10968 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10970 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10972 * Makefile (libpthread-routines): Remove lowlevelcond and
10973 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10974 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10975 and pthread_cond_broadcast.
10976 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10977 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10978 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10979 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10980 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10981 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10982 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10983 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10984 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10985 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10986 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10987 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10988 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10989 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10990 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10991 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10992 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10993 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10994 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10995 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10996 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10997 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10998 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10999 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11000 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11001 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11002 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11003 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11004 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11005 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11006 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11008 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11009 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11010 of the code is moved to ...
11011 * sysdeps/pthread/createthread.c: ...here. New file.
11013 2003-01-27 Ulrich Drepper <drepper@redhat.com>
11015 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11016 (__new_sem_post): Clear %eax before returning.
11017 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11019 * Makefile (tests): Add tst-cleanup2.
11020 * tst-cleanup2.c: New file.
11022 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11023 Interpret first parameter correctly.
11025 2003-01-17 Ulrich Drepper <drepper@redhat.com>
11027 * Makefile (headers): Add bits/semaphore.h.
11029 2003-01-16 Jakub Jelinek <jakub@redhat.com>
11031 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11034 2003-01-14 Ulrich Drepper <drepper@redhat.com>
11036 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11037 must be used and mapping failed.
11038 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11040 * Makefile (CFLAGS-pthread_self.os): Define this, not
11041 CFLAGS-pthread_self.c.
11043 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11045 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11046 lll_unlock_wake_cb.
11048 * Makefile (libpthread-routines): Add version. Add rules to build
11049 version.os and banner.h.
11050 * version.c: New file.
11052 2003-01-13 Jakub Jelinek <jakub@redhat.com>
11054 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11055 the alias unconditional.
11056 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11058 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11060 * Makefile (CFLAGS-pthread_self.c): New definition.
11062 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11064 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11065 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11066 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11067 * init.c (__pthread_initialize_minimal_internal): Likewise.
11069 2003-01-07 Jakub Jelinek <jakub@redhat.com>
11071 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11073 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11074 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11075 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11076 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11077 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11078 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11080 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11082 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11083 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11084 * tst-cancel-wrappers.sh: Remove all exceptions.
11086 2003-01-05 Ulrich Drepper <drepper@redhat.com>
11088 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11089 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11091 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11092 Use __libc_pthread_functions array if SHARED.
11094 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11095 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11097 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11098 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11099 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11100 __libc_ptf_call instead of __libc_maybe_call.
11101 (PTF): New #define.
11102 (__libc_cleanup_region_start): Wrap function name with PTF call.
11103 (__libc_cleanup_region_end): Likewise.
11104 (__libc_cleanup_end): Likewise.
11106 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11107 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11108 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11109 * pthreadP.h: Add prototypes.
11111 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11112 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11113 __pthread_rwlock_unlock aliases.
11114 * pthreadP.h: Add prototypes for new aliases.
11116 * pthreadP.h (struct pthead_functions): Moved to...
11117 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11118 * init.c (pthread_functions): Add initializers for new elements.
11120 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11121 __pthread_cleanup_pop_restore aliases.
11122 * pthreadP.h: Add prototypes.
11124 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11125 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11126 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11127 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11128 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11129 * pthreadP.h: Adjust prototypes and callers.
11131 2003-01-04 Ulrich Drepper <drepper@redhat.com>
11133 * Makefile (tests): Add tst-cancel7.
11134 (tst-cancel7-ARGS): New variable.
11135 * tst-cancel7.c: New file.
11137 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11138 around gcc defficiencies.
11139 * old_pthread_cond_signal.c: Likewise.
11140 * old_pthread_cond_timedwait.c: Likewise.
11141 * old_pthread_cond_wait.c: Likewise.
11143 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11145 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11147 * Makefile (tests): Add tst-cond7.
11148 * tst-cond7.c: New file.
11150 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11151 (condvar_cleanup): Get condvar address from the right place.
11153 * atomic.h: Correct definitions of atomic_full_barrier,
11154 atomic_read_barrier, atomic_write_barrier.
11156 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11158 * old_pthread_cond_signal.c: Likewise.
11159 * old_pthread_cond_timedwait.c: Likewise.
11160 * old_pthread_cond_wait.c: Likewise.
11162 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11164 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11166 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11168 * pthreadP.h (pthread_cond_2_0_t): New type.
11169 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11170 Use new type for the 2.0 condvar function prototypes.
11171 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11172 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11174 * old_pthread_cond_destroy.c: Likewise.
11175 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11176 * old_pthread_cond_signal.c: Likewise.
11177 * old_pthread_cond_timedwait.c: Likewise.
11178 * old_pthread_cond_wait.c: Likewise.
11180 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11181 (__pthread_cond_wait): Don't save cancellation mode and seq value
11184 * herrno.c (__h_errno_location): Don't define as weak.
11186 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11188 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11189 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11190 and pthread_cond_wait.
11191 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11193 (__pthread_cond_broadcast_2_0): ... this.
11194 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11196 (__pthread_cond_destroy_2_0): ... this.
11197 * old_pthread_cond_init.c (__old_pthread_cond_init):
11199 (__pthread_cond_init_2_0): ... this.
11200 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11202 (__pthread_cond_signal_2_0): ... this.
11203 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11205 (__pthread_cond_wait_2_0): ... this.
11206 * pthread_cond_destroy.c: Include shlib-compat.h.
11207 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11208 * pthread_cond_init.c: Include shlib-compat.h.
11209 (pthread_cond_init): Change strong_alias into versioned_symbol.
11210 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11211 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11213 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11214 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11215 __pthread_cond_wait_2_0): New prototypes.
11216 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11217 __old_pthread_cond_init, __old_pthread_cond_signal,
11218 __old_pthread_cond_wait): Removed.
11219 * init.c: Include shlib-compat.h.
11220 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11221 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11222 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11223 ptr___pthread_cond_*_2_0 fields.
11224 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11225 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11227 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11228 LIBC_SIGACTION was not yet defined.
11229 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11230 [!defined LIBC_SIGACTION] (__sigaction): New function and
11232 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11233 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11235 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11237 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11239 2003-01-02 Ulrich Drepper <drepper@redhat.com>
11241 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11242 New, larger type definition.
11243 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11245 * Versions [libpthread]: Add definitions for new pthread_cond_*
11246 interfaces for version GLIBC_2.3.2.
11247 * pthread_cond_init.c: Update initialization for new type definition.
11248 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11249 pthread_cond_timedwait, pthread_cond_signal, and
11250 pthread_cond_broadcast. Add old_pthread_cond_init,
11251 old_pthread_cond_destroy, old_pthread_cond_wait,
11252 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11253 old_pthread_cond_broadcast.
11254 * old_pthread_cond_broadcast.c: New file.
11255 * old_pthread_cond_destroy.c: New file.
11256 * old_pthread_cond_init.c: New file.
11257 * old_pthread_cond_signal.c: New file.
11258 * old_pthread_cond_timedwait.c: New file.
11259 * old_pthread_cond_wait.c: New file.
11260 * pthreadP.h: Add prototypes for the compatibility interfaces.
11262 * pthread_cond_destroy.c: Don't include <errno.h>.
11264 2003-01-01 Ulrich Drepper <drepper@redhat.com>
11266 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11267 unnecessary zero offset when addressing MUTEX.
11269 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11271 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11273 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11274 for __register_atfork.
11276 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11278 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11279 instead of ASSEMBLER test macro.
11281 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11282 __libc_current_sigrtmax): Add libc_hidden_def.
11284 * sysdeps/pthread/list.h: Remove assert.h include.
11286 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11288 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11289 __pthread_initialize_minimal_internal not
11290 __pthread_initialize_minimal.
11292 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11294 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11295 __pthread_initialize_minimal as hidden.
11297 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11300 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11302 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11303 $(common-objpfx)format.lds, include that into the output script.
11305 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11307 2002-12-28 Andreas Jaeger <aj@suse.de>
11309 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11310 nsec resolution changes.
11311 (xstat64_conv): Likewise.
11312 (xstat32_conv): Likewise.
11313 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11314 struct kernel_stat.
11315 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11316 structs stat and stat64.
11317 * time/time.h (__timespec_defined): Define for __USE_MISC.
11318 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11320 2002-12-30 Jakub Jelinek <jakub@redhat.com>
11322 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11324 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11325 (pthread_exit): Use strong_alias to avoid warnings.
11326 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11327 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11328 ptr___pthread_attr_init_2_*.
11329 * init.c (pthread_functions): Adjust.
11331 2002-12-29 Ulrich Drepper <drepper@redhat.com>
11333 * forward.c: Make all functions available by default again. It
11334 caused too much trouble.
11336 * pt-siglongjmp.c: Removed.
11338 2002-12-28 Jakub Jelinek <jakub@redhat.com>
11340 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11341 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11342 * sysdeps/i386/Makefile: New file.
11343 * sysdeps/i386/tcb-offsets.sym: New file.
11344 * sysdeps/pthread/tcb-offsets.h: New file.
11345 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11346 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11348 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11349 __register_atfork...
11350 (GLIBC_2.3.2): ...here.
11352 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11354 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11355 pthread_attr_setstackaddr with __attribute_deprecated__.
11357 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11359 * pt-system.c (system): Remove cancellation handling.
11360 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11361 cancellation routines.
11363 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11365 * descr.h: Include <dl-sysdep.h>.
11366 (struct pthread): Move header.data.list to the back of the struct.
11367 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11368 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11369 (SYSINFO_OFFSEET): Likewise.
11371 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11373 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11375 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11376 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11377 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11378 (USE_DL_SYSINFO): Undef.
11380 2002-12-22 Jakub Jelinek <jakub@redhat.com>
11382 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11383 $(common-objpfx)libc.so.
11384 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11385 it is bigger than pipe buffer size even on arches with bigger
11387 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11389 2002-12-25 Ulrich Drepper <drepper@redhat.com>
11391 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11392 correct errno access for case that USE___THREAD is not defined.
11394 2002-12-24 Ulrich Drepper <drepper@redhat.com>
11396 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11397 Patch by Marijn Ros <marijn@mad.scientist.com>.
11399 2002-12-22 Roland McGrath <roland@redhat.com>
11401 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11403 2002-12-20 Ulrich Drepper <drepper@redhat.com>
11405 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11407 2002-12-19 Ulrich Drepper <drepper@redhat.com>
11409 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11410 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11411 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11413 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11415 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11416 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11417 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11418 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11419 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11420 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11421 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11422 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11424 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11426 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11428 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11430 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11432 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11433 that sysinfo is properly initialized.
11434 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11435 to 1 only for ld.so.
11437 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11438 RTLD_CORRECT_DYNAMIC_WEAK.
11440 2002-12-19 Jakub Jelinek <jakub@redhat.com>
11442 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11443 Use return 0 as 6th argument to FORWARD4.
11444 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11446 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11448 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11449 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11450 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11451 (INIT_SYSINFO): New #define.
11452 (TLS_TP_INIT): Use INIT_SYSINFO.
11453 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11454 At test to make sure SYSINFO_OFFSET value is correct.
11455 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11457 2002-12-18 Jakub Jelinek <jakub@redhat.com>
11459 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11460 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11461 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11462 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11463 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11464 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11465 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11467 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11469 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11470 macro instead of using int $0x80 directly.
11472 * sysdeps/pthread/bits/stdio-lock.h: New file.
11473 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11474 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11475 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11476 * Makefile (routines): Add libc-lowlevelmutex.
11478 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11479 __i686.get_pc_thunk.dx.
11481 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11483 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11484 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11485 ($(objpfx)tst-cancel-wrappers.out): New rule.
11486 * tst-cancel-wrappers.sh: New test.
11487 * tst-locale1.c: Include signal.h.
11488 (uselocale): Test static linking of __libc_current_sigrt*.
11490 2002-12-17 Ulrich Drepper <drepper@redhat.com>
11492 * Makefile (tests): Add tst-cancel6.
11493 * tst-cancel6.c: New file
11495 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11497 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11498 Define meaningfully for assembler as well.
11499 * pthreadP.h (struct pthread_functions): Remove
11500 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11501 and ptr_pthread_attr_init_2_1 fields.
11502 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11503 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11504 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11505 (FORWARD3): Define using FORWARD4.
11506 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11508 * pt-system.c: Remove duplicate stdlib.h include.
11510 2002-12-16 Ulrich Drepper <drepper@redhat.com>
11512 * sem_init.c: Define sem_init@GLIBC_2.0.
11513 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11514 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11516 * flockfile.c: Moved to...
11517 * sysdeps/pthread/flockfile.c: ...here. New file.
11518 * funlockfile.c: Moved to...
11519 * sysdeps/pthread/funlockfile.c: ...here. New file.
11520 * ftrylockfile.c: Moved to...
11521 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11523 2002-12-16 Jakub Jelinek <jakub@redhat.com>
11525 * libc-cancellation.c: Guard both function with
11526 #if !defined NOT_IN_libc.
11527 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11528 automatically provided pthread wrappers.
11529 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11530 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11532 * pt-open.c: Removed.
11533 * pt-fcntl.c: Removed.
11534 * pt-fsync.c: Removed.
11535 * pt-lseek.c: Removed.
11536 * pt-msgrcv.c: Removed.
11537 * pt-msgsnd.c: Removed.
11538 * pt-msync.c: Removed.
11539 * pt-nanosleep.c: Removed.
11540 * pt-open64.c: Removed.
11541 * pt-pause.c: Removed.
11542 * pt-pread.c: Removed.
11543 * pt-pread64.c: Removed.
11544 * pt-pwrite.c: Removed.
11545 * pt-pwrite64.c: Removed.
11546 * pt-read.c: Removed.
11547 * pt-recv.c: Removed.
11548 * pt-recvfrom.c: Removed.
11549 * pt-recvmsg.c: Removed.
11550 * pt-send.c: Removed.
11551 * pt-sendto.c: Removed.
11552 * pt-sigtimedwait.c: Removed.
11553 * pt-sigwait.c: Removed.
11554 * pt-wait.c: Removed.
11555 * pt-waitpid.c: Removed.
11556 * pt-write.c: Removed.
11557 * pt-accept.c: Removed.
11558 * pt-close.c: Removed.
11559 * pt-connect.c: Removed.
11560 * pt-lseek64.c: Removed.
11561 * pt-sendmsg.c: Removed.
11562 * pt-tcdrain.c: Removed.
11564 2002-12-15 Ulrich Drepper <drepper@redhat.com>
11566 * init.c (__pthread_initialize_minimal_internal): Renamed from
11567 __pthread_initialize_minimal. Make old name an alias. This
11568 converts a normal relocation into a relative relocation.
11570 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11572 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11573 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11574 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11575 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11576 pt-sigwaitinfo, pt-waitid, and pt-writev.
11577 * pt-creat.c: Removed.
11578 * pt-poll.c: Removed.
11579 * pt-pselect.c: Removed.
11580 * pt-readv.c: Removed.
11581 * pt-select.c: Removed.
11582 * pt-sigpause.c: Removed.
11583 * pt-sigsuspend.c: Removed.
11584 * pt-sigwaitinfo.c: Removed.
11585 * pt-waitid.c: Removed.
11586 * pt-writev.c: Removed.
11588 * init.c (pthread_functions): New variable.
11589 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11590 (or NULL) to __libc_pthread_init.
11591 * forward.c: Rewrite to use __libc:pthread_functions array to get
11592 function addresses.
11593 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11595 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11596 Take new parameter. Copy content of variable pointed to by it
11597 to __libc_pthread_init.
11599 * pthreadP.h (struct pthread_functions): New type.
11600 (__libc_pthread_init): Declare.
11602 * pthread_attr_destroy.c: Add namespace protected alias.
11603 * pthread_attr_getdetachstate.c: Likewise.
11604 * pthread_attr_getinheritsched.c: Likewise.
11605 * pthread_attr_getschedparam.c: Likewise.
11606 * pthread_attr_getschedpolicy.c: Likewise.
11607 * pthread_attr_getscope.c: Likewise.
11608 * pthread_attr_setdetachstate.c: Likewise.
11609 * pthread_attr_setinheritsched.c: Likewise.
11610 * pthread_attr_setschedparam.c: Likewise.
11611 * pthread_attr_setschedpolicy.c: Likewise.
11612 * pthread_attr_setscope.c: Likewise.
11613 * pthread_cond_broadcast.c: Likewise.
11614 * pthread_cond_destroy.c: Likewise.
11615 * pthread_cond_init.c: Likewise.
11616 * pthread_cond_signal.c: Likewise.
11617 * pthread_cond_wait.c: Likewise.
11618 * pthread_condattr_destroy.c: Likewise.
11619 * pthread_condattr_init.c: Likewise.
11620 * pthread_equal.c: Likewise.
11621 * pthread_exit.c: Likewise.
11622 * pthread_getschedparam.c: Likewise.
11623 * pthread_self.c: Likewise.
11624 * pthread_setcancelstate.c: Likewise.
11625 * pthread_setschedparam.c: Likewise.
11626 * pthread_mutex_destroy.c: Likewise.
11627 * pthread_mutex_init.c: Likewise.
11628 * pthreadP.h: Add prototypes for the aliases.
11630 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11631 multiple_threads member in correct TCB to 1.
11633 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11634 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11635 member of thread decriptor, otherwise return unconditionally 1.
11637 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11639 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11640 regular Linux version. Remove file.
11641 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11642 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11643 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11644 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11645 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11646 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11647 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11648 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11649 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11650 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
11651 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
11652 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
11653 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
11654 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
11655 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
11656 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
11657 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
11658 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
11659 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
11660 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
11661 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
11662 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
11663 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
11664 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
11665 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
11666 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
11667 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
11668 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
11669 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
11670 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
11672 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11674 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11675 * sysdeps/unix/sysv/linux/open.c: Removed.
11676 * sysdeps/unix/sysv/linux/fsync.c: Removed.
11677 * sysdeps/unix/sysv/linux/lseek.c: Removed.
11678 * sysdeps/unix/sysv/linux/msync.c: Removed.
11679 * sysdeps/unix/sysv/linux/read.c: Removed.
11680 * sysdeps/unix/sysv/linux/close.c: Removed.
11681 * sysdeps/unix/sysv/linux/creat.c: Removed.
11682 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11683 * sysdeps/unix/sysv/linux/pause.c: Removed.
11684 * sysdeps/unix/sysv/linux/select.c: Removed.
11685 * sysdeps/unix/sysv/linux/write.c: Removed.
11687 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11689 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11690 element in TCB to see whether locking is needed.
11692 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11693 MULTIPLE_THREADS_OFFSET value is correct.
11695 * sysdeps/unix/sysv/linux/close.c: New file.
11696 * sysdeps/unix/sysv/linux/connect.S: New file.
11697 * sysdeps/unix/sysv/linux/creat.c: New file.
11698 * sysdeps/unix/sysv/linux/fsync.c: New file.
11699 * sysdeps/unix/sysv/linux/llseek.c: New file.
11700 * sysdeps/unix/sysv/linux/lseek.c: New file.
11701 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11702 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11703 * sysdeps/unix/sysv/linux/msync.c: New file.
11704 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11705 * sysdeps/unix/sysv/linux/open.c: New file.
11706 * sysdeps/unix/sysv/linux/open64.c: New file.
11707 * sysdeps/unix/sysv/linux/pause.c: New file.
11708 * sysdeps/unix/sysv/linux/poll.c: New file.
11709 * sysdeps/unix/sysv/linux/pread.c: New file.
11710 * sysdeps/unix/sysv/linux/pread64.c: New file.
11711 * sysdeps/unix/sysv/linux/pselect.c: New file.
11712 * sysdeps/unix/sysv/linux/pwrite.c: New file.
11713 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11714 * sysdeps/unix/sysv/linux/readv.c: New file.
11715 * sysdeps/unix/sysv/linux/recv.S: New file.
11716 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11717 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11718 * sysdeps/unix/sysv/linux/select.c: New file.
11719 * sysdeps/unix/sysv/linux/send.S: New file.
11720 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11721 * sysdeps/unix/sysv/linux/sendto.S: New file.
11722 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11723 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11724 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11725 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11726 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11727 * sysdeps/unix/sysv/linux/system.c: New file.
11728 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11729 * sysdeps/unix/sysv/linux/wait.c: New file.
11730 * sysdeps/unix/sysv/linux/waitid.c: New file.
11731 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11732 * sysdeps/unix/sysv/linux/writev.c: New file.
11733 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11735 * pt-readv.c: Fix comment.
11737 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11739 * tst-cleanup1.c: Include stdlib.h.
11741 * tst-cancel5.c: New test.
11742 * Makefile (tests): Add tst-cancel5.
11743 (tst-cancel5): Link against libc.so libpthread.so in that order.
11745 2002-12-13 Ulrich Drepper <drepper@redhat.com>
11747 * forward.c (test_loaded): Prevent recursive calls.
11749 * Makefile (routines): Add libc-cancellation.
11750 * libc-cancellation.c: New file.
11751 * descr.h (struct pthread): Add multiple_threads field.
11752 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11753 new thread descriptor to 1.
11754 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11755 Initialize multiple_thread field after successful thread creation.
11756 * cancellation.c (__do_cancel): Move to pthreadP.h.
11757 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11758 (__pthread_disable_asynccancel): Add internal_function attribute.
11759 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11760 * pthread_setcancelstate.c: Likewise.
11761 * pthread_setcanceltype.c: Likewise.
11762 * pthread_exit.c: Likewise.
11763 * pthreadP.h (CANCELLATION_P): Likewise.
11764 (__do_cancel): Define as static inline.
11765 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11766 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11768 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11769 fields. Define MULTIPLE_THREADS_OFFSET.
11770 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11772 * sysdeps/unix/sysv/linux/accept.S: New file.
11773 * sysdeps/unix/sysv/linux/read.c: New file.
11774 * sysdeps/unix/sysv/linux/write.c: New file.
11775 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11776 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11777 initialization of __libc_locking_needed.
11778 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11779 __libc_locking_needed, use multiple_threads field in TCB.
11780 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11782 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11784 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11786 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11788 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11789 access to __libc_locking_needed for PIC.
11791 2002-12-12 Jakub Jelinek <jakub@redhat.com>
11793 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11794 declare for libc.so.
11795 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11797 (__libc_lock_lock): Put into statement expression.
11798 (__libc_lock_unlock): Remove trailing semicolon.
11799 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11801 2002-12-12 Roland McGrath <roland@redhat.com>
11803 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11804 "m" constraint to refer to __libc_locking_needed. Declare it here.
11806 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11808 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11809 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11810 Initialize __libc_locking_needed.
11811 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11812 instead of __register_pthread_fork_handler.
11813 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11814 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11815 fork-gen with libc_pthread_init.
11816 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11817 of __register_pthread_fork_handler.
11818 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11819 of __register_pthread_fork_handler.
11820 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11821 __libc_locking_needed to determine whether lock prefix can be avoided.
11822 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11824 2002-12-11 Ulrich Drepper <drepper@redhat.com>
11826 * Makefile (tests): Add tst-cleanup1.
11827 * tst-cleanup1.c: New file.
11828 * cancellation.c (__cleanup_thread): Removed.
11829 (__do_cancel): Remove call to __cleanup_thread.
11830 * pthreadP.h: Remove __cleanup_thread prorotype.
11832 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11833 Remember function and argument even if cancellation handler
11834 function is not available.
11835 (__libc_cleanup_region_end): Execute registered function directly if
11836 pthread functions are not available.
11837 (__libc_cleanup_end): Likewise.
11839 * init.c (__pthread_initialize_minimal): Fix initialization in
11840 static lib by preventing gcc from being too clever.
11842 2002-12-10 Ulrich Drepper <drepper@redhat.com>
11844 * init.c (__pthread_initialize_minimal): Remove unneccesary
11847 * Makefile (tests): We can run tst-locale2 now.
11849 2002-12-09 Ulrich Drepper <drepper@redhat.com>
11851 * Versions: Remove duplicated sigwait entry.
11853 2002-12-08 Ulrich Drepper <drepper@redhat.com>
11855 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11858 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11860 * pthreadP.h: Declare __pthread_enable_asynccancel and
11861 __pthread_disable_asynccancel.
11862 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11863 (CANCEL_RESET): Use __pthread_disable_asynccancel.
11864 * cancellation.c (__pthread_enable_asynccancel): New function.
11865 (__pthread_disable_asynccancel): New function.
11866 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11867 * pt-close.c: Likewise.
11868 * pt-connect.c: Likewise.
11869 * pt-creat.c: Likewise.
11870 * pt-fcntl.c: Likewise.
11871 * pt-fsync.c: Likewise.
11872 * pt-lseek.c: Likewise.
11873 * pt-lseek64.c: Likewise.
11874 * pt-msgrcv.c: Likewise.
11875 * pt-msgsnd.c: Likewise.
11876 * pt-msync.c: Likewise.
11877 * pt-nanosleep.c: Likewise.
11878 * pt-open.c: Likewise.
11879 * pt-open64.c: Likewise.
11880 * pt-pause.c: Likewise.
11881 * pt-poll.c: Likewise.
11882 * pt-pread.c: Likewise.
11883 * pt-pread64.c: Likewise.
11884 * pt-pselect.c: Likewise.
11885 * pt-pwrite.c: Likewise.
11886 * pt-pwrite64.c: Likewise.
11887 * pt-read.c: Likewise.
11888 * pt-readv.c: Likewise.
11889 * pt-recv.c: Likewise.
11890 * pt-recvfrom.c: Likewise.
11891 * pt-recvmsg.c: Likewise.
11892 * pt-select.c: Likewise.
11893 * pt-send.c: Likewise.
11894 * pt-sendmsg.c: Likewise.
11895 * pt-sendto.c: Likewise.
11896 * pt-sigpause.c: Likewise.
11897 * pt-sigsuspend.c: Likewise.
11898 * pt-sigtimedwait.c: Likewise.
11899 * pt-sigwait.c: Likewise.
11900 * pt-sigwaitinfo.c: Likewise.
11901 * pt-system.c: Likewise.
11902 * pt-tcdrain.c: Likewise.
11903 * pt-wait.c: Likewise.
11904 * pt-waitid.c: Likewise.
11905 * pt-waitpid.c: Likewise.
11906 * pt-write.c: Likewise.
11907 * pt-writev.c: Likewise.
11908 * pthread_join.c: Likewise.
11909 * pthread_timedjoin.c: Likewise.
11911 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11912 (__xpg_sigpause): New function.
11913 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11915 2002-12-07 Ulrich Drepper <drepper@redhat.com>
11917 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11919 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11920 _GI_pthread_cleanup_pop to pthreadP.h.
11922 * ftrylockfile.c: Use _IO_lock_trylock instead of
11923 pthread_mutex_trylock.
11925 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11926 (CANCEL_RESET): Likewise.
11927 (__pthread_setcanceltype_): Declare.
11928 (__pthread_mutex_lock_internal): Declare.
11929 (__pthread_mutex_unlock_internal): Declare.
11930 (__pthread_once_internal): Declare.
11931 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11932 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11934 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11935 and pthread_mutex_unlock.
11936 * pthread_cond_wait.c: Likewise.
11937 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11938 * pthread_mutex_unlock.c: Likewise.
11940 * pthread_setcanceltype.c: Add additional alias
11941 __pthread_setcanceltype.
11943 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11944 * sem_open.c (sem_open): Likewise.
11945 Use __libc_open, __libc_write, and __libc_close instead of
11946 open, write, and close respectively.
11948 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11949 Rewrite as statement expression since it must return a value.
11951 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11952 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11955 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11956 alias __pthread_once_internal.
11958 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11960 2002-12-06 Ulrich Drepper <drepper@redhat.com>
11962 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11963 * tst-stdio1.c: New file.
11964 * tst-stdio2.c: New file.
11966 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11968 * Makefile (tests): Comment out tst-locale2 for now.
11969 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11971 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11973 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11974 Use _IO_lock_init instead of explicit assignment.
11976 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11977 Define __libc_lock_* and __libc_lock_recursive macros with
11978 lowlevellock macros, not pthread mutexes.
11980 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
11981 of pthread_mutex_lock.
11982 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
11983 instead of pthread_mutex_unlock.
11985 2002-12-06 Roland McGrath <roland@redhat.com>
11987 * allocatestack.c (__stack_user): Use uninitialized defn.
11988 * init.c (__pthread_initialize_minimal): Initialize it here.
11990 2002-12-05 Roland McGrath <roland@redhat.com>
11992 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11994 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11996 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11997 missing & here too.
11999 2002-12-05 Ulrich Drepper <drepper@redhat.com>
12001 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12003 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12004 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12005 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12006 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12007 for __libc_lock_* macros.
12008 * Makefile (routines): Add libc-lowlevellock.
12010 2002-10-09 Roland McGrath <roland@redhat.com>
12012 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12013 Under [__PIC__], call the function via the pointer fetched for
12014 comparison rather than a call by name that uses the PLT.
12015 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12016 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12017 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12018 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12019 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12021 2002-12-04 Roland McGrath <roland@redhat.com>
12023 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12025 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12026 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12028 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12030 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12032 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12033 a completely opaque, non-integer type.
12034 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12036 2002-12-05 Jakub Jelinek <jakub@redhat.com>
12038 * sysdeps/i386/tls.h: Include stdlib.h.
12039 * sysdeps/x86_64/tls.h: Likewise.
12041 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12043 * Makefile (tests): Add tst-locale2.
12044 (tests-static): Likewise.
12045 * tst-locale2.c: New file.
12047 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12048 volatile and add memory clobbers to lock operations.
12050 2002-12-03 Ulrich Drepper <drepper@redhat.com>
12052 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12053 * sysdeps/i386/i486/bits/atomic.h: New file.
12054 * sysdeps/i386/i586/bits/atomic.h: New file.
12055 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12056 include i486 version.
12057 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12058 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12059 Patch by Marijn Ros <marijn@mad.scientist.com>.
12061 * allocatestack.c (get_cached_stack): Don't crash if we first
12062 found a stack with a larger size then needed.
12063 Reported by Hui Huang <hui.huang@sun.com>.
12065 * Makefile (tests): Add tst-sysconf.
12066 * tst-sysconf.c: New file.
12068 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12069 PTHREAD_THREADS_MAX.
12071 2002-12-02 Roland McGrath <roland@redhat.com>
12073 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12074 Declare using hidden_proto instead of attribute_hidden, so there are
12075 non-.hidden static symbols for gdb to find.
12076 (__pthread_keys): Likewise.
12077 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12078 * allocatestack.c (__stack_user): Likewise.
12079 * pthread_create.c (__pthread_keys): Likewise.
12080 (__nptl_threads_events, __nptl_last_event): Make these static instead
12082 * pthread_key_create.c (__pthread_pthread_keys_max,
12083 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12085 2002-12-02 Ulrich Drepper <drepper@redhat.com>
12087 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12089 * tst-locale1.c: New file.
12091 * pthread_cond_timedwait.c: Include <stdlib.h>.
12093 * Makefile (tests): Add tst-fork2 and tst-fork3.
12094 * tst-fork2.c: New file.
12095 * tst-fork3.c: New file.
12097 2002-11-28 Ulrich Drepper <drepper@redhat.com>
12099 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12101 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12102 require it to 200112L.
12104 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12105 instruction only if HAVE_CMOV is defined.
12106 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12108 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12110 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12112 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12114 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12116 2002-11-27 Ulrich Drepper <drepper@redhat.com>
12118 * sysdeps/x86_64/bits/atomic.h: New file.
12120 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12123 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12124 possible since gettid cannot fail.
12126 * sysdeps/x86_64/pthreaddef.h: New file.
12128 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12130 * sysdeps/x86_64/pthread_spin_init.c: New file.
12131 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12132 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12133 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12135 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12136 Add missing lock prefix. Minute optimization.
12138 * tst-spin2.c (main): Also check successful trylock call.
12140 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12141 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12143 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12144 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12146 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12147 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12148 value in case of an error. Add support for INTERNAL_SYSCALL.
12150 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12151 value in case of an error.
12153 * sysdeps/x86_64/tls.h: New file.
12155 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12157 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12158 takes the array member name and the index as parameters.
12159 (THREAD_SETMEM_NC): Likewise.
12160 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12161 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12164 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12165 to decide which code to use.
12166 (THREAD_SETMEM_NC): Likewise.
12168 * allocatestack.c (queue_stack): Don't remove stack from list here.
12169 Do it in the caller. Correct condition to prematurely terminate
12170 loop to free stacks.
12171 (__deallocate_stack): Remove stack from list here.
12173 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12175 * Makefile (tests): Add tst-stack1.
12176 * tst-stack1.c: New file.
12178 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12181 * pthread_attr_getstack.c: Return bottom of the thread area.
12183 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12185 * Makefile (libpthread-routines): Add pt-allocrtsig and
12186 pthread_kill_other_threads.
12187 * pt-allocrtsig.c: New file.
12188 * pthread_kill_other_threads.c: New file.
12189 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12190 all three functions.
12191 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12193 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12194 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12195 and __libc_allocate_rtsig_private.
12196 * Versions (libpthread): Export pthread_kill_other_threads_np,
12197 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12199 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12201 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12202 the end of the stack. Adjust computations.
12203 When mprotect call fails dequeue stack and free it.
12204 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12206 * pthread_getattr_np.c: Likewise.
12208 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12211 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12213 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12214 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12216 2002-11-22 Ulrich Drepper <drepper@redhat.com>
12218 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12219 * pthread_setspecific.c: Likewise.
12221 2002-11-21 Ulrich Drepper <drepper@redhat.com>
12223 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12224 definitions. Get them from the official place.
12225 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12227 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12228 Use new CLONE_ flags in clone() calls.
12230 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12231 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12233 * Versions: Add pthread_* functions for libc.
12234 * forward.c: New file.
12236 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12238 * herrno.c: New file.
12241 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12242 sem_trywait, and sem_timedwait. Add herrno and res.
12243 * sem_init.c: Don't initialize lock and waiters members.
12244 * sem_open.c: Likewise.
12245 * sem_post.c: Removed.
12246 * sem_wait.c: Removed.
12247 * sem_trywait.c: Removed.
12248 * sem_timedwait.c: Removed.
12249 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12250 Includes full implementations of sem_post, sem_wait, sem_trywait,
12252 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12253 for new implementation.
12254 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12255 and waiters fields.
12257 * tst-sem3.c: Improve error message.
12258 * tst-signal3.c: Likewise.
12260 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12261 to tell the kernel about the termination futex and to initialize tid
12262 member. Don't initialize main_thread.
12263 * descr.h (struct pthread): Remove main_thread member.
12264 * cancelllation.c (__do_cancel): Remove code handling main thread.
12265 The main thread is not special anymore.
12267 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12268 size of the stacks to stack_cache_actsize.
12270 * pt-readv.c: Add missing "defined".
12271 * pt-sigwait.c: Likewise.
12272 * pt-writev.c: Likewise.
12274 2002-11-09 Ulrich Drepper <drepper@redhat.com>
12276 * Versions: Export __connect from libpthread.
12277 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12279 * Makefile (libpthread-routines): Add pt-raise.
12280 * sysdeps/unix/sysv/linux/raise.c: New file.
12281 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12282 * sysdeps/generic/pt-raise.c: New file.
12284 * pthread_cond_init.c: Initialize all data elements of the condvar
12285 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12287 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12288 * pthread_create.c: Likewise.
12290 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12291 * tst-key1.c: New file.
12292 * tst-key2.c: New file.
12293 * tst-key3.c: New file.
12295 * Versions: Export pthread_detach for version GLIBC_2.0.
12296 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12298 2002-11-08 Ulrich Drepper <drepper@redhat.com>
12300 * pthread_key_create.c: Terminate search after an unused key was found.
12301 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12303 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12304 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12306 2002-10-10 Ulrich Drepper <drepper@redhat.com>
12308 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12309 dynamic lookup for errno in PIC.
12311 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12312 release the stack lock as soon as possible.
12313 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12314 the static TLS block.
12315 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12317 * cancellation.c: Renamed from cancelation.c.
12318 * Makefile: Adjust accordingly.
12319 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12320 * cleanup_defer.c: Use CANCELLATION_P.
12321 * pthread_testcancel.c: Likewise.
12322 * descr.h: Fix spelling in comments.
12323 * init.c: Likewise.
12324 * pthread_getattr_np.c: Likewise.
12325 * pthread_getschedparam.c: Likewise.
12326 * pthread_setschedparam.c: Likewise.
12327 * Versions: Likewise.
12329 * pt-pselect.c: New file.
12330 * Makefile (libpthread-routines): Add pt-pselect.
12331 * Versions: Add pselect.
12333 * tst-cancel4.c: New file.
12334 * Makefile (tests): Add tst-cancel4.
12336 2002-10-09 Ulrich Drepper <drepper@redhat.com>
12338 * pthread_mutex_lock.c: Always record lock ownership.
12339 * pthread_mutex_timedlock.c: Likewise.
12340 * pthread_mutex_trylock.c: Likewise.
12342 * pt-readv.c: New file.
12343 * pt-writev.c: New file.
12344 * pt-creat.c: New file.
12345 * pt-msgrcv.c: New file.
12346 * pt-msgsnd.c: New file.
12347 * pt-poll.c: New file.
12348 * pt-select.c: New file.
12349 * pt-sigpause.c: New file.
12350 * pt-sigsuspend.c: New file.
12351 * pt-sigwait.c: New file.
12352 * pt-sigwaitinfo.c: New file.
12353 * pt-waitid.c: New file.
12354 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12355 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12356 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12357 * Versions: Add all the new functions.
12359 * tst-exit1.c: New file.
12360 * Makefile (tests): Add tst-exit1.
12362 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12364 2002-10-08 Ulrich Drepper <drepper@redhat.com>
12366 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12368 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12369 call. pthread_join is an official cancellation point.
12370 * pthread_timedjoin.c: Likewise.
12372 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12373 and the condvar's mutex are retrieved.
12374 * pthread_cond_timedwait.c: Likewise.
12375 Reported by dice@saros.East.Sun.COM.
12377 2002-10-07 Ulrich Drepper <drepper@redhat.com>
12379 * pthreadP.h: Cut out all type definitions and move them...
12380 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12381 * pthreadP.h: Include <internaltypes.h>.
12383 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12384 performance tweaks.
12386 * sem_trywait.c: Shuffle #includes around to get right order.
12387 * sem_timedwait.c: Likewise.
12388 * sem_post.c: Likewise.
12389 * sem_wait.c: Likewise.
12391 * nptl 0.3 released.
12393 * Makefile (tests): Add tst-signal3.
12394 * tst-signal3.c: New file.
12396 2002-10-05 Ulrich Drepper <drepper@redhat.com>
12398 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12399 the asms modify the sem object.
12400 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12402 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12403 the actual members.
12404 * pthreadP.h (struct sem): New type. Actual semaphore type.
12405 * semaphoreP.h: Include pthreadP.h.
12406 * sem_getvalue.c: Adjust to sem_t change.
12407 * sem_init.c: Likewise.
12408 * sem_open.c: Likewise.
12409 * sem_post.c: Likewise.
12410 * sem_timedwait.c: Likewise.
12411 * sem_trywait.c: Likewise.
12412 * sem_wait.c: Likewise.
12414 2002-10-04 Ulrich Drepper <drepper@redhat.com>
12416 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12417 * tst-basic2.c: New file.
12418 * tst-exec1.c: New file.
12419 * tst-exec2.c: New file.
12420 * tst-exec3.c: New file.
12422 * tst-fork1.c: Remove extra */.
12424 * nptl 0.2 released. The API for IA-32 is complete.